From 475d48b16c3e723a5b52523599485d2a4bab3852 Mon Sep 17 00:00:00 2001 From: Anders F Bjorklund Date: Sun, 15 Apr 2012 19:55:56 +0200 Subject: [PATCH] Use terminal instead of xterm, when running with quartz --- zeroinstall/gtkui/applistbox.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zeroinstall/gtkui/applistbox.py b/zeroinstall/gtkui/applistbox.py index 0c96598..619d7fd 100644 --- a/zeroinstall/gtkui/applistbox.py +++ b/zeroinstall/gtkui/applistbox.py @@ -158,6 +158,12 @@ class AppListBox: iface = self.iface_cache.get_interface(uri) reader.update_from_cache(iface) if len(iface.get_metadata(namespaces.XMLNS_IFACE, 'needs-terminal')): + if gtk.pygtk_version >= (2,16,0) and gtk.gdk.WINDOWING == 'quartz': + script = ['0launch', '--', uri] + osascript = support.find_in_path('osascript') + subprocess.Popen([osascript, '-e', 'tell app "Terminal"', '-e', 'activate', + '-e', 'do script "%s"' % ' '.join(script), '-e', 'end tell']) + return for terminal in ['x-terminal-emulator', 'xterm', 'gnome-terminal', 'rxvt', 'konsole']: exe = support.find_in_path(terminal) if exe: -- 2.11.4.GIT