ctrl+click should open links

Bug #211079 reported by Emilio Pozuelo Monfort
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
High
hdanniel

Bug Description

I've just read that in gnome-terminal you can open links with ctrl+click, without the need to go to the context menu: http://dgh.livejournal.com/11668.html

I've tried it and that's so cool and so useful that I don't know why I didn't know about it... and I want it in terminator! =)

Chris Jones (cmsj)
Changed in terminator:
importance: Undecided → High
milestone: none → 1.0-beta
status: New → Triaged
Revision history for this message
hdanniel (hdanniel) wrote :

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.

Revision history for this message
Chris Jones (cmsj) wrote :

Thanks for the patch, I have applied it to trunk.

Changed in terminator:
assignee: nobody → pochu
status: Triaged → Fix Committed
Changed in terminator:
assignee: pochu → nobody
Chris Jones (cmsj)
Changed in terminator:
assignee: nobody → hdanniel
Chris Jones (cmsj)
Changed in terminator:
status: Fix Committed → Fix Released
Revision history for this message
Adnan Hodzic (fooctrl) wrote :

I have created this issue with the new GitHub project: https://github.com/gnome-terminator/terminator/issues/3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.