bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def change_cursor(self, type): for i in gtk.gdk.window_get_toplevels(): if i.get_window_type() != gtk.gdk.WINDOW_TEMP: i.set_cursor(type) self.layout.window.set_cursor(type)
def change_cursor(self, type): for i in gtk.gdk.window_get_toplevels(): if i.get_window_type() != gtk.gdk.WINDOW_TEMP and i.get_window_type() != gtk.gdk.WINDOW_CHILD: i.set_cursor(type) self.layout.window.set_cursor(type)
37,100
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
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
37,101
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
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
37,102
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
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
37,103
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title="Mirage Options", 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.EXPAND, g...
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...
37,104
def zoom_to_fit_or_1_to_1(self, action): if self.userimage != "": if self.zoomratio < self.min_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_out_sensitivities(True) if self.zoomratio > self.max_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_in_sensitivities(True) self.last_image_action_was_fit = ...
def zoom_to_fit_or_1_to_1(self, action): if self.userimage != "": if self.zoomratio < self.min_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_out_sensitivities(True) if self.zoomratio > self.max_zoomratio * self.zoomratio_for_zoom_to_fit: self.set_zoom_in_sensitivities(True) # Calculate zoomratio needed to f...
37,105
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: if self.fullscreen_mode == True: self.toggle_fullscreen(None) return if self.fullscreen_mo...
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))...
37,106
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; returns new list self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() first_image_found = False self...
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; returns new list self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() first_image_found = False self...
37,107
def expand_filelist_and_load_image(self, inputlist): self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found; returns new list first_image_found = False self...
def expand_filelist_and_load_image(self, inputlist): self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found; returns new list first_image_found = False self...
37,108
def expand_filelist_and_load_image(self, inputlist): self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found; returns new list first_image_found = False self...
def expand_filelist_and_load_image(self, inputlist): self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found; returns new list first_image_found = False self...
37,109
def slideshow_controls_show(self): if self.slideshow_controls_visible == False and self.controls_moving == False: self.slideshow_controls_visible = True
def slideshow_controls_show(self): if self.slideshow_controls_visible == False and self.controls_moving == False: self.slideshow_controls_visible = True
37,110
def slideshow_controls_hide(self): if self.slideshow_controls_visible == True and self.controls_moving == False: self.slideshow_controls_visible = False
def slideshow_controls_hide(self): if self.slideshow_controls_visible == True and self.controls_moving == False: self.slideshow_controls_visible = False
37,111
def expand_filelist_and_load_image(self, inputlist):
def expand_filelist_and_load_image(self, inputlist):
37,112
def expand_filelist_and_load_image(self, inputlist):
def expand_filelist_and_load_image(self, inputlist):
37,113
def expand_filelist_and_load_image(self, inputlist):
def expand_filelist_and_load_image(self, inputlist):
37,114
def do_image_list_stuff(self, first_image): if len(self.image_list) > 0: self.set_go_navigation_sensitivities() self.image_list = list(set(self.image_list)) self.image_list.sort(locale.strcoll) for itemnum in range(len(self.image_list)): if first_image == self.image_list[itemnum]: self.curr_img_in_list = itemnum
def do_image_list_stuff(self, first_image): if len(self.image_list) > 0: self.set_go_navigation_sensitivities() self.image_list = list(set(self.image_list)) self.image_list.sort(locale.strcoll) for itemnum in range(len(self.image_list)): if first_image == self.image_list[itemnum]: self.curr_img_in_list = itemnum
37,115
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
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
37,116
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
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
37,117
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
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
37,118
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
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
37,119
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 if self.slideshow_mode == False: self.prev_img_in_list(Non...
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 if self.slideshow_mode == False: self.prev_img_in_list(Non...
37,120
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 if self.slideshow_mode == False: self.prev_img_in_list(Non...
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 if self.slideshow_mode == False: self.prev_img_in_list(Non...
37,121
def set_slideshow_sensitivities(self): if len(self.image_list) <=1: self.UIManager.get_widget('/MainMenu/GoMenu/Start Slideshow').show() self.UIManager.get_widget('/MainMenu/GoMenu/Start Slideshow').set_sensitive(False) self.UIManager.get_widget('/MainMenu/GoMenu/Stop Slideshow').hide() self.UIManager.get_widget('/Main...
defif self.fullscreen_mode == False or len(self.image_list) <= 1: self.UIManager.get_widget('/Popup/Start Slideshow').hide() self.UIManager.get_widget('/Popup/Stop Slideshow').hide() elif self.slideshow_mode == True: self.UIManager.get_widget('/Popup/Start Slideshow').hide() self.UIManager.get_widget('/Popup/Stop Slide...
37,122
def update_statusbar(self): # Update status bar: try: st = os.stat(self.userimage) filesize = st[6]/1000 ratio = int(100 * self.zoomratio) status_text=str(self.originalimg.get_width()) + "x" + str(self.originalimg.get_height()) + " " + str(filesize) + "KB " + str(ratio) + "% " except: status_text="Cannot load ima...
def update_statusbar(self): # Update status bar: try: st = os.stat(self.userimage) filesize = st[6]/1000 ratio = int(100 * self.zoomratio) status_text=str(self.originalimg.get_width()) + "x" + str(self.originalimg.get_height()) + " " + str(filesize) + "KB " + str(ratio) + "% " except: status_text="Cannot load ima...
37,123
def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL and self.slideshow_mode == False: # 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) r...
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...
37,124
def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL and self.slideshow_mode == False: # 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) r...
def mousewheel_scrolled(self, widget, event): if event.type == gtk.gdk.SCROLL and self.slideshow_mode == False: # 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) r...
37,125
def zoom_to_fit_window(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "" and (self.slideshow_mode == True or self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').get_property('sensitive') == True): self.last_mode = self.open_mode_fit self.last_image_action_was_fit = True # ...
def zoom_to_fit_window(self, action): if self.userimage != "" and (self.slideshow_mode == True or self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').get_property('sensitive') == True): self.last_mode = self.open_mode_fit self.last_image_action_was_fit = True # Calculate zoomratio needed to fit to window: win_width = s...
37,126
def zoom_to_fit_window(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "" and (self.slideshow_mode == True or self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').get_property('sensitive') == True): self.last_mode = self.open_mode_fit self.last_image_action_was_fit = True # ...
def zoom_to_fit_window(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "" and (self.slideshow_mode == True or self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').get_property('sensitive') == True): self.last_mode = self.open_mode_fit self.last_image_action_was_fit = True # ...
37,127
def zoom_to_fit_or_1_to_1(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "": self.last_image_action_was_fit = True # Calculate zoomratio needed to fit to window: win_width = self.available_image_width() win_height = self.available_image_height() img_width = self.originalim...
def zoom_to_fit_or_1_to_1(self, action): if self.userimage != "": self.last_image_action_was_fit = True # Calculate zoomratio needed to fit to window: win_width = self.available_image_width() win_height = self.available_image_height() img_width = self.originalimg.get_width() img_height = self.originalimg.get_height() i...
37,128
def zoom_to_fit_or_1_to_1(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "": self.last_image_action_was_fit = True # Calculate zoomratio needed to fit to window: win_width = self.available_image_width() win_height = self.available_image_height() img_width = self.originalim...
def zoom_to_fit_or_1_to_1(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "": self.last_image_action_was_fit = True # Calculate zoomratio needed to fit to window: win_width = self.available_image_width() win_height = self.available_image_height() img_width = self.originalim...
37,129
def zoom_1_to_1(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "" and (self.slideshow_mode == True or self.image_is_animation == True or (self.image_is_animation == False and self.UIManager.get_widget('/MainMenu/ViewMenu/1:1').get_property('sensitive') == True)): self.last...
def zoom_1_to_1(self, action): if self.userimage != "" and (self.slideshow_mode == True or self.image_is_animation == True or (self.image_is_animation == False and self.UIManager.get_widget('/MainMenu/ViewMenu/1:1').get_property('sensitive') == True)): self.last_mode = self.open_mode_1to1 self.last_image_action_was_fit...
37,130
def next_img_in_list(self, action): if self.slideshow_abort == True: self.slideshow_abort = False return 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_mode == 0: if self.slideshow_mode == True: self.toggle_slidesh...
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_mode == 0: if self.slideshow_mode == True: self.toggle_slideshow(None) self.slideshow_abort = False return elif self.listwrap_mode ...
37,131
def next_img_in_list(self, action): if self.slideshow_abort == True: self.slideshow_abort = False return 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_mode == 0: if self.slideshow_mode == True: self.toggle_slidesh...
def next_img_in_list(self, action): if self.slideshow_abort == True: return 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_mode == 0: if self.slideshow_mode == True: self.toggle_slideshow(None) return elif self.lis...
37,132
def next_img_in_list(self, action): if self.slideshow_abort == True: self.slideshow_abort = False return 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_mode == 0: if self.slideshow_mode == True: self.toggle_slidesh...
def next_img_in_list(self, action): if self.slideshow_abort == True: return 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_mode == 0: if self.slideshow_mode == True: self.toggle_slideshow(None) return elif self.lis...
37,133
def next_img_in_list(self, action): if self.slideshow_abort == True: self.slideshow_abort = False return 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_mode == 0: if self.slideshow_mode == True: self.toggle_slidesh...
def next_img_in_list(self, action): if self.slideshow_abort == True: self.slideshow_abort = False return 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_mode == 0: if self.slideshow_mode == True: self.toggle_slidesh...
37,134
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if self.slideshow_abort == True: self.slideshow_abort = False return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array ...
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array and repeat: all_items_are_true = True for item in self.randomlist: if...
37,135
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if self.slideshow_abort == True: self.slideshow_abort = False return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array ...
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if self.slideshow_abort == True: return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array and repeat: all_items_are_tru...
37,136
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if self.slideshow_abort == True: self.slideshow_abort = False return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array ...
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if self.slideshow_abort == True: return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array and repeat: all_items_are_tru...
37,137
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if self.slideshow_abort == True: self.slideshow_abort = False return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array ...
def random_img_in_list(self, action): if action != None and self.slideshow_mode == True: return if self.slideshow_abort == True: self.slideshow_abort = False return if len(self.image_list) > 1: if self.randomlist == []: self.reinitialize_randomlist() else: # check if we have seen every image; if so, reinitialize array ...
37,138
def image_load_failed(self): self.userimage = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.userimage != "": print "Loading:", self.userimage self.window.set_title("Mirage - [" + str(self.curr_img_in_list+1) + " of " + str(len(self.image_list)) + "] " + os.path.basename(self.userimage)) s...
def image_load_failed(self): self.userimage = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.userimage != "": print "Loading:", self.userimage self.set_window_title() self.put_error_image_to_window() self.image_loaded = False
37,139
def load_new_image(self): self.currimg = None self.first_image_load = True self.location = 0 self.orientation = 0 self.zoomratio = 1 self.userimage = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.userimage != "": print "Loading:", self.userimage animtest = gtk.gdk.PixbufAnimation(self.use...
def load_new_image(self): self.currimg = None self.first_image_load = True self.location = 0 self.orientation = 0 self.zoomratio = 1 self.userimage = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.userimage != "": print "Loading:", self.userimage animtest = gtk.gdk.PixbufAnimation(self.use...
37,140
def load_new_image(self): self.currimg = None self.first_image_load = True self.location = 0 self.orientation = 0 self.zoomratio = 1 self.userimage = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.userimage != "": print "Loading:", self.userimage animtest = gtk.gdk.PixbufAnimation(self.use...
def load_new_image(self): self.currimg = None self.first_image_load = True self.location = 0 self.orientation = 0 self.zoomratio = 1 self.userimage = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.userimage != "": print "Loading:", self.userimage animtest = gtk.gdk.PixbufAnimation(self.use...
37,141
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() timer_id ...
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True 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, action) else: self.reinitialize_randomlist() t...
37,142
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() timer_id ...
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() self.time...
37,143
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() timer_id ...
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() timer_id ...
37,144
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() timer_id ...
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() timer_id ...
37,145
def toggle_slideshow(self, action): if self.slideshow_mode == False: self.slideshow_mode = True self.set_slideshow_sensitivities() if self.slideshow_random == False: timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action) else: self.reinitialize_randomlist() timer_id ...
def 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.userimage) + " - Slideshow Mode") else: self.window.se...
37,146
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,147
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,148
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,149
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,150
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,151
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,152
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,153
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,154
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,155
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,156
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,157
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,158
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,159
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,160
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,161
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,162
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,163
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
def __init__(self): try: gettext.install('mirage', '/usr/share/locale', unicode=1) except: gettext.install('mirage', '/usr/local/share/locale', unicode=1) # 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_z...
37,164
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...
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...
37,165
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...
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...
37,166
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...
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...
37,167
def set_zoom_in_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/ViewMenu/In').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/In').set_sensitive(enable) self.UIManager.get_widget('/Popup/In').set_sensitive(enable)
def set_zoom_in_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/ViewMenu/In').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/In').set_sensitive(enable) self.UIManager.get_widget('/Popup/In').set_sensitive(enable)
37,168
def set_zoom_out_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/ViewMenu/Out').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/Out').set_sensitive(enable) self.UIManager.get_widget('/Popup/Out').set_sensitive(enable)
def set_zoom_out_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/ViewMenu/Out').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/Out').set_sensitive(enable) self.UIManager.get_widget('/Popup/Out').set_sensitive(enable)
37,169
def set_zoom_out_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/ViewMenu/Out').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/Out').set_sensitive(enable) self.UIManager.get_widget('/Popup/Out').set_sensitive(enable)
def set_zoom_out_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/ViewMenu/Out').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/Out').set_sensitive(enable) self.UIManager.get_widget('/Popup/Out').set_sensitive(enable)
37,170
def set_previous_image_sensitivities(self, enable): self.UIManager.get_widget('/MainToolbar/Previous2').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/GoMenu/Previous Image').set_sensitive(enable) self.UIManager.get_widget('/Popup/Previous Image').set_sensitive(enable)
def set_previous_image_sensitivities(self, enable): self.UIManager.get_widget('/MainToolbar/Previous2').set_sensitive(enable) self.UIManager.get_widget('/MainMenu/GoMenu/Previous Image').set_sensitive(enable) self.UIManager.get_widget('/Popup/Previous Image').set_sensitive(enable)
37,171
def set_first_image_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/First Image').set_sensitive(enable)
def set_first_image_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/First Image').set_sensitive(enable)
37,172
def set_last_image_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/Last Image').set_sensitive(enable)
def set_last_image_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/Last Image').set_sensitive(enable)
37,173
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.random_img_in_list, "...
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.random_img_in_list, "...
37,174
def drop_cb(self, widget, context, x, y, selection, info, time): uri = selection.data.strip() path = urllib.url2pathname(uri) paths = path.rsplit('\n') for i, path in enumerate(paths): paths[i] = path.rstrip('\r') self.expand_filelist_and_load_image(paths)
def drop_cb(self, widget, context, x, y, selection, info, time): uri = selection.data.strip() path = urllib.url2pathname(uri) paths = path.rsplit('\n') for i, path in enumerate(paths): paths[i] = path.rstrip('\r') self.expand_filelist_and_load_image(paths)
37,175
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...
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...
37,176
def preload_next_image(self): # Always start with the original image to preserve quality! # Calculate image size: self.preloadimg_width = int(self.preloadimg_pixbuf_original.get_width() * self.preloadimg_zoomratio) self.preloadimg_height = int(self.preloadimg_pixbuf_original.get_height() * self.preloadimg_zoomratio) if...
def preload_next_image(self): # Always start with the original image to preserve quality! # Calculate image size: self.preloadimg_width = int(self.preloadimg_pixbuf_original.get_width() * self.preloadimg_zoomratio) self.preloadimg_height = int(self.preloadimg_pixbuf_original.get_height() * self.preloadimg_zoomratio) if...
37,177
def center_image(self): x_shift = int((self.available_image_width() - self.currimg_width)/2) if x_shift < 0: x_shift = 0 y_shift = int((self.available_image_height() - self.currimg_height)/2) if y_shift < 0: y_shift = 0 self.layout.move(self.imageview, x_shift, y_shift)
def center_image(self): x_shift = int((self.available_image_width() - self.currimg_width)/2) if x_shift < 0: x_shift = 0 y_shift = int((self.available_image_height() - self.currimg_height)/2) if y_shift < 0: y_shift = 0 self.layout.move(self.imageview, x_shift, y_shift)
37,178
def available_image_width(self): width = self.window.get_size()[0] return width
def available_image_width(self): width = self.window.get_size()[0] return width
37,179
def available_image_height(self): height = self.window.get_size()[1] if self.fullscreen_mode == False: height -= self.menubar.size_request()[1] if self.toolbar_show == True: height -= self.toolbar.size_request()[1] if self.statusbar_show == True: height -= self.statusbar.size_request()[1] return height
def available_image_height(self): height = self.window.get_size()[1] if self.fullscreen_mode == False: height -= self.menubar.size_request()[1] if self.toolbar_show == True: height -= self.toolbar.size_request()[1] if self.statusbar_show == True: height -= self.statusbar.size_request()[1] return height
37,180
def enter_fullscreen(self, action): if self.fullscreen_mode == False: self.fullscreen_mode = True self.UIManager.get_widget('/Popup/Full Screen').hide() self.UIManager.get_widget('/Popup/Exit Full Screen').show() self.statusbar.hide() self.toolbar.hide() self.menubar.hide() self.window.fullscreen() self.timer_id = gobj...
def enter_fullscreen(self, action): if self.fullscreen_mode == False: self.fullscreen_mode = True self.UIManager.get_widget('/Popup/Full Screen').hide() self.UIManager.get_widget('/Popup/Exit Full Screen').show() self.statusbar.hide() self.toolbar.hide() self.menubar.hide() self.window.fullscreen() self.timer_id = gobj...
37,181
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs: table_settings = gtk.Table(13, 3, False) table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk....
37,182
def use_fixed_dir_clicked(self, button): if button.get_active() == True: self.defaultdir.set_sensitive(True) else: self.defaultdir.set_sensitive(False)
def use_fixed_dir_clicked(self, button): if button.get_active() == True: self.defaultdir.set_sensitive(True) else: self.defaultdir.set_sensitive(False)
37,183
def show_about(self, action): # Help > About iconname = 'mirage_large.png' if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/pixmaps/' + iconname): icon_path = '../share/pixmaps/' + iconname elif os.path.exists('/usr/local/share/pixmaps/' + iconname): icon_path = '/usr/local/share/pixmaps/...
def show_about(self, action): # Help > About iconname = 'mirage_large.png' if os.path.exists(iconname): icon_path = iconname elif os.path.exists('../share/pixmaps/' + iconname): icon_path = '../share/pixmaps/' + iconname elif os.path.exists('/usr/local/share/pixmaps/' + iconname): icon_path = '/usr/local/share/pixmaps/...
37,184
def zoom_out(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/ViewMenu/Out').get_property('sensitive') == True: self.currimg_zoomratio = self.currimg_zoomratio * 1/1.25 self.set_zoom_sensitivities() self.last_image_action_was_fit = False self.put_zoom_image_to_window(False) self.update...
def zoom_out(self, action): if self.currimg_name != "" and self.UIManager.get_widget('/MainMenu/ViewMenu/Out').get_property('sensitive') == True: self.currimg_zoomratio = self.currimg_zoomratio * 1/1.25 self.set_zoom_sensitivities() self.last_image_action_was_fit = False self.put_zoom_image_to_window(False) self.update...
37,185
def zoom_to_fit_window(self, action, is_preloadimg): if is_preloadimg == True: if self.preloading == True and self.preloadimg_pixbuf_original != None: win_width = self.available_image_width() win_height = self.available_image_height() preimg_width = self.preloadimg_pixbuf_original.get_width() preimg_height = self.prelo...
def zoom_to_fit_window(self, action, is_preloadimg): if is_preloadimg == True: if self.preloading == True and self.preloadimg_pixbuf_original != None: win_width = self.available_image_width() win_height = self.available_image_height() preimg_width = self.preloadimg_pixbuf_original.get_width() preimg_height = self.prelo...
37,186
def zoom_1_to_1_action(self, action): self.zoom_1_to_1(action, False)
def zoom_1_to_1_action(self, action): self.zoom_1_to_1(action, False)
37,187
def reinitialize_randomlist(self): self.randomlist = [] for i in range(len(self.image_list)): self.randomlist.append(False) self.randomlist[self.curr_img_in_list] = True
def reinitialize_randomlist(self): self.randomlist = [] for i in range(len(self.image_list)): self.randomlist.append(False) self.randomlist[self.curr_img_in_list] = True
37,188
def image_load_failed(self, reset_cursor): self.currimg_name = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.currimg_name != "": print _("Loading:"), self.currimg_name self.set_window_title() self.put_error_image_to_window() self.image_loaded = False if reset_cursor == True: if self.fulls...
def image_load_failed(self, reset_cursor): self.currimg_name = str(self.image_list[self.curr_img_in_list]) if self.verbose == True and self.currimg_name != "": print _("Loading:"), self.currimg_name self.set_window_title() self.put_error_image_to_window() self.image_loaded = False if reset_cursor == True: if self.fulls...
37,189
def load_new_image(self, use_preloadimg, generate_preloadimg_only, reset_cursor, use_existing_preloadimg): if generate_preloadimg_only == False: # If there is a preloaded image available, use that instead of generating # a new one: if use_preloadimg == True and self.preloadimg_pixbuf_original != None: self.currimg_name...
def load_new_image(self, use_preloadimg, generate_preloadimg_only, reset_cursor, use_existing_preloadimg): if generate_preloadimg_only == False: # If there is a preloaded image available, use that instead of generating # a new one: if use_preloadimg == True and self.preloadimg_pixbuf_original != None: self.currimg_name...
37,190
def change_cursor(self, type): for i in gtk.gdk.window_get_toplevels(): if i.get_window_type() != gtk.gdk.WINDOW_TEMP and i.get_window_type() != gtk.gdk.WINDOW_CHILD: i.set_cursor(type) self.layout.window.set_cursor(type)
def change_cursor(self, type): for i in gtk.gdk.window_get_toplevels(): if i.get_window_type() != gtk.gdk.WINDOW_TEMP and i.get_window_type() != gtk.gdk.WINDOW_CHILD: i.set_cursor(type) self.layout.window.set_cursor(type)
37,191
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...
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...
37,192
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...
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...
37,193
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...
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...
37,194
def add_folderlist_images(self, folderlist, go_buttons_enabled): if len(folderlist) > 0: folderlist.sort(locale.strcoll) folderlist = list(set(folderlist)) for item in folderlist: if item[0] != '.' and not self.closing_app: self.stop_now = False self.expand_directory(item, False, go_buttons_enabled)
def add_folderlist_images(self, folderlist, go_buttons_enabled): if len(folderlist) > 0: folderlist.sort(locale.strcoll) folderlist = list(set(folderlist)) for item in folderlist: if item[0] != '.' and not self.closing_app: self.stop_now = False self.expand_directory(item, False, go_buttons_enabled)
37,195
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled): 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_app == False: item2 = item + "/" + ite...
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_title): 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_app == False: item2 = it...
37,196
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled): 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_app == False: item2 = item + "/" + ite...
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled): 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_app == False: item2 = item + "/" + ite...
37,197
def image_flip(self, old_pix, vertical): width = old_pix.get_width() height = old_pix.get_height() d = None if vertical == True: d, w, h, rws = imgfuncs.vert(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) else: d, w, h, rws = imgfuncs.horiz(old_pix.get_pixels(), width, height, o...
def image_flip(self, old_pix, vertical): width = old_pix.get_width() height = old_pix.get_height() d = None if vertical == True: d, w, h, rws = imgfuncs.vert(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) else: d, w, h, rws = imgfuncs.horiz(old_pix.get_pixels(), width, height, o...
37,198
def image_rotate(self, old_pix, full_angle): width = old_pix.get_width() height = old_pix.get_height() angle = full_angle - (int(full_angle) / 360) * 360 if angle: d = None if angle % 270 == 0: d, w, h, rws = imgfuncs.right(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) elif ang...
def image_rotate(self, old_pix, full_angle): width = old_pix.get_width() height = old_pix.get_height() angle = full_angle - (int(full_angle) / 360) * 360 if angle: d = None if angle % 270 == 0: d, w, h, rws = imgfuncs.right(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) elif ang...
37,199