rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def toggle_slideshow(self, action): if len(self.image_list) > 1: if self.slideshow_mode == False: if self.slideshow_in_fullscreen == True and self.fullscreen_mode == False: self.enter_fullscreen(None) self.slideshow_mode = True self.set_window_title() self.set_slideshow_sensitivities() if self.curr_slideshow_random == ...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def set_window_title(self): if len(self.image_list) == 0: self.window.set_title("Mirage") else: if self.slideshow_mode == True: self.window.set_title("Mirage - [" + str(self.curr_img_in_list+1) + ' ' + _('of') + ' ' + str(len(self.image_list)) + "] " + os.path.basename(self.currimg_name) + ' - ' + _('Slideshow Mode')) ...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def slideshow_controls_show(self): if self.slideshow_controls_visible == False and self.controls_moving == False: self.slideshow_controls_visible = True self.ss_delaycombo.set_active(self.curr_slideshow_delay) self.ss_randomize.set_active(self.curr_slideshow_random)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def slideshow_controls_show(self): if self.slideshow_controls_visible == False and self.controls_moving == False: self.slideshow_controls_visible = True self.ss_delaycombo.set_active(self.curr_slideshow_delay) self.ss_randomize.set_active(self.curr_slideshow_random)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def slideshow_controls_hide(self): if self.slideshow_controls_visible == True and self.controls_moving == False: self.slideshow_controls_visible = False ss_winheight = self.slideshow_window.allocation.height ss_win2width = self.slideshow_window2.allocation.width winheight = self.window.allocation.height winwidth = sel...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def slideshow_controls_hide(self): if self.slideshow_controls_visible == True and self.controls_moving == False: self.slideshow_controls_visible = False ss_winheight = self.slideshow_window.allocation.height ss_win2width = self.slideshow_window2.allocation.width winheight = self.window.allocation.height winwidth = sel...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def load_editor(self, action): if self.UIManager.get_widget('/MainMenu/EditMenu/Open in Editor').get_property('sensitive') == True: test = os.spawnlp(os.P_WAIT, self.editor, self.editor, self.currimg_name) if test == 127: error_dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_C...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def disable_screensaver_in_slideshow_mode(self): if self.slideshow_mode == True and self.disable_screensaver == True: test = os.spawnlp(os.P_WAIT, "/usr/bin/xscreensaver-command", "xscreensaver-command", "-deactivate") if test <> 127: timer_screensaver = gobject.timeout_add(1000, self.disable_screensaver_in_slideshow_m...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
transparency2 = gtk.Label(str(pixbuf.get_has_alpha())) animation2 = gtk.Label(str(not animtest.is_static_image()))
if pixbuf.get_has_alpha() == True: transparency2 = gtk.Label(_("Yes")) else: transparency2 = gtk.Label(_("No")) if animtest.is_static_image() == True: animation2 = gtk.Label(_("No")) else: animation2 = gtk.Label(_("Yes"))
def show_properties(self, action): show_props = gtk.Dialog(_("Properties"), self.window) show_props.set_has_separator(False) show_props.set_resizable(False) table = gtk.Table(3, 3, False) image = gtk.Image() animtest = gtk.gdk.PixbufAnimation(self.currimg_name) if animtest.is_static_image() == True: pixbuf, image_width...
4d9338c48bbf14749cd94f731eafa4bc0289bf0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/4d9338c48bbf14749cd94f731eafa4bc0289bf0c/mirage.py
temp_pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, self.currimg_pixbuf_original.get_has_alpha(), 8, coords[2], coords[3])
temp_pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, self.currimg_pixbuf_original.get_has_alpha(), 8, self.coords[2], self.coords[3])
def crop_image(self, action): dialog = gtk.Dialog(_("Crop Image"), self.window, gtk.DIALOG_MODAL, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT)) cropbutton = dialog.add_button(_("Crop"), gtk.RESPONSE_ACCEPT) cropimage = gtk.Image() cropimage.set_from_stock(gtk.STOCK_OK, gtk.ICON_SIZE_BUTTON) cropbutton.set_image(cropimage) i...
4d9338c48bbf14749cd94f731eafa4bc0289bf0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/4d9338c48bbf14749cd94f731eafa4bc0289bf0c/mirage.py
('Ctrl-KP_Add', None, '', '<Ctrl>KP_Add', _('Zoom In'), self.zoom_in)
('Ctrl-KP_Add', None, '', '<Ctrl>KP_Add', _('Zoom In'), self.zoom_in), ('Ctrl-KP_0', None, '', '<Ctrl>KP_0', _('Fit'), self.zoom_to_fit_window_action), ('Ctrl-KP_1', None, '', '<Ctrl>KP_1', _('1:1'), self.zoom_1_to_1_action)
def __init__(self):
eef84d1cfd5318f1484bf70b64fb4ad5f6f0a9ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/eef84d1cfd5318f1484bf70b64fb4ad5f6f0a9ee/mirage.py
print event.keyval, event.state
def topwindow_keypress(self, widget, event):
073c2e52b471c10d449c7c409a44b2f85bb51fc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/073c2e52b471c10d449c7c409a44b2f85bb51fc0/mirage.py
elif event.keyval == 61:
elif event.keyval == 61 or event.keyval == 43:
def topwindow_keypress(self, widget, event):
073c2e52b471c10d449c7c409a44b2f85bb51fc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/073c2e52b471c10d449c7c409a44b2f85bb51fc0/mirage.py
if event.keyval == 43:
if event.keyval == 43 or event.keyval == 61:
def topwindow_keypress(self, widget, event):
073c2e52b471c10d449c7c409a44b2f85bb51fc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/073c2e52b471c10d449c7c409a44b2f85bb51fc0/mirage.py
if set_prev_to_none == True: self.preloadimg_prev_pixbuf_original = None elif set_next_to_none == True: self.preloadimg_next_pixbuf_original = None
def load_new_image(self, use_preloadimg_next, use_preloadimg_prev, use_current_pixbuf_original, reset_cursor, perform_onload_action): # If use_current_pixbuf_original == True, do not reload the # self.currimg_pixbuf_original from the file; instead, use the existing # one. This is only currently useful for resizing imag...
1c4bb3d299fc26fcc231510ddd71eda0817b02b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/1c4bb3d299fc26fcc231510ddd71eda0817b02b2/mirage.py
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:
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:
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: if event.keyval == 65361: # Left arrow
1c17d458f65b213687f9e04befcc4d29dbae7a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/1c17d458f65b213687f9e04befcc4d29dbae7a76/mirage.py
gtk.Tooltips().set_tip(combobox, _("Smart mode uses 1:1 for images smaller than the window and Fit To Window for images larger."))
def prefs_show(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: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
1eb3359a8028a7212f1168db38b46c4a70b28a27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/1eb3359a8028a7212f1168db38b46c4a70b28a27/mirage.py
else:
elif self.listwrap_mode > 0:
def preload_next_image(self, use_existing_image): if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) else: temp_name = str(self.image_list[0]) if temp_name == se...
1eb3359a8028a7212f1168db38b46c4a70b28a27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/1eb3359a8028a7212f1168db38b46c4a70b28a27/mirage.py
else:
elif self.listwrap_mode > 0:
def preload_prev_image(self, use_existing_image): if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list - 1 >= 0: temp_name = str(self.image_list[self.curr_img_in_list-1]) else: temp_name = str(self.image_list[len(self.image_list)-1]) if temp_name == se...
1eb3359a8028a7212f1168db38b46c4a70b28a27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/1eb3359a8028a7212f1168db38b46c4a70b28a27/mirage.py
init_image = os.path.abspath(inputlist[0])
def expand_filelist_and_load_image(self, inputlist): self.images_found = 0 self.stop_now = True # Make sure that any previous search process is stopped # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found; returns new list self.change_cursor(gtk.gdk.Cur...
1eb3359a8028a7212f1168db38b46c4a70b28a27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/1eb3359a8028a7212f1168db38b46c4a70b28a27/mirage.py
self.max_zoomratio = 5 self.min_zoomratio = 0.1
self.max_zoomratio = 5 self.min_zoomratio = 0.1
def __init__(self):
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.open_all_images = False
self.open_all_images = False
def __init__(self):
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.listwrap_mode = 0 self.user_prompt_visible = False self.slideshow_delay = 1
self.listwrap_mode = 0 self.user_prompt_visible = False self.slideshow_delay = 1
def __init__(self):
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
('Previous Image', gtk.STOCK_GO_BACK, _('_Previous Image'), 'Left', _('Previous Image'), self.img_in_list_prev), ('Next Image', gtk.STOCK_GO_FORWARD, _('_Next Image'), 'Right', _('Next Image'), self.img_in_list_next), ('Previous2', gtk.STOCK_GO_BACK, _('_Previous'), 'Left', _('Previous'), self.img_in_list_prev), ('Next...
('Previous Image', gtk.STOCK_GO_BACK, _('_Previous Image'), 'Left', _('Previous Image'), self.goto_prev_image), ('Next Image', gtk.STOCK_GO_FORWARD, _('_Next Image'), 'Right', _('Next Image'), self.goto_next_image), ('Previous2', gtk.STOCK_GO_BACK, _('_Previous'), 'Left', _('Previous'), self.goto_prev_image), ('Next2',...
def __init__(self):
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
('Space', None, '', 'space', _('Next'), self.img_in_list_next),
('Space', None, '', 'space', _('Next'), self.goto_next_image),
def __init__(self):
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
ss_back.connect('clicked', self.img_in_list_prev)
ss_back.connect('clicked', self.goto_prev_image)
def __init__(self):
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
ss_forward.connect('clicked', self.img_in_list_next)
ss_forward.connect('clicked', self.goto_next_image)
def __init__(self):
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.img_in_list_prev(None)
self.goto_prev_image(None)
def topwindow_keypress(self, widget, event): # For whatever reason, 'Left' and 'Right' cannot be used as menu # accelerators so we will manually check for them here: 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 ...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.img_in_list_next(None)
self.goto_next_image(None)
def topwindow_keypress(self, widget, event): # For whatever reason, 'Left' and 'Right' cannot be used as menu # accelerators so we will manually check for them here: 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 ...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.img_in_list_next(None)
self.goto_next_image(None)
def parse_action_command2(self, command, imagename): # First, replace any property keywords with their flags: if "%F" in command: command = command.replace("%F", imagename) if "%N" in command: command = command.replace("%N", os.path.splitext(os.path.basename(imagename))[0]) if "%P" in command: command = command.replace...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.img_in_list_prev(None)
self.goto_prev_image(None)
def parse_action_command2(self, command, imagename): # First, replace any property keywords with their flags: if "%F" in command: command = command.replace("%F", imagename) if "%N" in command: command = command.replace("%N", os.path.splitext(os.path.basename(imagename))[0]) if "%P" in command: command = command.replace...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_random_image, "ss")
def delay_changed(self, action): self.curr_slideshow_delay = self.ss_delaycombo.get_active() if self.slideshow_mode == True: gobject.source_remove(self.timer_delay) if self.curr_slideshow_random == True: self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_next, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_next_image, "ss")
def delay_changed(self, action): self.curr_slideshow_delay = self.ss_delaycombo.get_active() if self.slideshow_mode == True: gobject.source_remove(self.timer_delay) if self.curr_slideshow_random == True: self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.img_in_list_prev(None)
self.goto_prev_image(None)
def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL: # Zooming of the image by Ctrl-mousewheel if event.state == gtk.gdk.CONTROL_MASK: if event.direction == gtk.gdk.SCROLL_UP: self.zoom_out(None) elif event.direction == gtk.gdk.SCROLL_DOWN: self.zoom_in(None) return True # Navigation of images...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.img_in_list_next(None)
self.goto_next_image(None)
def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL: # Zooming of the image by Ctrl-mousewheel if event.state == gtk.gdk.CONTROL_MASK: if event.direction == gtk.gdk.SCROLL_UP: self.zoom_out(None) elif event.direction == gtk.gdk.SCROLL_DOWN: self.zoom_in(None) return True # Navigation of images...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
def img_in_list_prev(self, action):
def goto_prev_image(self, action):
def img_in_list_prev(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
currimg_location = self.location currimg_orientation = self.orientation
if self.location != 0 or self.orientation != 0 or self.zoomlevel_changed == True: regenerate_next_preload_img = True else: regenerate_next_preload_img = False
def img_in_list_prev(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_random_image, "ss")
def img_in_list_prev(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_next, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_next_image, "ss")
def img_in_list_prev(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
if currimg_location != 0 or currimg_orientation != 0:
if regenerate_next_preload_img == True:
def img_in_list_prev(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
def img_in_list_next(self, action):
def goto_next_image(self, action):
def img_in_list_next(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
currimg_location = self.location
if self.location != 0 or self.orientation != 0 or self.zoomlevel_changed == True: regenerate_prev_preload_img = True else: regenerate_prev_preload_img = False
def img_in_list_next(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_random_image, "ss")
def img_in_list_next(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_next, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_next_image, "ss")
def img_in_list_next(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
if currimg_location != 0 or currimg_orientation != 0:
if regenerate_prev_preload_img == True:
def img_in_list_next(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) currimg_location = self.location currimg_orientation = self.orientation if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_i...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
def img_in_list_random(self, action):
def goto_random_image(self, action):
def img_in_list_random(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass if self.randomlist == []: self.reinitialize_randoml...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_random_image, "ss")
def img_in_list_random(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass if self.randomlist == []: self.reinitialize_randoml...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_next, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_next_image, "ss")
def img_in_list_random(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass if self.randomlist == []: self.reinitialize_randoml...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
def img_in_list_first(self, action):
def goto_first_image(self, action):
def img_in_list_first(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1 and self.curr_img_in_list != 0: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass self.randomlist = [] ...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_random_image, "ss")
def img_in_list_first(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1 and self.curr_img_in_list != 0: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass self.randomlist = [] ...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_next, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_next_image, "ss")
def img_in_list_first(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1 and self.curr_img_in_list != 0: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass self.randomlist = [] ...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
def img_in_list_last(self, action):
def goto_last_image(self, action):
def img_in_list_last(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1 and self.curr_img_in_list != len(self.image_list)-1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass s...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_random_image, "ss")
def img_in_list_last(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1 and self.curr_img_in_list != len(self.image_list)-1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass s...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_next, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_next_image, "ss")
def img_in_list_last(self, action): if self.slideshow_mode == True and action != "ss": gobject.source_remove(self.timer_delay) if len(self.image_list) > 1 and self.curr_img_in_list != len(self.image_list)-1: try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass s...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_next, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_next_image, "ss")
def toggle_slideshow(self, action): if len(self.image_list) > 1: if self.slideshow_mode == False: if self.slideshow_in_fullscreen == True and self.fullscreen_mode == False: self.enter_fullscreen(None) self.slideshow_mode = True self.update_title() self.set_slideshow_sensitivities() if self.curr_slideshow_random == Fals...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.img_in_list_random, "ss")
self.timer_delay = gobject.timeout_add(self.delayoptions[self.curr_slideshow_delay]*1000, self.goto_random_image, "ss")
def toggle_slideshow(self, action): if len(self.image_list) > 1: if self.slideshow_mode == False: if self.slideshow_in_fullscreen == True and self.fullscreen_mode == False: self.enter_fullscreen(None) self.slideshow_mode = True self.update_title() self.set_slideshow_sensitivities() if self.curr_slideshow_random == Fals...
80bd8b120d791a7c2ba16ac790e82ce97ab073e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/80bd8b120d791a7c2ba16ac790e82ce97ab073e3/mirage.py
self.toolbar.set_property('visible', self.toolbar_show)
def __init__(self):
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.statusbar.set_property('visible', self.statusbar_show) self.statusbar2.set_property('visible', self.statusbar_show)
def __init__(self):
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.layout.set_flags(gtk.CAN_FOCUS) self.window.set_focus(self.layout)
def __init__(self):
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.zoom_to_fit_window(None, False, False)
if self.last_image_action_was_smart_fit == True: self.zoom_to_fit_or_1_to_1(None, False, False) else: self.zoom_to_fit_window(None, False, False)
def gconf_key_changed(self, client, cnxn_id, entry, label): if entry.value.type == gconf.VALUE_STRING: style = entry.value.to_string() if style == "both": self.toolbar.set_style(gtk.TOOLBAR_BOTH) elif style == "both-horiz": self.toolbar.set_style(gtk.TOOLBAR_BOTH_HORIZ) elif style == "icons": self.toolbar.set_style(gtk...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.zoom_to_fit_window(None, False, False)
if self.last_image_action_was_smart_fit == True: self.zoom_to_fit_or_1_to_1(None, False, False) else: self.zoom_to_fit_window(None, False, False)
def window_resized(self, widget, allocation): # Update the image size on window resize if the current image was last fit: if self.image_loaded == True: 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, Fal...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
return
return True
def delete_event(self, widget, event, data=None): cancel = self.autosave_image() if cancel == True: return self.stop_now = True self.closing_app = True self.save_settings() sys.exit(0) return False
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
return False
def delete_event(self, widget, event, data=None): cancel = self.autosave_image() if cancel == True: return self.stop_now = True self.closing_app = True self.save_settings() sys.exit(0) return False
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
return
return True
def destroy(self, event, data=None): cancel = self.autosave_image() if cancel == True: return self.stop_now = True self.closing_app = True self.save_settings() return False
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
return False
def destroy(self, event, data=None): cancel = self.autosave_image() if cancel == True: return self.stop_now = True self.closing_app = True self.save_settings() return False
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
return
return True
def exit_app(self, action): cancel = self.autosave_image() if cancel == True: return self.stop_now = True self.closing_app = True self.save_settings() sys.exit(0)
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.first_image_load = False
def put_zoom_image_to_window(self, currimg_preloaded): self.window.window.freeze_updates() if currimg_preloaded == False: # Always start with the original image to preserve quality! # Calculate image size: finalimg_width = int(self.currimg_pixbuf_original.get_width() * self.currimg_zoomratio) finalimg_height = int(self...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.zoom_to_fit_window(None, False, False)
if self.last_image_action_was_smart_fit == True: self.zoom_to_fit_or_1_to_1(None, False, False) else: self.zoom_to_fit_window(None, False, False)
def toggle_status_bar(self, action): if self.statusbar.get_property('visible') == True: self.statusbar.hide() self.statusbar2.hide() self.statusbar_show = False else: self.statusbar.show() self.statusbar2.show() self.statusbar_show = True if self.image_loaded == True and self.last_image_action_was_fit == True: self.zoo...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.zoom_to_fit_window(None, False, False)
if self.last_image_action_was_smart_fit == True: self.zoom_to_fit_or_1_to_1(None, False, False) else: self.zoom_to_fit_window(None, False, False)
def toggle_toolbar(self, action): if self.toolbar.get_property('visible') == True: self.toolbar.hide() self.toolbar_show = False else: self.toolbar.show() self.toolbar_show = True if self.image_loaded == True and self.last_image_action_was_fit == True: self.zoom_to_fit_window(None, False, False)
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.last_image_action_was_fit = True
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg_next, is_preloadimg_prev): if is_preloadimg_next == True: if self.preloading_images == True and self.preloadimg_next_pixbuf_original != None: win_width = self.available_image_width() win_height = self.available_image_height() preimg_width = self.preloadimg_next_pixb...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
if self.first_image_load == True and self.currimg_zoomratio > 1:
if self.currimg_zoomratio > 1:
def zoom_to_fit_or_1_to_1(self, action, is_preloadimg_next, is_preloadimg_prev): if is_preloadimg_next == True: if self.preloading_images == True and self.preloadimg_next_pixbuf_original != None: win_width = self.available_image_width() win_height = self.available_image_height() preimg_width = self.preloadimg_next_pixb...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.zoom_to_fit_or_1_to_1(None, False, False)
if self.last_image_action_was_smart_fit == True: self.zoom_to_fit_or_1_to_1(None, False, False) else: self.zoom_to_fit_window(None, False, False)
def rotate_left(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/EditMenu/Rotate Left').get_property('sensitive') == True: self.currimg_pixbuf_original = self.image_rotate(self.currimg_pixbuf_original, 90) if self.last_image_action_was_fit == True: self.zoom_to_fit_or_1_to_1(None, Fals...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.zoom_to_fit_or_1_to_1(None, False, False)
if self.last_image_action_was_smart_fit == True: self.zoom_to_fit_or_1_to_1(None, False, False) else: self.zoom_to_fit_window(None, False, False)
def rotate_right(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/EditMenu/Rotate Right').get_property('sensitive') == True: self.currimg_pixbuf_original = self.image_rotate(self.currimg_pixbuf_original, 270) if self.last_image_action_was_fit == True: self.zoom_to_fit_or_1_to_1(None, F...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
self.first_image_load = True
def load_new_image(self, use_preloadimg_next, use_preloadimg_prev, use_current_pixbuf_original, reset_cursor, perform_onload_action): # If use_current_pixbuf_original == True, do not reload the # self.currimg_pixbuf_original from the file; instead, use the existing # one. This is only currently useful for resizing imag...
d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py
if coords[0] < 0: coords[0] = 0 if coords[1] < 0: coords[1] = 0
def crop_image(self, action): dialog = gtk.Dialog(_("Crop Image"), self.window, gtk.DIALOG_MODAL, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT)) dialog.add_button(_("Crop"), gtk.RESPONSE_ACCEPT) image = gtk.DrawingArea() # Create a pixbuf that fits in a window of 400x400 image_width = self.currimg_pixbuf_original.get_width()...
8c8dca1702362c90e4fd84a2d7547a472311fb62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/8c8dca1702362c90e4fd84a2d7547a472311fb62/mirage.py
('Fit', gtk.STOCK_ZOOM_FIT, _('Zoom To _Fit'), '<Ctrl>0', _('Fit'), self.zoom_to_fit_window(None, False)), ('1:1', gtk.STOCK_ZOOM_100, _('_1:1'), '<Ctrl>1', _('1:1'), self.zoom_1_to_1(None, False)),
('Fit', gtk.STOCK_ZOOM_FIT, _('Zoom To _Fit'), '<Ctrl>0', _('Fit'), self.zoom_to_fit_window_action), ('1:1', gtk.STOCK_ZOOM_100, _('_1:1'), '<Ctrl>1', _('1:1'), self.zoom_1_to_1_action),
def __init__(self):
b4a0ee360b15b5680b1041249596f39928258743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/b4a0ee360b15b5680b1041249596f39928258743/mirage.py
def zoom_to_fit_window(self, action, is_preloadimg):
b4a0ee360b15b5680b1041249596f39928258743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/b4a0ee360b15b5680b1041249596f39928258743/mirage.py
self.editor = "gimp-remote"
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
opts, args = getopt.getopt(sys.argv[1:], "hRvVsf", ["help", "version", "recursive", "verbose", "slideshow", "fullscreen"])
opts, args = getopt.getopt(sys.argv[1:], "hRvVsfo:", ["help", "version", "recursive", "verbose", "slideshow", "fullscreen", "onload="])
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
self.editor = conf.get('prefs', 'editor')
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
('Open Image', gtk.STOCK_OPEN, _('_Open Image...'), '<control>O', _('Open Image'), self.open_file), ('Open Folder', gtk.STOCK_OPEN, _('Open _Folder...'), '<control>F', _('Open Folder'), self.open_folder), ('Quit', gtk.STOCK_QUIT, _('_Quit'), '<control>Q', _('Quit'), self.exit_app),
('Open Image', gtk.STOCK_OPEN, _('_Open Image...'), '<Ctrl>O', _('Open Image'), self.open_file), ('Open Folder', gtk.STOCK_OPEN, _('Open _Folder...'), '<Ctrl>F', _('Open Folder'), self.open_folder), ('Quit', gtk.STOCK_QUIT, _('_Quit'), '<Ctrl>Q', _('Quit'), self.exit_app),
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
('Preferences', gtk.STOCK_PREFERENCES, _('_Preferences'), None, _('Preferences'), self.prefs_show),
('Preferences', gtk.STOCK_PREFERENCES, _('_Preferences...'), None, _('Preferences'), self.prefs_show),
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
('Open in Editor', gtk.STOCK_EXECUTE, _('Open in _Editor'), '<Ctrl>E', _('Open in Editor'), self.load_editor), ('Delete Image', gtk.STOCK_DELETE, _('Delete Image'), 'Delete', _('Delete Image'), self.delete_image)
('Delete Image', gtk.STOCK_DELETE, _('_Delete Image'), 'Delete', _('Delete Image'), self.delete_image), ('Custom Actions', None, _('Custom _Actions...'), None, _('Custom Actions'), self.custom_actions_show), ('MiscKeysMenuHidden', None, 'Keys'), ('Escape', None, '', 'Escape', _('Exit Full Screen'), self.leave_fullscree...
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
<menuitem action="Open in Editor"/> <separator name="FM2"/>
<menuitem action="Custom Actions"/>
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
if event.keyval == 65361:
if event.keyval == gtk.gdk.keyval_from_name('Left'):
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...
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
elif event.keyval == 65363 or event.keyval == 32:
return elif event.keyval == gtk.gdk.keyval_from_name('Right'):
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...
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
elif event.keyval == 65360: self.first_img_in_list(None) elif event.keyval == 65367: self.last_img_in_list(None) elif event.keyval == 65307: self.leave_fullscreen(None) elif event.keyval == 45: self.zoom_out(None) elif event.keyval == 61 or event.keyval == 43: self.zoom_in(None) elif event.state == gtk.gdk.CONTROL_MA...
return shortcut = gtk.accelerator_name(event.keyval, event.state) if "<Mod2>" in shortcut: shortcut = shortcut.replace("<Mod2>", "") for i in range(len(self.action_shortcuts)): try: if shortcut == self.action_shortcuts[i]: self.parse_action_command(self.action_commands[i], self.action_batch[i]) except: pass def parse...
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...
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
self.UIManager.get_widget('/MainMenu/EditMenu/Open in Editor').set_sensitive(enable)
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...
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
print _(" -h, --help Show this help and exit") print _(" -v, --version Show version information and exit") print _(" -V, --verbose Show more detailed information") print _(" -R, --recursive Recursively include all images found in") print _(" subdirectories of FOLDERS") print _(" -s, --slidesho...
print _(" -h, --help Show this help and exit") print _(" -v, --version Show version information and exit") print _(" -V, --verbose Show more detailed information") print _(" -R, --recursive Recursively include all images found in") print _(" subdirectories of FOLDE...
def print_usage(self): self.print_version() print "" print _("Usage: mirage [OPTION]... FILES|FOLDERS...") print "" print _("Options:") print _(" -h, --help Show this help and exit") print _(" -v, --version Show version information and exit") print _(" -V, --verbose Show more detailed information") print _(" ...
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
conf.set('prefs', 'editor', self.editor)
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...
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
gtk.Tooltips().set_tip(disable_screensaver, _("If enabled, Mirage will attempt to temporarily disable xscreensaver during slideshow mode."))
gtk.Tooltips().set_tip(disable_screensaver, _("If enabled, xscreensaver will be temporarily disabled during slideshow mode."))
def prefs_show(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: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
gtk.Tooltips().set_tip(ss_in_fs, _("If enabled, Mirage will switch to fullscreen when a slideshow is started."))
gtk.Tooltips().set_tip(ss_in_fs, _("If enabled, starting a slideshow will put the application in fullscreen mode."))
def prefs_show(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: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
table_editor = gtk.Table(13, 2, False) 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.EXP...
def prefs_show(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: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
notebook.append_page(table_editor, gtk.Label(str=_("Editor")))
def prefs_show(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: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
self.prefs_dialog.realize() editorlabel.set_size_request(self.prefs_dialog.get_allocation().width-85, -1)
def prefs_show(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: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
self.editor = editortext.get_text()
def prefs_show(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: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
self.zoom_to_fit_window(action, False)
self.zoom_to_fit_window(action, False, False)
def zoom_to_fit_window_action(self, action): self.zoom_to_fit_window(action, False)
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
self.zoom_1_to_1(action, False)
self.zoom_1_to_1(action, False, False)
def zoom_1_to_1_action(self, action): self.zoom_1_to_1(action, False)
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[0]) else:
try: if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[0]) else: return if temp_name == self.preloa...
def preload_next_image(self, use_existing_image): if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list + 1 <= len(self.image_list)-1: temp_name = str(self.image_list[self.curr_img_in_list+1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list...
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py