rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
if i.get_window_type() != gtk.gdk.WINDOW_TEMP:
if i.get_window_type() != gtk.gdk.WINDOW_TEMP and i.get_window_type() != gtk.gdk.WINDOW_CHILD:
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)
5298dd3c59ec2b58930e739bd9a37bef9637074c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/5298dd3c59ec2b58930e739bd9a37bef9637074c/mirage.py
('ToolsMenu', None, '_Tools'),
('SettingsMenu', None, '_Settings'),
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
e8ef0dd37447e2201f950e7071f9510e00f4b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/e8ef0dd37447e2201f950e7071f9510e00f4b2f7/mirage.py
('Options', gtk.STOCK_PREFERENCES, '_Options', None, 'Options', self.show_prefs),
('Preferences', gtk.STOCK_PREFERENCES, '_Preferences', None, 'Preferences', self.show_prefs),
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
e8ef0dd37447e2201f950e7071f9510e00f4b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/e8ef0dd37447e2201f950e7071f9510e00f4b2f7/mirage.py
<menu action="ToolsMenu"> <menuitem action="Options"/>
<menu action="SettingsMenu"> <menuitem action="Preferences"/>
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
e8ef0dd37447e2201f950e7071f9510e00f4b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/e8ef0dd37447e2201f950e7071f9510e00f4b2f7/mirage.py
self.prefs_dialog = gtk.Dialog(title="Mirage Options", parent=self.window)
self.prefs_dialog = gtk.Dialog(title="Mirage Preferences", parent=self.window)
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...
e8ef0dd37447e2201f950e7071f9510e00f4b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/e8ef0dd37447e2201f950e7071f9510e00f4b2f7/mirage.py
self.last_image_action_was_fit = True
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 = ...
e8ef0dd37447e2201f950e7071f9510e00f4b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/e8ef0dd37447e2201f950e7071f9510e00f4b2f7/mirage.py
if self.fullscreen_mode == True: self.toggle_fullscreen(None)
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...
e8ef0dd37447e2201f950e7071f9510e00f4b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/e8ef0dd37447e2201f950e7071f9510e00f4b2f7/mirage.py
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...
e8ef0dd37447e2201f950e7071f9510e00f4b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/e8ef0dd37447e2201f950e7071f9510e00f4b2f7/mirage.py
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...
23ba9e4d46673f73b4a24f7b23bba4a9d7eac9f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/23ba9e4d46673f73b4a24f7b23bba4a9d7eac9f3/mirage.py
item_fullpath = os.path.abspath(inputlist[itemnum])
item_fullpath = os.path.abspath(inputlist[0])
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...
23ba9e4d46673f73b4a24f7b23bba4a9d7eac9f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/23ba9e4d46673f73b4a24f7b23bba4a9d7eac9f3/mirage.py
self.slideshow_window.move(2, int(winheight-y-2)) self.slideshow_window2.move(winwidth-ss_win2width-2, int(winheight-y-2))
self.slideshow_window.move(2+xpos, int(winheight-y-2)) self.slideshow_window2.move(winwidth-ss_win2width-2+xpos, int(winheight-y-2))
def slideshow_controls_show(self): if self.slideshow_controls_visible == False and self.controls_moving == False: self.slideshow_controls_visible = True
7c51c655dea9c69a01864efb508268bc0e741c68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/7c51c655dea9c69a01864efb508268bc0e741c68/mirage.py
self.slideshow_window.move(2, int(winheight-y-2)) self.slideshow_window2.move(winwidth-ss_win2width-2, int(winheight-y-2))
self.slideshow_window.move(2+xpos, int(winheight-y-2)) self.slideshow_window2.move(winwidth-ss_win2width-2+xpos, int(winheight-y-2))
def slideshow_controls_hide(self): if self.slideshow_controls_visible == True and self.controls_moving == False: self.slideshow_controls_visible = False
7c51c655dea9c69a01864efb508268bc0e741c68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/7c51c655dea9c69a01864efb508268bc0e741c68/mirage.py
self.image_list = []
self.image_list = []
def expand_filelist_and_load_image(self, inputlist):
8af972c9a81f2687cab2b7b391c5943b3b45f1ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/8af972c9a81f2687cab2b7b391c5943b3b45f1ab/mirage.py
def expand_filelist_and_load_image(self, inputlist):
8af972c9a81f2687cab2b7b391c5943b3b45f1ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/8af972c9a81f2687cab2b7b391c5943b3b45f1ab/mirage.py
temp = self.recursive self.recursive = False self.stop_now = False inputlist = self.expand_directory(itempath, False) self.recursive = temp inputlist = list(set(inputlist))
temp = self.recursive self.recursive = False self.stop_now = False self.expand_directory(itempath, False) self.recursive = temp for item in self.image_list: duplicate_image = False for item2 in inputlist: if item == item2: duplicate_image = True if duplicate_image == False: inputlist.append(item) self.image_list = []
def expand_filelist_and_load_image(self, inputlist):
8af972c9a81f2687cab2b7b391c5943b3b45f1ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/8af972c9a81f2687cab2b7b391c5943b3b45f1ab/mirage.py
self.curr_img_in_list = itemnum
temp = self.image_list[0] self.image_list[0] = self.image_list[itemnum] self.image_list[itemnum] = temp
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
8af972c9a81f2687cab2b7b391c5943b3b45f1ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/8af972c9a81f2687cab2b7b391c5943b3b45f1ab/mirage.py
self.slideshow_abort = False
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
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
<separator name="FM1"/>
<separator name="FM1"/>
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
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.window.set_title("Mirage")
self.set_window_title()
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
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.statusbar.set_has_resize_grip(True)
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
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if self.slideshow_mode == False: self.zoom_to_fit_window(None)
self.zoom_to_fit_window(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 if self.slideshow_mode == False: self.prev_img_in_list(Non...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if self.slideshow_mode == False: self.zoom_1_to_1(None)
self.zoom_1_to_1(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 if self.slideshow_mode == False: self.prev_img_in_list(Non...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if 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 Slidesho...
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
context_id = self.statusbar.get_context_id("i don't get this") self.statusbar.push(context_id, status_text)
self.statusbar.push(self.statusbar.get_context_id(""), status_text)
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if event.type == gtk.gdk.SCROLL and self.slideshow_mode == False:
if event.type == gtk.gdk.SCROLL:
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
elif self.mousewheel_nav == True:
elif self.mousewheel_nav == True and self.slideshow_mode == False:
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if action != None and self.slideshow_mode == True: return
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 # ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if self.slideshow_mode == False: self.set_zoom_sensitivities()
self.set_zoom_sensitivities()
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 # ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if action != None and self.slideshow_mode == True: return
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if self.slideshow_mode == False: self.set_zoom_sensitivities()
self.set_zoom_sensitivities()
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if action != None and self.slideshow_mode == True: return
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if self.slideshow_abort == True: self.slideshow_abort = False return
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.slideshow_abort = False
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.slideshow_abort = False
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action)
self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action)
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
return if self.slideshow_abort == True: self.slideshow_abort = False
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.slideshow_abort = False
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.slideshow_abort = False
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.random_img_in_list, action)
self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.random_img_in_list, action)
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.window.set_title("Mirage - [" + str(self.curr_img_in_list+1) + " of " + str(len(self.image_list)) + "] " + os.path.basename(self.userimage))
self.set_window_title()
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if self.slideshow_mode == False: self.set_image_sensitivities(True)
self.set_image_sensitivities(True)
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.window.set_title("Mirage - [" + str(self.curr_img_in_list+1) + " of " + str(len(self.image_list)) + "] " + os.path.basename(self.userimage))
self.set_window_title()
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...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action)
self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.next_img_in_list, action)
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
timer_id = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.random_img_in_list, action) self.set_image_sensitivities(False)
self.timer_delay = gobject.timeout_add(self.delayoptions[self.slideshow_delay]*1000, self.random_img_in_list, action)
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
self.slideshow_abort = True
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
if gtk.gdk.PixbufAnimation(self.userimage).is_static_image() == True: self.set_image_sensitivities(True)
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
def set_window_title(self): if len(self.image_list) == 0: self.window.set_title("Mirage") else: if self.slideshow_mode == True: self.window.set_title("Mirage - [" + str(self.curr_img_in_list+1) + " of " + str(len(self.image_list)) + "] " + os.path.basename(self.userimage) + " - Slideshow Mode") else: self.window.set_t...
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 ...
0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
actions = ( ('FileMenu', None, _('_File')),
actions = ( ('FileMenu', None, _('_File')),
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
('ViewMenu', None, _('_View')), ('GoMenu', None, _('_Go')), ('HelpMenu', None, _('_Help')), ('Open Image', gtk.STOCK_OPEN, _('_Open Image...'), '<control>O', _('Open Image'), self.open_file), ('Open Folder', gtk.STOCK_OPEN, _('Open _Folder...'), '<control>F', _('Open Folder'), self.open_folder), ('Quit', gtk.STOCK_QUIT...
('ViewMenu', None, _('_View')), ('GoMenu', None, _('_Go')), ('HelpMenu', None, _('_Help')), ('Open Image', gtk.STOCK_OPEN, _('_Open Image...'), '<control>O', _('Open Image'), self.open_file), ('Open Folder', gtk.STOCK_OPEN, _('Open _Folder...'), '<control>F', _('Open Folder'), self.open_folder), ('Quit', gtk.STOCK_QUIT...
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
('Status Bar', None, _('_Status Bar'), None, _('Status Bar'), self.toggle_status_bar, self.statusbar_show), ('Toolbar', None, _('_Toolbar'), None, _('Toolbar'), self.toggle_toolbar, self.toolbar_show),
('Status Bar', None, _('_Status Bar'), None, _('Status Bar'), self.toggle_status_bar, self.statusbar_show), ('Toolbar', None, _('_Toolbar'), None, _('Toolbar'), self.toggle_toolbar, self.toolbar_show),
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
uiDescription = """ <ui>
uiDescription = """ <ui>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<separator name="FM2"/>
<separator name="FM2"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<menuitem action="Stop Slideshow"/> <separator name="FM3"/>
<menuitem action="Stop Slideshow"/> <separator name="FM3"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<menu action="FileMenu"> <menuitem action="Open Image"/> <menuitem action="Open Folder"/> <separator name="FM1"/> <menuitem action="Quit"/>
<menu action="FileMenu"> <menuitem action="Open Image"/> <menuitem action="Open Folder"/> <separator name="FM1"/> <menuitem action="Quit"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<separator name="FM1"/>
<separator name="FM1"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<separator name="FM2"/> <menuitem action="Preferences"/>
<separator name="FM2"/> <menuitem action="Preferences"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<separator name="FM2"/>
<separator name="FM2"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<separator name="FM1"/>
<separator name="FM1"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<menu action="HelpMenu"> <menuitem action="About"/> </menu> </menubar> <toolbar name="MainToolbar"> <toolitem action="Open Image"/> <separator name="FM1"/>
<menu action="HelpMenu"> <menuitem action="About"/> </menu> </menubar> <toolbar name="MainToolbar"> <toolitem action="Open Image"/> <separator name="FM1"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
<separator name="FM2"/>
<separator name="FM2"/>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
</ui>
</ui>
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
client.notify_add("/desktop/gnome/interface/toolbar_style", self.gconf_key_changed)
client.notify_add("/desktop/gnome/interface/toolbar_style", self.gconf_key_changed)
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def topwindow_keypress(self, widget, event): if event.state != gtk.gdk.SHIFT_MASK and event.state != gtk.gdk.CONTROL_MASK and event.state != gtk.gdk.MOD1_MASK and event.state != gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK and event.state != gtk.gdk.LOCK_MASK | gtk.gdk.CONTROL_MASK: if event.keyval == 65361: # Left arro...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
self.UIManager.get_widget('/MainToolbar/In').set_sensitive(enable)
self.UIManager.get_widget('/MainToolbar/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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
self.UIManager.get_widget('/MainToolbar/Out').set_sensitive(enable)
self.UIManager.get_widget('/MainToolbar/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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def set_first_image_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/First Image').set_sensitive(enable)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def set_last_image_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/GoMenu/Last Image').set_sensitive(enable)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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, "...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
paths[i] = path.rstrip('\r')
paths[i] = path.rstrip('\r')
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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def available_image_width(self): width = self.window.get_size()[0] return width
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
height -= self.toolbar.size_request()[1]
height -= self.toolbar.size_request()[1]
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
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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....
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def use_fixed_dir_clicked(self, button): if button.get_active() == True: self.defaultdir.set_sensitive(True) else: self.defaultdir.set_sensitive(False)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
self.about_dialog = gtk.AboutDialog() self.about_dialog.set_name('Mirage') self.about_dialog.set_version(__version__) self.about_dialog.set_comments(_('A fast GTK+ Image Viewer.')) self.about_dialog.set_license(__license__) self.about_dialog.set_authors(['Scott Horowitz <stonecrest@gmail.com>']) self.about_dialog.set_a...
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/...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def zoom_1_to_1_action(self, action): self.zoom_1_to_1(action, False)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
self.expand_directory(itempath, False, go_buttons_enabled)
self.expand_directory(itempath, False, go_buttons_enabled, False)
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
self.expand_directory(item, True, go_buttons_enabled)
self.expand_directory(item, True, go_buttons_enabled, False)
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
self.expand_directory(item, False, go_buttons_enabled)
self.expand_directory(item, False, go_buttons_enabled, True)
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)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled):
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled, update_title):
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
self.expand_directory(item2, stop_when_image_found, go_buttons_enabled) self.set_window_title() if not self.closing_app: while gtk.events_pending(): gtk.main_iteration(True)
self.expand_directory(item2, stop_when_image_found, go_buttons_enabled, update_title) if update_title == True: self.set_window_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): 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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
return old_pix
return old_pix
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
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...
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py