rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
self.load_new_image(False, False, False, True, False) | self.load_new_image2(False, False, True, False) | def parse_action_command(self, command, batchmode): self.running_custom_actions = True self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() self.curr_custom_action = 0 if batchmode == True: self.num_custom_actions = len(self.image_list) for i in range(self.num_custom_action... |
self.preloadimg_prev_pixbuf_original = None | self.preloadimg_prev_in_list = -1 | def parse_action_command(self, command, batchmode): self.running_custom_actions = True self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() self.curr_custom_action = 0 if batchmode == True: self.num_custom_actions = len(self.image_list) for i in range(self.num_custom_action... |
self.preloadimg_next_pixbuf_original = None | self.preloadimg_next_in_list = -1 | def parse_action_command(self, command, batchmode): self.running_custom_actions = True self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() self.curr_custom_action = 0 if batchmode == True: self.num_custom_actions = len(self.image_list) for i in range(self.num_custom_action... |
print cmdstr | 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... | |
elif commands[i] == "[NEXT]": | if commands[i] == "[NEXT]": | 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... |
self.UIManager.get_widget('/MainMenu/FileMenu/Properties').set_sensitive(True) filetype = gtk.gdk.pixbuf_get_file_info(self.currimg_name)[0]['name'] if self.filetype_is_writable(filetype) == True: self.UIManager.get_widget('/MainMenu/FileMenu/Save').set_sensitive(enable) | try: filetype = gtk.gdk.pixbuf_get_file_info(self.currimg_name)[0]['name'] self.UIManager.get_widget('/MainMenu/FileMenu/Properties').set_sensitive(True) if self.filetype_is_writable(filetype) == True: self.UIManager.get_widget('/MainMenu/FileMenu/Save').set_sensitive(enable) except: self.UIManager.get_widget('/MainMen... | 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... |
try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass | self.load_new_image_stop_now() | 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: if self.last_image_action_was_smart_fit ... |
self.preloadimg_next_pixbuf_original = None self.preloadimg_prev_pixbuf_original = None | self.preloadimg_next_in_list = -1 self.preloadimg_prev_in_list = -1 | def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(_("Mirage Preferences"), self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # "Interface" prefs: table_settings = gtk.Table(13, 3, False) bglabel = gtk.Label() bglabel.set_markup('<b>' + _('Interface') + '</b>') bgl... |
use_preloadimg_next = True use_preloadimg_prev = False | 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.confirm_delete == True: permlabel = gtk.Label(_('Are you sure you wish t... | |
use_preloadimg_next = False use_preloadimg_prev = False | 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.confirm_delete == True: permlabel = gtk.Label(_('Are you sure you wish t... | |
use_preloadimg_next = False use_preloadimg_prev = True | 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.confirm_delete == True: permlabel = gtk.Label(_('Are you sure you wish t... | |
gtk.main_iteration() try: self.load_new_image(use_preloadimg_next, use_preloadimg_prev, False, True, True) except: self.image_load_failed(True) | self.preloadimg_prev_in_list = -1 self.preloadimg_next_in_list = -1 self.load_when_idle = gobject.idle_add(self.load_new_image, False, False, True, True, True, True) | 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.confirm_delete == True: permlabel = gtk.Label(_('Are you sure you wish t... |
self.preloadimg_next_pixbuf_original = None self.preloadimg_prev_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_prev_image, False) | 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.confirm_delete == True: permlabel = gtk.Label(_('Are you sure you wish t... | |
if self.preloading_images == True and self.preloadimg_next_pixbuf_original != None: | if self.preloading_images == True and self.preloadimg_next_in_list != -1: | def zoom_to_fit_window(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_pixbuf_... |
if self.preloading_images == True and self.preloadimg_prev_pixbuf_original != None: | if self.preloading_images == True and self.preloadimg_prev_in_list != -1: | def zoom_to_fit_window(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_pixbuf_... |
if self.preloading_images == True and self.preloadimg_next_pixbuf_original != None: | if self.preloading_images == True and self.preloadimg_next_in_list != -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... |
if self.preloading_images == True and self.preloadimg_prev_pixbuf_original != None: | if self.preloading_images == True and self.preloadimg_prev_in_list != -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... |
self.load_new_image(False, False, True, False, False) | self.load_new_image2(False, True, False, False) | 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... |
self.load_new_image(False, False, True, False, False) | self.load_new_image2(False, True, False, False) | def resize_image(self, action): dialog = gtk.Dialog(_("Resize Image"), self.window, gtk.DIALOG_MODAL, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT)) resizebutton = dialog.add_button(_("Resize"), gtk.RESPONSE_ACCEPT) resizeimage = gtk.Image() resizeimage.set_from_stock(gtk.STOCK_OK, gtk.ICON_SIZE_BUTTON) resizebutton.set_imag... |
try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass | self.load_new_image_stop_now() | def goto_prev_image(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 cancel = self.autosave_image() if cancel == True: retu... |
gtk.main_iteration() try: self.load_new_image(False, True, False, True, True) except: self.image_load_failed(True) | self.load_when_idle = gobject.idle_add(self.load_new_image, True, False, True, True, True, True) | def goto_prev_image(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 cancel = self.autosave_image() if cancel == True: retu... |
self.preload_when_idle = gobject.idle_add(self.preload_prev_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_next_image, False) | def goto_prev_image(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 cancel = self.autosave_image() if cancel == True: retu... | |
try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass | self.load_new_image_stop_now() | def goto_next_image(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 cancel = self.autosave_image() if cancel == True: retu... |
gtk.main_iteration() try: self.load_new_image(True, False, False, True, True) except: self.image_load_failed(True) | self.load_when_idle = gobject.idle_add(self.load_new_image, False, False, True, True, True, True) | def goto_next_image(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 cancel = self.autosave_image() if cancel == True: retu... |
self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_prev_image, False) | def goto_next_image(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 cancel = self.autosave_image() if cancel == True: retu... | |
try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass | self.load_new_image_stop_now() | def goto_random_image(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 cancel = self.autosave_image() if cancel == True: re... |
gtk.main_iteration() try: self.load_new_image(False, False, False, True, True) except: self.image_load_failed(True) | self.load_when_idle = gobject.idle_add(self.load_new_image, False, False, True, True, True, True) | def goto_random_image(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 cancel = self.autosave_image() if cancel == True: re... |
self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_prev_image, False) | def goto_random_image(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 cancel = self.autosave_image() if cancel == True: re... | |
try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass | self.load_new_image_stop_now() | def goto_first_image(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 cancel = self.autosave... |
gtk.main_iteration() try: self.load_new_image(False, False, False, True, True) except: self.image_load_failed(True) | self.load_when_idle = gobject.idle_add(self.load_new_image, False, False, True, True, True, True) | def goto_first_image(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 cancel = self.autosave... |
self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_prev_image, False) | def goto_first_image(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 cancel = self.autosave... | |
try: gobject.source_remove(self.preload_when_idle) gobject.source_remove(self.preload_when_idle2) except: pass | self.load_new_image_stop_now() | def goto_last_image(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 ca... |
gtk.main_iteration() try: self.load_new_image(False, False, False, True, True) except: self.image_load_failed(True) | self.load_when_idle = gobject.idle_add(self.load_new_image, False, False, True, True, True, True) | def goto_last_image(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 ca... |
self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_prev_image, False) | def goto_last_image(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 ca... | |
def load_new_image(self, use_preloadimg_next, use_preloadimg_prev, use_current_pixbuf_original, reset_cursor, perform_onload_action): set_prev_to_none = False set_next_to_none = False if use_preloadimg_next == True and self.preloading_images == True: if self.image_modified == False and self.image_zoomed == False: | def load_new_image_stop_now(self): try: gobject.source_remove(self.load_when_idle) except: pass try: gobject.source_remove(self.preload_when_idle) except: pass try: gobject.source_remove(self.preload_when_idle2) except: pass def load_new_image(self, check_prev_last, use_current_pixbuf_original, reset_cursor, perform_o... | 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... |
if self.preloadimg_next_pixbuf_original != None: | elif prev_index == self.preloadimg_next_in_list: self.preloadimg_prev_in_list = self.preloadimg_next_in_list self.preloadimg_prev_name = self.preloadimg_next_name self.preloadimg_prev_width = self.preloadimg_next_width self.preloadimg_prev_height = self.preloadimg_next_height self.preloadimg_prev_pixbuf = self.preloadi... | 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... |
set_next_to_none = True | used_next = 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... |
elif use_preloadimg_prev == True and self.preloading_images == True: if self.image_modified == False and self.image_zoomed == False: self.preloadimg_next_name = self.currimg_name self.preloadimg_next_width = self.currimg_width self.preloadimg_next_height = self.currimg_height self.preloadimg_next_pixbuf = self.currimg... | return used_prev, used_next def load_new_image2(self, check_prev_last, use_current_pixbuf_original, reset_cursor, perform_onload_action): next_index = self.curr_img_in_list + 1 if next_index > len(self.image_list)-1: if self.listwrap_mode == 0: next_index = -1 else: next_index = 0 prev_index = self.curr_img_i... | 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... |
if (use_preloadimg_next == False and use_preloadimg_prev == False) or (use_preloadimg_next == True and self.preloadimg_next_pixbuf_original == None) or (use_preloadimg_prev == True and self.preloadimg_prev_pixbuf_original == None) or self.preloading_images == False: | else: | 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... |
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... | |
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: | next_index = self.curr_img_in_list + 1 if next_index > len(self.image_list)-1: if self.listwrap_mode == 0: self.preloadimg_next_in_list == -1 return else: next_index = 0 if next_index == self.preloadimg_next_in_list: | def preload_next_image(self, use_existing_image): 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... |
if temp_name == self.preloadimg_next_name and self.preloadimg_next_pixbuf_original != None: return else: self.preloadimg_next_name = temp_name | self.preloadimg_next_in_list = next_index self.preloadimg_next_name = str(self.image_list[next_index]) | def preload_next_image(self, use_existing_image): 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... |
if self.preloadimg_next_pixbuf_original == None: | if self.preloadimg_next_in_list == -1: | def preload_next_image(self, use_existing_image): 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... |
self.preloadimg_next_pixbuf_original = None | self.preloadimg_next_in_list = -1 | def preload_next_image(self, use_existing_image): 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... |
if self.curr_img_in_list - 1 >= 0: temp_name = str(self.image_list[self.curr_img_in_list-1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_list)-1]) else: | prev_index = self.curr_img_in_list - 1 if prev_index < 0: if self.listwrap_mode == 0: self.preloadimg_prev_in_list == -1 return else: prev_index = len(self.image_list)-1 if prev_index == self.preloadimg_prev_in_list: | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... |
if temp_name == self.preloadimg_prev_name and self.preloadimg_prev_pixbuf_original != None: return else: self.preloadimg_prev_name = temp_name | self.preloadimg_prev_in_list = prev_index self.preloadimg_prev_name = str(self.image_list[prev_index]) | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... |
if self.preloadimg_prev_pixbuf_original == None: | if self.preloadimg_prev_in_list == -1: | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... |
self.preloadimg_prev_pixbuf_original = None | self.preloadimg_prev_in_list = -1 | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... |
self.load_new_image(False, False, False, True, True) | self.load_new_image2(False, False, True, True) | def expand_filelist_and_load_image(self, inputlist): # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found self.images_found = 0 self.stop_now = True # Make sure that any previous search process is stopped self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)... |
self.preloadimg_prev_pixbuf_original = None | self.preloadimg_prev_in_list = -1 | def expand_filelist_and_load_image(self, inputlist): # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found self.images_found = 0 self.stop_now = True # Make sure that any previous search process is stopped self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)... |
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_window_title, print_found_msg): | def expand_directory(self, item, stop_when_second_image_found, go_buttons_enabled, update_window_title, print_found_msg): | def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_window_title, print_found_msg): if self.stop_now == False and self.closing_app == False: folderlist = [] filelist = [] if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item): if item2[0] != '.' and self.closing_... |
if stop_when_image_found == True: self.stop_now = True | def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_window_title, print_found_msg): if self.stop_now == False and self.closing_app == False: folderlist = [] filelist = [] if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item): if item2[0] != '.' and self.closing_... | |
if update_window_title == True: self.update_title() if not self.closing_app: while gtk.events_pending(): gtk.main_iteration(True) | if len(self.image_list)>0: if update_window_title == True: self.update_title() if not self.closing_app: while gtk.events_pending(): gtk.main_iteration(True) | def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_window_title, print_found_msg): if self.stop_now == False and self.closing_app == False: folderlist = [] filelist = [] if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item): if item2[0] != '.' and self.closing_... |
self.expand_directory(item2, stop_when_image_found, go_buttons_enabled, update_window_title, print_found_msg) | self.expand_directory(item2, stop_when_second_image_found, go_buttons_enabled, update_window_title, print_found_msg) | def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_window_title, print_found_msg): if self.stop_now == False and self.closing_app == False: folderlist = [] filelist = [] if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item): if item2[0] != '.' and self.closing_... |
if self.last_image_action_was_fit == True and self.zoomratio != 1: | if self.last_image_action_was_fit == True: | 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 and self.zoomratio != 1: self.zoom_to_fit... |
self.window.unfullscreen() | def toggle_fullscreen(self, action): if self.fullscreen_mode == True: self.fullscreen_mode = False self.UIManager.get_widget('/Popup/FM4').hide() self.UIManager.get_widget('/Popup/Exit Full Screen').hide() self.window.unfullscreen() if self.toolbar_show == True: self.toolbar.show() self.menubar.show() if self.statusbar... | |
self.last_image_action_was_fit = False | def image_flip_vert(self, action): if self.userimage != "": self.last_image_action_was_fit = False if self.location == 0: self.location = 3 elif self.location == 1: self.location = 2 elif self.location == 2: self.location = 1 elif self.location == 3: self.location = 0 self.currimg = self.image_flip(self.currimg, True) ... | |
self.last_image_action_was_fit = False | def image_flip_horiz(self, action): if self.userimage != "": self.last_image_action_was_fit = False if self.location == 0: self.location = 1 elif self.location == 1: self.location = 0 elif self.location == 2: self.location = 3 elif self.location == 3: self.location = 2 self.currimg = self.image_flip(self.currimg, False... | |
return | if self.fullscreen_mode == True: self.toggle_fullscreen(None) return | def next_img_in_list(self, action): if len(self.image_list) > 1: self.randomlist = [] if self.curr_img_in_list < len(self.image_list) - 1: self.curr_img_in_list += 1 else: if self.listwrap == True: self.curr_img_in_list = 0 else: return if self.fullscreen_mode == False: self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))... |
if self.preloading_images == True and preloading_images_prev == False: | if (self.preloading_images == True and preloading_images_prev == False) or (open_mode_prev != self.open_mode): | def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(_("Mirage Preferences"), self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # "Interface" prefs: table_settings = gtk.Table(13, 3, False) bglabel = gtk.Label() bglabel.set_markup('<b>' + _('Interface') + '</b>') bgl... |
if self.open_mode == self.open_mode_smart: | if self.open_mode == self.open_mode_smart or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_smart): | 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... |
elif self.open_mode == self.open_mode_fit: | elif self.open_mode == self.open_mode_fit or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_fit): | 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... |
elif self.open_mode == self.open_mode_1to1: | elif self.open_mode == self.open_mode_1to1 or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_1to1): | 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... |
elif self.open_mode == self.open_mode_last: if self.last_mode == self.open_mode_smart: self.zoom_to_fit_or_1_to_1(None, False, False) elif self.last_mode == self.open_mode_fit: self.zoom_to_fit_window(None, False, False) elif self.last_mode == self.open_mode_1to1: self.zoom_1_to_1(None, False, False) | 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... | |
if self.open_mode == self.open_mode_smart: | if self.open_mode == self.open_mode_smart or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_smart): | def preload_next_image(self, use_existing_image): 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... |
elif self.open_mode == self.open_mode_fit: | elif self.open_mode == self.open_mode_fit or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_fit): | def preload_next_image(self, use_existing_image): 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... |
elif self.open_mode == self.open_mode_1to1: | elif self.open_mode == self.open_mode_1to1 or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_1to1): | def preload_next_image(self, use_existing_image): 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... |
elif self.open_mode == self.open_mode_last: if self.last_mode == self.open_mode_smart: self.zoom_to_fit_or_1_to_1(None, True, False) elif self.last_mode == self.open_mode_fit: self.zoom_to_fit_window(None, True, False) elif self.last_mode == self.open_mode_1to1: self.zoom_1_to_1(None, True, False) | def preload_next_image(self, use_existing_image): 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... | |
if self.open_mode == self.open_mode_smart: | if self.open_mode == self.open_mode_smart or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_smart): | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... |
elif self.open_mode == self.open_mode_fit: | elif self.open_mode == self.open_mode_fit or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_fit): | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... |
elif self.open_mode == self.open_mode_1to1: | elif self.open_mode == self.open_mode_1to1 or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_1to1): | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... |
elif self.open_mode == self.open_mode_last: if self.last_mode == self.open_mode_smart: self.zoom_to_fit_or_1_to_1(None, False, True) elif self.last_mode == self.open_mode_fit: self.zoom_to_fit_window(None, False, True) elif self.last_mode == self.open_mode_1to1: self.zoom_1_to_1(None, False, True) | def preload_prev_image(self, use_existing_image): try: 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]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_... | |
('Full Screen', gtk.STOCK_FULLSCREEN, '_Full Screen', '<Shift>Return', 'Full Screen', self.toggle_fullscreen), ('Exit Full Screen', gtk.STOCK_FULLSCREEN, 'E_xit Full Screen', None, 'Full Screen', self.toggle_fullscreen), | ('Full Screen', gtk.STOCK_FULLSCREEN, '_Full Screen', '<Shift>Return', 'Full Screen', self.enter_fullscreen), ('Exit Full Screen', gtk.STOCK_LEAVE_FULLSCREEN, 'E_xit Full Screen', None, 'Full Screen', self.leave_fullscreen), | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
self.ss_back = gtk.Button("", gtk.STOCK_GO_BACK) alignment = self.ss_back.get_children()[0] | ss_back = gtk.Button("", gtk.STOCK_GO_BACK) alignment = ss_back.get_children()[0] | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
self.ss_back.set_property('can-focus', False) self.ss_back.connect('clicked', self.prev_img_in_list) | ss_back.set_property('can-focus', False) ss_back.connect('clicked', self.prev_img_in_list) | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
self.ss_start.set_size_request(self.ss_start.size_request()[0]*2, -1) | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit | |
self.ss_stop.set_size_request(self.ss_stop.size_request()[0]*2, -1) self.ss_forward = gtk.Button("", gtk.STOCK_GO_FORWARD) alignment = self.ss_forward.get_children()[0] | ss_forward = gtk.Button("", gtk.STOCK_GO_FORWARD) alignment = ss_forward.get_children()[0] | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
self.ss_forward.set_property('can-focus', False) self.ss_forward.connect('clicked', self.next_img_in_list) self.slideshow_controls.pack_start(self.ss_back, False, False, 0) | ss_forward.set_property('can-focus', False) ss_forward.connect('clicked', self.next_img_in_list) self.slideshow_controls.pack_start(ss_back, False, False, 0) | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
self.slideshow_controls.pack_start(self.ss_forward, False, False, 0) | self.slideshow_controls.pack_start(ss_forward, False, False, 0) | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
self.toggle_fullscreen(None) | self.leave_fullscreen(None) | 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 self.prev_img_in_list(None) elif event.keyval == 65363 or ... |
def toggle_fullscreen(self, action): | def enter_fullscreen(self, action): if self.fullscreen_mode == False: self.fullscreen_mode = True self.UIManager.get_widget('/Popup/FM3').show() self.UIManager.get_widget('/Popup/Exit Full Screen').show() self.statusbar.hide() self.toolbar.hide() self.menubar.hide() self.window.fullscreen() self.timer_id = gobject.time... | def toggle_fullscreen(self, action): if self.fullscreen_mode == True: self.fullscreen_mode = False self.UIManager.get_widget('/Popup/FM3').hide() self.UIManager.get_widget('/Popup/Exit Full Screen').hide() if self.toolbar_show == True: self.toolbar.show() self.menubar.show() if self.statusbar_show == True: self.statusb... |
else: self.fullscreen_mode = True self.UIManager.get_widget('/Popup/FM3').show() self.UIManager.get_widget('/Popup/Exit Full Screen').show() self.statusbar.hide() self.toolbar.hide() self.menubar.hide() self.window.fullscreen() self.timer_id = gobject.timeout_add(2000, self.hide_cursor) self.set_slideshow_sensitivities... | self.set_slideshow_sensitivities() | def toggle_fullscreen(self, action): if self.fullscreen_mode == True: self.fullscreen_mode = False self.UIManager.get_widget('/Popup/FM3').hide() self.UIManager.get_widget('/Popup/Exit Full Screen').hide() if self.toolbar_show == True: self.toolbar.show() self.menubar.show() if self.statusbar_show == True: self.statusb... |
if self.slideshow_mode == False: self.slideshow_mode = True self.set_window_title() self.set_slideshow_sensitivities() if self.slideshow_random == False: self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, "ss") | if len(self.image_list) > 1: if self.slideshow_mode == False: self.slideshow_mode = True self.set_window_title() self.set_slideshow_sensitivities() if self.slideshow_random == False: self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, "ss") else: self.reinitialize... | def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_window_title() self.set_slideshow_sensitivities() if self.slideshow_random == False: self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, "ss") else: self.reini... |
self.reinitialize_randomlist() self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.random_img_in_list, "ss") self.ss_stop.show() self.ss_start.hide() else: self.slideshow_mode = False gobject.source_remove(self.timer_delay) self.set_window_title() self.set_slideshow_sensitivities()... | self.slideshow_mode = False gobject.source_remove(self.timer_delay) self.set_window_title() self.set_slideshow_sensitivities() self.set_zoom_sensitivities() self.ss_stop.hide() self.ss_start.show() | def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_window_title() self.set_slideshow_sensitivities() if self.slideshow_random == False: self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, "ss") else: self.reini... |
hbox_width = 3 * self.ss_start.size_request()[0] | hbox_width = self.ss_start.size_request()[0]/2 | def slideshow_controls_show(self): if self.show_slideshow_controls == False and self.controls_moving == False: self.show_slideshow_controls = True hbox_width = 3 * self.ss_start.size_request()[0] hbox_height = self.ss_start.size_request()[1] |
y_max = int(self.available_image_height() - hbox_height - 5) self.layout.move(self.slideshow_controls, 0, y_min) | y_max = int(self.available_image_height() - hbox_height - 2) | def slideshow_controls_show(self): if self.show_slideshow_controls == False and self.controls_moving == False: self.show_slideshow_controls = True hbox_width = 3 * self.ss_start.size_request()[0] hbox_height = self.ss_start.size_request()[1] |
y = int(y - 1) self.layout.move(self.slideshow_controls, 5, y) | y -= 1 self.layout.move(self.slideshow_controls, 2, y) self.layout.move(self.slideshow_controls2, int(self.available_image_width() - hbox_width - 2), y) | def slideshow_controls_show(self): if self.show_slideshow_controls == False and self.controls_moving == False: self.show_slideshow_controls = True hbox_width = 3 * self.ss_start.size_request()[0] hbox_height = self.ss_start.size_request()[1] |
hbox_width = 3 * self.ss_start.size_request()[0] | hbox_width = self.ss_start.size_request()[0]/2 | def slideshow_controls_hide(self): if self.show_slideshow_controls == True and self.controls_moving == False: self.show_slideshow_controls = False |
y_max = int(self.available_image_height() - hbox_height - 5) | y_max = int(self.available_image_height() - hbox_height - 2) | def slideshow_controls_hide(self): if self.show_slideshow_controls == True and self.controls_moving == False: self.show_slideshow_controls = False |
y = int(y + 1) self.layout.move(self.slideshow_controls, 5, y) | y += 1 self.layout.move(self.slideshow_controls, 2, y) self.layout.move(self.slideshow_controls2, int(self.available_image_width() - hbox_width - 2), y) | def slideshow_controls_hide(self): if self.show_slideshow_controls == True and self.controls_moving == False: self.show_slideshow_controls = False |
self.listwrap = False | self.listwrap_mode = 0 | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
self.mousewheel_nav = conf.getboolean('prefs', 'mousewheel') self.listwrap = conf.getboolean('prefs', 'listwrap') | self.mousewheel_nav = conf.getboolean('prefs', 'mousewheel_nav') self.listwrap_mode = conf.getint('prefs', 'listwrap_mode') | def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit |
conf.set('prefs', 'listwrap', self.listwrap) | conf.set('prefs', 'listwrap_mode', self.listwrap_mode) | def save_settings(self): rect = self.window.get_allocation() conf = ConfigParser.ConfigParser() conf.add_section('window') conf.set('window', 'w', rect.width) conf.set('window', 'h', rect.height) conf.set('window', 'toolbar', self.toolbar_show) conf.set('window', 'statusbar', self.statusbar_show) conf.add_section('pref... |
if self.fullscreen_mode == True: | if self.fullscreen_mode == True and self.user_prompt_visible == False: | def hide_cursor(self): if self.fullscreen_mode == True: pix_data = """/* XPM */ static char * invisible_xpm[] = { "1 1 1 1", " c None", " "};""" color = gtk.gdk.Color() pix = gtk.gdk.pixmap_create_from_data(None, pix_data, 1, 1, 1, color, color) invisible = gtk.gdk.Cursor(pix, pix, color, color, 0, 0) self.change... |
gtk.Tooltips().set_tip(mousewheelnav, "If enabled, mousewheel-down/up will go to the next/previous image.") listwrap = gtk.CheckButton(label="Wrap around imagelist", use_underline=False) listwrap.set_active(self.listwrap) gtk.Tooltips().set_tip(listwrap, "If enabled, navigating will wrap around from the last image to t... | gtk.Tooltips().set_tip(mousewheelnav, "If enabled, mousewheel-down (up) will go to the next (previous) image.") hbox_listwrap = gtk.HBox() hbox_listwrap.pack_start(gtk.Label("Wrap around imagelist:"), False, False, 0) combobox2 = gtk.combo_box_new_text() combobox2.append_text("No") combobox2.append_text("Yes") combobox... | 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 "general" prefs: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAN... |
table_navigation.attach(listwrap, 1, 2, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) | table_navigation.attach(hbox_listwrap, 1, 2, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) | 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 "general" prefs: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAN... |
self.listwrap = listwrap.get_active() | self.listwrap_mode = combobox2.get_active() | 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 "general" prefs: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAN... |
if self.listwrap == True: | if self.listwrap_mode == 0: return elif self.listwrap_mode == 1: | def prev_img_in_list(self, action): if len(self.image_list) > 1: self.randomlist = [] if self.curr_img_in_list > 0: self.curr_img_in_list -= 1 else: if self.listwrap == True: self.curr_img_in_list = len(self.image_list) - 1 else: return if self.fullscreen_mode == False: self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))... |
return | if self.fullscreen_mode == True: self.change_cursor(None) dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, "You are viewing the first image in the list. Wrap around to the last image?") dialog.set_default_response(gtk.RESPONSE_YES) self.user_prompt_visible = True respo... | def prev_img_in_list(self, action): if len(self.image_list) > 1: self.randomlist = [] if self.curr_img_in_list > 0: self.curr_img_in_list -= 1 else: if self.listwrap == True: self.curr_img_in_list = len(self.image_list) - 1 else: return if self.fullscreen_mode == False: self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))... |
if self.listwrap == True: | if self.listwrap_mode == 0: return elif self.listwrap_mode == 1: | def next_img_in_list(self, action): if len(self.image_list) > 1: self.randomlist = [] if self.curr_img_in_list < len(self.image_list) - 1: self.curr_img_in_list += 1 else: if self.listwrap == True: self.curr_img_in_list = 0 else: return if self.fullscreen_mode == False: self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.