You could add this on the top of the on_vte_press_button function:
# Left mouse button and CTRL on a url should open a browser window mask = gtk.gdk.CONTROL_MASK if (event.state & mask) == mask: if event.button == 1: url = self._vte.match_check (int (event.x / self._vte.get_char_width ()), int (event.y / self._vte.get_char_height ())) if url: if (url[0][0:7] != "mailto:") & (url[1] == self.matches['email']): address = "mailto:" + url[0] else: address = url[0] openurl ( address ) return False
It only works with http:// ... links, same behaviour as the "Open Link" option in the context menu.
You could add this on the top of the on_vte_press_button function:
# Left mouse button and CTRL on a url should open a browser window CONTROL_ MASK match_check (int (event.x / self._vte. get_char_ width ()), int (event.y / self._vte. get_char_ height ())) 'email' ]):
mask = gtk.gdk.
if (event.state & mask) == mask:
if event.button == 1:
url = self._vte.
if url:
if (url[0][0:7] != "mailto:") & (url[1] == self.matches[
address = "mailto:" + url[0]
else:
address = url[0]
openurl ( address )
return False
It only works with http:// ... links, same behaviour as the "Open Link" option in the context menu.