From 667d31e3944f2327cc992ecb62b856ca7d3f9a1a Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 15 Oct 2009 12:57:50 +0100 Subject: [PATCH] Drop all our URL madness and make it pygtk's problem. Requires pygtk >=2.14 --- terminatorlib/terminal.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index cdc3b22e..8aa0f079 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -9,7 +9,6 @@ import pygtk pygtk.require('2.0') import gtk import gobject -import subprocess import re from version import APP_NAME @@ -633,18 +632,10 @@ class Terminal(gtk.VBox): def open_url(self, url, prepare=False): """Open a given URL, conditionally unpacking it from a VTE match""" - # FIXME: Use gtk.show_uri() if prepare == True: url = self.prepare_url(url) dbg('open_url: URL: %s (prepared: %s)' % (url, prepare)) - try: - subprocess.Popen(['xdg-open', url]) - except OSError: - dbg('open_url: xdg-open failed') - try: - self.terminator.url_show(url) - except: - dbg('open_url: url_show failed. Giving up') + gtk.show_uri(None, url, gtk.gdk.CURRENT_TIME) def paste_clipboard(self, primary=False): """Paste one of the two clipboards"""