rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
iconname = 'stock_shuffle.png' if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/mirage/' + iconname): icon_path = '../share/mirage/' + iconname elif os.path.exists('/usr/local/share/mirage/' + iconname): icon_path = '/usr/local/share/mirage/' + iconname elif os.path.exists('/usr/share/mir...
iconname = 'stock_shuffle.png' if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/mirage/' + iconname): icon_path = '../share/mirage/' + iconname elif os.path.exists('/usr/local/share/mirage/' + iconname): icon_path = '/usr/local/share/mirage/' + iconname elif os.path.exists('/usr/share/mir...
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
try:
try:
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.ss_randomize.set_size_request(ss_back.size_request()[0], -1) except:
self.ss_randomize.set_size_request(ss_back.size_request()[0], -1) except:
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.ss_randomize.connect('toggled', self.random_changed) self.ss_delaycombo = gtk.combo_box_new_text() self.ss_delaycombo.append_text(str(self.delayoptions[0]) + ' ' + _('seconds')) self.ss_delaycombo.append_text(str(self.delayoptions[1]) + ' ' + _('seconds')) self.ss_delaycombo.append_text(str(self.delayoptions[2]) +...
self.ss_randomize.connect('toggled', self.random_changed) self.ss_delaycombo = gtk.combo_box_new_text() self.ss_delaycombo.append_text(str(self.delayoptions[0]) + ' ' + _('seconds')) self.ss_delaycombo.append_text(str(self.delayoptions[1]) + ' ' + _('seconds')) self.ss_delaycombo.append_text(str(self.delayoptions[2]) +...
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.window.connect("destroy", self.destroy) self.window.connect("size-allocate", self.window_resized) self.window.connect('key-press-event', self.topwindow_keypress) self.layout.drag_dest_set(gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP, [("text/uri-list", 0, 80)], gtk.gdk.ACTION_DEFAULT) self.layout.connect('dr...
self.window.connect("destroy", self.destroy) self.window.connect("size-allocate", self.window_resized) self.window.connect('key-press-event', self.topwindow_keypress) self.layout.drag_dest_set(gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP, [("text/uri-list", 0, 80)], gtk.gdk.ACTION_DEFAULT) self.layout.connect('dr...
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.vscroll.set_no_show_all(True)
self.vscroll.set_no_show_all(True)
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
for o, a in opts: if (o in ("-f", "--fullscreen")) or ((o in ("-s", "--slideshow")) and self.slideshow_in_fullscreen == True): self.enter_fullscreen(None) self.statusbar.set_no_show_all(True) self.toolbar.set_no_show_all(True) self.menubar.set_no_show_all(True) self.window.show_all() self.layout.set_flags(gtk.CAN_FOCUS...
for o, a in opts: if (o in ("-f", "--fullscreen")) or ((o in ("-s", "--slideshow")) and self.slideshow_in_fullscreen == True): self.enter_fullscreen(None) self.statusbar.set_no_show_all(True) self.toolbar.set_no_show_all(True) self.menubar.set_no_show_all(True) self.window.show_all() self.layout.set_flags(gtk.CAN_FOCUS...
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
for o, a in opts: if o in ("-f", "--fullscreen"):
for o, a in opts: if o in ("-f", "--fullscreen"):
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if args != []: for i in range(len(args)): args[i] = urllib.url2pathname(args[i]) self.expand_filelist_and_load_image(args) else: self.set_go_sensitivities(False) self.set_image_sensitivities(False)
if args != []: for i in range(len(args)): args[i] = urllib.url2pathname(args[i]) self.expand_filelist_and_load_image(args) else: self.set_go_sensitivities(False) self.set_image_sensitivities(False)
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
for o, a in opts: if o in ("-s", "--slideshow"): self.toggle_slideshow(None)
for o, a in opts: if o in ("-s", "--slideshow"): self.toggle_slideshow(None)
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
elif event.keyval == 65363 or event.keyval == 32:
elif event.keyval == 65363 or event.keyval == 32:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
elif event.keyval == 65360:
elif event.keyval == 65360:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
elif event.keyval == 65367:
elif event.keyval == 65367:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
elif event.state == gtk.gdk.CONTROL_MASK or event.state == gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK: if event.keyval == 65456:
elif event.state == gtk.gdk.CONTROL_MASK or event.state == gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK: if event.keyval == 65456:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if event.keyval == 65457:
if event.keyval == 65457:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
elif event.state == gtk.gdk.SHIFT_MASK or event.state == gtk.gdk.SHIFT_MASK | gtk.gdk.MOD2_MASK:
elif event.state == gtk.gdk.SHIFT_MASK or event.state == gtk.gdk.SHIFT_MASK | gtk.gdk.MOD2_MASK:
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def set_go_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/Previous Image').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/GoMenu/Next Image').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/GoMenu/Random Image').set_sensitive(enable) self.UIManager.get_widget('/MainMenu...
def set_go_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/Previous Image').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/GoMenu/Next Image').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/GoMenu/Random Image').set_sensitive(enable) self.UIManager.get_widget('/MainMenu...
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.UIManager.get_widget('/MainToolbar/1:1').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/Fit').set_sensitive(enable) self.UIManager.get_widget('/Popup/1:1').set_sensitive(enable) self.UIManager.get_widget('/Popup/Fit').set_sensitive(enable) self.UIManager.get_widget('/Popup/Rotate Left').set_sensitiv...
self.UIManager.get_widget('/MainToolbar/1:1').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/Fit').set_sensitive(enable) self.UIManager.get_widget('/Popup/1:1').set_sensitive(enable) self.UIManager.get_widget('/Popup/Fit').set_sensitive(enable) self.UIManager.get_widget('/Popup/Rotate Left').set_sensitiv...
def set_image_sensitivities(self, enable): self.set_zoom_in_sensitivities(enable) self.set_zoom_out_sensitivities(enable) self.UIManager.get_widget('/MainMenu/ViewMenu/1:1').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/EditMenu/Rota...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
zoomratio = float(self.currimg_width)/self.previmg_width
zoomratio = float(self.currimg_width)/self.previmg_width
def expose_event(self, widget, event):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.layout.get_hadjustment().set_value(newvalue)
self.layout.get_hadjustment().set_value(newvalue)
def expose_event(self, widget, event):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
pass
pass
def expose_event(self, widget, event):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.layout.get_vadjustment().set_value(newvalue)
self.layout.get_vadjustment().set_value(newvalue)
def expose_event(self, widget, event):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def window_resized(self, widget, allocation):
def window_resized(self, widget, allocation):
def window_resized(self, widget, allocation): # Update the image size on window resize if the current image was last fit:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if allocation.width != self.prevwinwidth or allocation.height != self.prevwinheight: if self.last_image_action_was_fit == True: self.zoom_to_fit_window(None, False) else: self.center_image()
if allocation.width != self.prevwinwidth or allocation.height != self.prevwinheight: if self.last_image_action_was_fit == True: self.zoom_to_fit_window(None, False) else: self.center_image()
def window_resized(self, widget, allocation): # Update the image size on window resize if the current image was last fit:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.prevwinwidth = allocation.width self.prevwinheight = allocation.height return def save_settings(self): conf = ConfigParser.ConfigParser() conf.add_section('window') conf.set('window', 'w', self.window.get_allocation().width) conf.set('window', 'h', self.window.get_allocation().height) conf.set('window', 'toolbar'...
self.prevwinwidth = allocation.width self.prevwinheight = allocation.height return def save_settings(self): conf = ConfigParser.ConfigParser() conf.add_section('window') conf.set('window', 'w', self.window.get_allocation().width) conf.set('window', 'h', self.window.get_allocation().height) conf.set('window', 'toolbar'...
def window_resized(self, widget, allocation): # Update the image size on window resize if the current image was last fit:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if os.path.exists(os.path.expanduser('~/.config/mirage/')) == False: os.mkdir(os.path.expanduser('~/.config/mirage/')) conf.write(file(os.path.expanduser('~/.config/mirage/miragerc'), 'w')) return def delete_event(self, widget, event, data=None): self.stop_now = True self.closing_app = True self.save_settings() sys.ex...
if os.path.exists(os.path.expanduser('~/.config/mirage/')) == False: os.mkdir(os.path.expanduser('~/.config/mirage/')) conf.write(file(os.path.expanduser('~/.config/mirage/miragerc'), 'w')) return def delete_event(self, widget, event, data=None):
def save_settings(self): conf = ConfigParser.ConfigParser() conf.add_section('window') conf.set('window', 'w', self.window.get_allocation().width) conf.set('window', 'h', self.window.get_allocation().height) conf.set('window', 'toolbar', self.toolbar_show) conf.set('window', 'statusbar', self.statusbar_show) conf.add_s...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
sys.exit(0) def put_zoom_image_to_window(self, currimg_preloaded):
sys.exit(0) return False def destroy(self, event, data=None): self.stop_now = True self.closing_app = True self.save_settings() return False def exit_app(self, action): self.stop_now = True self.closing_app = True self.save_settings() sys.exit(0) def put_zoom_image_to_window(self, currimg_preloaded):
def exit_app(self, action):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
colormap = self.imageview.get_colormap()
colormap = self.imageview.get_colormap()
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if self.location == 0:
if self.location == 0:
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if self.location == 1:
if self.location == 1:
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
finalimg_width, finalimg_height = finalimg_height, finalimg_width
finalimg_width, finalimg_height = finalimg_height, finalimg_width
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 270)
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 270)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 270)
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 270)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 270)
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 270)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 90)
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 90)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if self.location == 0:
if self.location == 0:
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.image_flip(self.currimg_pixbuf_original, False)
self.currimg_pixbuf = self.image_flip(self.currimg_pixbuf_original, False)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 180)
self.currimg_pixbuf = self.image_rotate(self.currimg_pixbuf_original, 180)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.image_flip(self.currimg_pixbuf_original, True)
self.currimg_pixbuf = self.image_flip(self.currimg_pixbuf_original, True)
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if self.currimg_zoomratio != 1:
if self.currimg_zoomratio != 1:
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
colormap = self.imageview.get_colormap()
colormap = self.imageview.get_colormap()
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_pixbuf = self.currimg_pixbuf_original
self.currimg_pixbuf = self.currimg_pixbuf_original
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_width, self.currimg_height = finalimg_width, finalimg_height
self.currimg_width, self.currimg_height = finalimg_width, finalimg_height
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.currimg_width, self.currimg_height = finalimg_height, finalimg_width self.layout.set_size(self.currimg_width, self.currimg_height) self.center_image() self.show_scrollbars_if_needed() if self.currimg_is_animation == False: self.imageview.set_from_pixbuf(self.currimg_pixbuf) self.previmage_is_animation = False els...
self.currimg_width, self.currimg_height = finalimg_height, finalimg_width self.layout.set_size(self.currimg_width, self.currimg_height) self.center_image() self.show_scrollbars_if_needed() if self.currimg_is_animation == False: self.imageview.set_from_pixbuf(self.currimg_pixbuf) self.previmage_is_animation = False els...
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
return
return
def put_zoom_image_to_window(self, currimg_preloaded):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def show_scrollbars_if_needed(self): if self.currimg_width > self.available_image_width(): self.hscroll.show() else: self.hscroll.hide() if self.currimg_height > self.available_image_height(): self.vscroll.show() else: self.vscroll.hide() def center_image(self): x_shift = int((self.available_image_width() - self.curr...
def show_scrollbars_if_needed(self): if self.currimg_width > self.available_image_width(): self.hscroll.show() else: self.hscroll.hide() if self.currimg_height > self.available_image_height(): self.vscroll.show() else: self.vscroll.hide() def center_image(self): x_shift = int((self.available_image_width() - self.curr...
def preload_next_image(self): # Always start with the original image to preserve quality! # Calculate image size: self.preloadimg_width = int(self.preloadimg_pixbuf_original.get_width() * self.preloadimg_zoomratio) self.preloadimg_height = int(self.preloadimg_pixbuf_original.get_height() * self.preloadimg_zoomratio) if...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if isfile == True: filter = gtk.FileFilter() filter.set_name(_("Images")) filter.add_pixbuf_formats() dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name(_("All files")) filter.add_pattern("*") dialog.add_filter(filter) preview = gtk.Image() dialog.set_preview_widget(preview) dialog.set_use_preview_labe...
if isfile == True: filter = gtk.FileFilter() filter.set_name(_("Images")) filter.add_pixbuf_formats() dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name(_("All files")) filter.add_pattern("*") dialog.add_filter(filter) preview = gtk.Image() dialog.set_preview_widget(preview) dialog.set_use_preview_labe...
def open_file_or_folder(self, action, isfile): # If isfile = True, file; If isfile = False, folder
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.expand_filelist_and_load_image(filenames) self.set_go_navigation_sensitivities() self.recursive = False else: dialog.destroy() return def hide_cursor(self): if self.fullscreen_mode == True and self.user_prompt_visible == False and self.slideshow_controls_visible == False: pix_data = """/* XPM */ static char * inv...
self.expand_filelist_and_load_image(filenames) self.set_go_navigation_sensitivities() self.recursive = False else: dialog.destroy() return def hide_cursor(self): if self.fullscreen_mode == True and self.user_prompt_visible == False and self.slideshow_controls_visible == False: pix_data = """/* XPM */ static char * inv...
def open_file_or_folder(self, action, isfile): # If isfile = True, file; If isfile = False, folder
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
st = os.stat(self.currimg_name) filesize = st[6]/1000 ratio = int(100 * self.currimg_zoomratio) status_text=str(self.currimg_pixbuf_original.get_width()) + "x" + str(self.currimg_pixbuf_original.get_height()) + " " + str(filesize) + "KB " + str(ratio) + "% " except: status_text=_("Cannot load image.") self.status...
st = os.stat(self.currimg_name) filesize = st[6]/1000 ratio = int(100 * self.currimg_zoomratio) status_text=str(self.currimg_pixbuf_original.get_width()) + "x" + str(self.currimg_pixbuf_original.get_height()) + " " + str(filesize) + "KB " + str(ratio) + "% " except: status_text=_("Cannot load image.") self.status...
def update_statusbar(self): # Update status bar:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) bglabel = gtk.Label() bglabel.set_markup('<b>' + _('Interface') + '</b>') bglabel.set_alignment(0, 1) table_settings.attach(bglabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_settings.attach(gtk.Label...
table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) bglabel = gtk.Label() bglabel.set_markup('<b>' + _('Interface') + '</b>') bglabel.set_alignment(0, 1) table_settings.attach(bglabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_settings.attach(gtk.Label...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
colorbutton = gtk.ColorButton(self.bgcolor) colorbutton.connect('color-set', self.bgcolor_selected)
colorbutton = gtk.ColorButton(self.bgcolor) colorbutton.connect('color-set', self.bgcolor_selected)
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
table_settings.attach(color_hbox, 1, 2, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table_settings.attach(gtk.Label(), 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) zoomlabel = gtk.Label() zoomlabel.set_markup('<b>' + _('Zoom Quality') + '</b>') zoomlabel.set_alignment(0, 1) table_settings.atta...
table_settings.attach(color_hbox, 1, 2, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table_settings.attach(gtk.Label(), 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) zoomlabel = gtk.Label() zoomlabel.set_markup('<b>' + _('Zoom Quality') + '</b>') zoomlabel.set_alignment(0, 1) table_settings.atta...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
table_behavior.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) openlabel = gtk.Label() openlabel.set_markup('<b>' + _('Open Behavior') + '</b>') openlabel.set_alignment(0, 1) table_behavior.attach(openlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_behavior.atta...
table_behavior.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) openlabel = gtk.Label() openlabel.set_markup('<b>' + _('Open Behavior') + '</b>') openlabel.set_alignment(0, 1) table_behavior.attach(openlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_behavior.atta...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
table_navigation.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) navlabel = gtk.Label() navlabel.set_markup('<b>' + _('Navigation') + '</b>') navlabel.set_alignment(0, 1) table_navigation.attach(navlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) mousewheelnav = gtk.Ch...
table_navigation.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) navlabel = gtk.Label() navlabel.set_markup('<b>' + _('Navigation') + '</b>') navlabel.set_alignment(0, 1) table_navigation.attach(navlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) mousewheelnav = gtk.Ch...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
table_slideshow.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) slideshowlabel = gtk.Label() slideshowlabel.set_markup('<b>' + _('Slideshow') + '</b>') slideshowlabel.set_alignment(0, 1) table_slideshow.attach(slideshowlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) h...
table_slideshow.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) slideshowlabel = gtk.Label() slideshowlabel.set_markup('<b>' + _('Slideshow') + '</b>') slideshowlabel.set_alignment(0, 1) table_slideshow.attach(slideshowlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) h...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
table_slideshow.attach(gtk.Label(), 1, 2, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) table_slideshow.attach(hbox_delay, 1, 2, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table_slideshow.attach(gtk.Label(), 1, 2, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) table_slideshow.attach(ss_in_fs,...
table_slideshow.attach(gtk.Label(), 1, 2, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) table_slideshow.attach(hbox_delay, 1, 2, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table_slideshow.attach(gtk.Label(), 1, 2, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) table_slideshow.attach(ss_in_fs,...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
table_editor.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) editorlabel = gtk.Label() editorlabel.set_markup('<b>' + _('External Image Editor') + '</b>') editorlabel.set_alignment(0, 1) table_editor.attach(editorlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_e...
table_editor.attach(gtk.Label(), 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) editorlabel = gtk.Label() editorlabel.set_markup('<b>' + _('External Image Editor') + '</b>') editorlabel.set_alignment(0, 1) table_editor.attach(editorlabel, 1, 2, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_e...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
notebook.append_page(table_behavior, gtk.Label(str=_("Behavior"))) notebook.append_page(table_navigation, gtk.Label(str=_("Navigation"))) notebook.append_page(table_settings, gtk.Label(str=_("Interface"))) notebook.append_page(table_slideshow, gtk.Label(str=_("Slideshow"))) notebook.append_page(table_editor, gtk.Label(...
notebook.append_page(table_behavior, gtk.Label(str=_("Behavior"))) notebook.append_page(table_navigation, gtk.Label(str=_("Navigation"))) notebook.append_page(table_settings, gtk.Label(str=_("Interface"))) notebook.append_page(table_slideshow, gtk.Label(str=_("Slideshow"))) notebook.append_page(table_editor, gtk.Label(...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.close_button = self.prefs_dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
self.close_button = self.prefs_dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
editorlabel.set_size_request(self.prefs_dialog.get_allocation().width-85, -1) self.close_button.grab_focus() response = self.prefs_dialog.run() if response == gtk.RESPONSE_CLOSE or response == gtk.RESPONSE_DELETE_EVENT: self.zoomvalue = float(zoompref.get_value()) if int(round(self.zoomvalue, 0)) == 1: self.zoom_qualit...
editorlabel.set_size_request(self.prefs_dialog.get_allocation().width-85, -1) self.close_button.grab_focus() response = self.prefs_dialog.run() if response == gtk.RESPONSE_CLOSE or response == gtk.RESPONSE_DELETE_EVENT: self.zoomvalue = float(zoompref.get_value()) if int(round(self.zoomvalue, 0)) == 1: self.zoom_qualit...
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.prefs_dialog.destroy() def use_fixed_dir_clicked(self, button): if button.get_active() == True: self.defaultdir.set_sensitive(True) else: self.defaultdir.set_sensitive(False)
self.prefs_dialog.destroy() def use_fixed_dir_clicked(self, button): if button.get_active() == True: self.defaultdir.set_sensitive(True) else: self.defaultdir.set_sensitive(False)
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
error_dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK, _('Unable to delete ') + self.currimg_name)
error_dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK, _('Unable to delete ') + self.currimg_name)
def delete_image(self, action): if len(self.image_list) > 0: temp_slideshow_mode = self.slideshow_mode if self.slideshow_mode == True: self.toggle_slideshow(None) delete_dialog = gtk.Dialog(_('Delete Image'), self.window, gtk.DIALOG_MODAL) if self.delete_without_prompt == False: permlabel = gtk.Label(_('Are you sure yo...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def defaultdir_clicked(self, button): getdir = gtk.FileChooserDialog(title=_("Choose directory"),action=gtk.FILE_CHOOSER_ACTION_OPEN,buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) getdir.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) getdir.set_filename(self.fixed_dir) getdir.set_defa...
def defaultdir_clicked(self, button): getdir = gtk.FileChooserDialog(title=_("Choose directory"),action=gtk.FILE_CHOOSER_ACTION_OPEN,buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) getdir.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) getdir.set_filename(self.fixed_dir) getdir.set_defa...
def defaultdir_clicked(self, button): getdir = gtk.FileChooserDialog(title=_("Choose directory"),action=gtk.FILE_CHOOSER_ACTION_OPEN,buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) getdir.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) getdir.set_filename(self.fixed_dir) getdir.set_defa...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.layout.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window2.modify_bg(gtk.STATE_NORMAL, self.bgcolor) def show_about(self, action):
self.layout.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window.modify_bg(gtk.STATE_NORMAL, self.bgcolor) self.slideshow_window2.modify_bg(gtk.STATE_NORMAL, self.bgcolor) def show_about(self, action):
def bgcolor_selected(self, widget): # When the user selects a color, store this color in self.bgcolor (which will
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/pixmaps/' + iconname): icon_path = '../share/pixmaps/' + iconname elif os.path.exists('/usr/local/share/pixmaps/' + iconname): icon_path = '/usr/local/share/pixmaps/' + iconname elif os.path.exists('/usr/share/pixmaps/' + iconname): icon_pa...
if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/pixmaps/' + iconname): icon_path = '../share/pixmaps/' + iconname elif os.path.exists('/usr/local/share/pixmaps/' + iconname): icon_path = '/usr/local/share/pixmaps/' + iconname elif os.path.exists('/usr/share/pixmaps/' + iconname): icon_pa...
def show_about(self, action): # Help > About
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if event.direction == gtk.gdk.SCROLL_UP: self.zoom_out(None) elif event.direction == gtk.gdk.SCROLL_DOWN: self.zoom_in(None) return True
if event.direction == gtk.gdk.SCROLL_UP: self.zoom_out(None) elif event.direction == gtk.gdk.SCROLL_DOWN: self.zoom_in(None) return True
def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL: # Zooming of the image by Ctrl-mousewheel
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if event.direction == gtk.gdk.SCROLL_UP: self.prev_img_in_list(None) elif event.direction == gtk.gdk.SCROLL_DOWN: self.next_img_in_list(None) return True def mouse_moved(self, widget, event):
if event.direction == gtk.gdk.SCROLL_UP: self.prev_img_in_list(None) elif event.direction == gtk.gdk.SCROLL_DOWN: self.next_img_in_list(None) return True def mouse_moved(self, widget, event):
def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL: # Zooming of the image by Ctrl-mousewheel
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
x, y, state = event.window.get_pointer() else: state = event.state x, y = event.x_root, event.y_root if (state & gtk.gdk.BUTTON2_MASK) or (state & gtk.gdk.BUTTON1_MASK): xadjust = self.layout.get_hadjustment() newx = xadjust.value + (self.prevmousex - x) if newx >= xadjust.lower and newx <= xadjust.upper - xadjust.page...
x, y, state = event.window.get_pointer() else: state = event.state x, y = event.x_root, event.y_root if (state & gtk.gdk.BUTTON2_MASK) or (state & gtk.gdk.BUTTON1_MASK): xadjust = self.layout.get_hadjustment() newx = xadjust.value + (self.prevmousex - x) if newx >= xadjust.lower and newx <= xadjust.upper - xadjust.page...
def mouse_moved(self, widget, event): # This handles the panning of the image
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if self.slideshow_controls_visible == False: gobject.source_remove(self.timer_id)
if self.slideshow_controls_visible == False: gobject.source_remove(self.timer_id)
def mouse_moved(self, widget, event): # This handles the panning of the image
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
gtk.main_iteration() self.timer_id = gobject.timeout_add(2000, self.hide_cursor) if y > 0.9*self.available_image_height(): self.slideshow_controls_show() else: self.slideshow_controls_hide() return True def button_pressed(self, widget, event): if self.image_loaded == True:
gtk.main_iteration() self.timer_id = gobject.timeout_add(2000, self.hide_cursor) if y > 0.9*self.available_image_height(): self.slideshow_controls_show() else: self.slideshow_controls_hide() return True def button_pressed(self, widget, event): if self.image_loaded == True:
def mouse_moved(self, widget, event): # This handles the panning of the image
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.change_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR)) self.prevmousex = event.x_root self.prevmousey = event.y_root
self.change_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR)) self.prevmousex = event.x_root self.prevmousey = event.y_root
def button_pressed(self, widget, event): if self.image_loaded == True: # Changes the cursor to the 'resize' cursor, like GIMP, on a middle click:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.UIManager.get_widget('/Popup').popup(None, None, None, event.button, event.time) return True def button_released(self, widget, event):
self.UIManager.get_widget('/Popup').popup(None, None, None, event.button, event.time) return True def button_released(self, widget, event):
def button_pressed(self, widget, event): if self.image_loaded == True: # Changes the cursor to the 'resize' cursor, like GIMP, on a middle click:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.change_cursor(None) return True def zoom_in(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/ViewMenu/In').get_property('sensitive') == True: self.currimg_zoomratio = self.currimg_zoomratio * 1.25 self.set_zoom_sensitivities() self.last_image_action_was_fit = False self.put_zoom_...
self.change_cursor(None) return True def zoom_in(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/ViewMenu/In').get_property('sensitive') == True: self.currimg_zoomratio = self.currimg_zoomratio * 1.25 self.set_zoom_sensitivities() self.last_image_action_was_fit = False self.put_zoom_...
def button_released(self, widget, event): # Resets the cursor when middle mouse button is released
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def zoom_to_fit_window(self, action, is_preloadimg):
def zoom_to_fit_window(self, action, is_preloadimg):
def zoom_to_fit_window(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
prewidth_ratio = float(preimg_width)/win_width preheight_ratio = float(preimg_height)/win_height if prewidth_ratio < preheight_ratio: premax_ratio = preheight_ratio else: premax_ratio = prewidth_ratio
prewidth_ratio = float(preimg_width)/win_width preheight_ratio = float(preimg_height)/win_height if prewidth_ratio < preheight_ratio: premax_ratio = preheight_ratio else: premax_ratio = prewidth_ratio
def zoom_to_fit_window(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if self.currimg_name != "" and (self.slideshow_mode == True or self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').get_property('sensitive') == True):
if self.currimg_name != "" and (self.slideshow_mode == True or self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').get_property('sensitive') == True):
def zoom_to_fit_window(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def zoom_to_fit_window(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
max_ratio = height_ratio
max_ratio = height_ratio
def zoom_to_fit_window(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
max_ratio = width_ratio
max_ratio = width_ratio
def zoom_to_fit_window(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.last_image_action_was_fit = True
self.last_image_action_was_fit = True
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
max_ratio = height_ratio
max_ratio = height_ratio
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
max_ratio = width_ratio
max_ratio = width_ratio
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
if self.first_image_load == True and self.currimg_zoomratio > 1:
if self.first_image_load == True and self.currimg_zoomratio > 1:
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.put_zoom_image_to_window(False)
self.put_zoom_image_to_window(False)
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def zoom_1_to_1(self, action, is_preloadimg):
def zoom_1_to_1(self, action, is_preloadimg):
def zoom_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.last_mode = self.open_mode_1to1
self.last_mode = self.open_mode_1to1
def zoom_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.put_zoom_image_to_window(False)
self.put_zoom_image_to_window(False)
def zoom_1_to_1(self, action, is_preloadimg):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def rotate_left(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/EditMenu/Rotate Left').get_property('sensitive') == True: if self.orientation == 0: self.orientation = 1 else: self.orientation = 0 self.location -= 1 if self.location == -1: self.location = 3 if self.last_image_action_wa...
def rotate_left(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/EditMenu/Rotate Left').get_property('sensitive') == True: if self.orientation == 0: self.orientation = 1 else: self.orientation = 0 self.location -= 1 if self.location == -1: self.location = 3 if self.last_image_action_wa...
def rotate_left(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/EditMenu/Rotate Left').get_property('sensitive') == True: if self.orientation == 0: self.orientation = 1 else: self.orientation = 0 self.location -= 1 if self.location == -1: self.location = 3 if self.last_image_action_wa...
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
self.randomlist = [] if self.curr_img_in_list > 0: self.curr_img_in_list -= 1 else: if self.listwrap_mode == 0: return elif self.listwrap_mode == 1: self.curr_img_in_list = len(self.image_list) - 1 else: if self.fullscreen_mode == True: self.change_cursor(None) dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL |...
self.randomlist = [] if self.curr_img_in_list > 0: self.curr_img_in_list -= 1 else: if self.listwrap_mode == 0: return elif self.listwrap_mode == 1: self.curr_img_in_list = len(self.image_list) - 1 else: if self.fullscreen_mode == True: self.change_cursor(None) dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL |...
def prev_img_in_list(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
def next_img_in_list(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1:
def next_img_in_list(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1:
def next_img_in_list(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1:
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py