From 1a435127f2a21e1360abb001c6de257fea372391 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Thu, 2 Jul 2015 21:42:40 +0200 Subject: [PATCH] Fix URL opening. Little too much removed in original port, meaning one click = two copies of page opened. --- terminatorlib/terminal.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index a79f365d..1b543eee 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1376,7 +1376,11 @@ class Terminal(Gtk.VBox): except: dbg('custom url handler did not work, falling back to defaults') - Gtk.show_uri(None, url, Gdk.CURRENT_TIME) + try: + Gtk.show_uri(None, url, Gdk.CURRENT_TIME) + return + except: + dbg('Gtk.show_uri did not work, falling through to xdg-open') try: subprocess.Popen(["xdg-open", url])