openbsd-ports/graphics/mirage/patches/patch-mirage_py
2012-05-10 09:22:44 +00:00

61 lines
2.4 KiB
Plaintext

$OpenBSD: patch-mirage_py,v 1.3 2012/05/10 09:22:44 ajacoutot Exp $
Last part of the patch is from upstream:
http://svn.berlios.de/viewvc/mirageiv/trunk/mirage.py?r1=347&r2=348
--- mirage.py.orig Sun Feb 13 23:40:05 2011
+++ mirage.py Wed May 9 17:50:50 2012
@@ -157,7 +157,7 @@ class Base:
self.preloading_images = True
self.action_names = ["Open in GIMP", "Create Thumbnail", "Create Thumbnails", "Move to Favorites"]
self.action_shortcuts = ["<Control>e", "<Alt>t", "<Control><Alt>t", "<Control><Alt>f"]
- self.action_commands = ["gimp-remote-2.4 %F", "convert %F -thumbnail 150x150 %Pt_%N.jpg", "convert %F -thumbnail 150x150 %Pt_%N.jpg", "mkdir -p ~/mirage-favs; mv %F ~/mirage-favs; [NEXT]"]
+ self.action_commands = ["gimp-remote %F", "convert %F -thumbnail 150x150 %Pt_%N.jpg", "convert %F -thumbnail 150x150 %Pt_%N.jpg", "mkdir -p ~/mirage-favs; mv %F ~/mirage-favs; [NEXT]"]
self.action_batch = [False, False, True, False]
self.onload_cmd = None
self.searching_for_images = False
@@ -2970,26 +2970,11 @@ class Base:
def browser_load(self, docslink):
try:
- pid = subprocess.Popen(["gnome-open", docslink]).pid
+ pid = subprocess.Popen(["xdg-open", docslink]).pid
except:
- try:
- pid = subprocess.Popen(["exo-open", docslink]).pid
- except:
- try:
- pid = subprocess.Popen(["kfmclient", "openURL", docslink]).pid
- except:
- try:
- pid = subprocess.Popen(["firefox", docslink]).pid
- except:
- try:
- pid = subprocess.Popen(["mozilla", docslink]).pid
- except:
- try:
- pid = subprocess.Popen(["opera", docslink]).pid
- except:
- error_dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE, _('Unable to launch a suitable browser.'))
- error_dialog.run()
- error_dialog.destroy()
+ error_dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE, _('Unable to launch a suitable browser.'))
+ error_dialog.run()
+ error_dialog.destroy()
def close_about(self, event, data=None):
self.about_dialog.hide()
@@ -4575,10 +4560,10 @@ class Base:
timer_screensaver = gobject.timeout_add(1000, self.disable_screensaver_in_slideshow_mode)
def main(self):
+ gtk.gdk.threads_enter()
gtk.main()
+ gtk.gdk.threads_leave()
if __name__ == "__main__":
base = Base()
- gtk.gdk.threads_enter()
base.main()
- gtk.gdk.threads_leave()