Drop all our URL madness and make it pygtk's problem. Requires pygtk >=2.14
This commit is contained in:
parent
7970033368
commit
667d31e394
|
@ -9,7 +9,6 @@ import pygtk
|
||||||
pygtk.require('2.0')
|
pygtk.require('2.0')
|
||||||
import gtk
|
import gtk
|
||||||
import gobject
|
import gobject
|
||||||
import subprocess
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from version import APP_NAME
|
from version import APP_NAME
|
||||||
|
@ -633,18 +632,10 @@ class Terminal(gtk.VBox):
|
||||||
|
|
||||||
def open_url(self, url, prepare=False):
|
def open_url(self, url, prepare=False):
|
||||||
"""Open a given URL, conditionally unpacking it from a VTE match"""
|
"""Open a given URL, conditionally unpacking it from a VTE match"""
|
||||||
# FIXME: Use gtk.show_uri()
|
|
||||||
if prepare == True:
|
if prepare == True:
|
||||||
url = self.prepare_url(url)
|
url = self.prepare_url(url)
|
||||||
dbg('open_url: URL: %s (prepared: %s)' % (url, prepare))
|
dbg('open_url: URL: %s (prepared: %s)' % (url, prepare))
|
||||||
try:
|
gtk.show_uri(None, url, gtk.gdk.CURRENT_TIME)
|
||||||
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')
|
|
||||||
|
|
||||||
def paste_clipboard(self, primary=False):
|
def paste_clipboard(self, primary=False):
|
||||||
"""Paste one of the two clipboards"""
|
"""Paste one of the two clipboards"""
|
||||||
|
|
Loading…
Reference in New Issue