After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 540023 - change cursor over highlighted URLs only when CTRL is pressed
change cursor over highlighted URLs only when CTRL is pressed
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
: 560289 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-06-24 19:19 UTC by Behdad Esfahbod
Modified: 2021-06-10 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
concept patch (14.39 KB, patch)
2008-06-24 21:30 UTC, Christian Persch
needs-work Details | Review

Description Behdad Esfahbod 2008-06-24 19:19:32 UTC
vte and g-t from trunk.  Clicking on URL does nothing.
Ctrl-clicking shows a dialog saying:

Could not open the address “http://bugzilla.gnome.org/show_bug.cgi?id=540022”:
Operation not supported
Comment 1 Christian Persch 2008-06-24 19:34:51 UTC
Works here, using g-t, vte, gtk, glib etc. all from svn trunk. 

This error being displayed means that g_app_info_launch_default_for_uri failed; something seems to be broken on your system.
Comment 2 Christian Persch 2008-06-24 19:37:18 UTC
More precisely, ctrl+click does work here. click without control never did anything, afaik.
Comment 3 Behdad Esfahbod 2008-06-24 19:40:28 UTC
Right.  But now when I hover the link I see a hand cursor.  Wasn't like that previously.
Comment 4 Christian Persch 2008-06-24 19:44:23 UTC
That was fixed in bug 105986. I guess it does suggest that clicking it may have some effect... Do you think we should open the url on simple click, or only show the hand if ctrl is hold down (would need vte changes) ?
Comment 5 Behdad Esfahbod 2008-06-24 19:54:57 UTC
Open on single click is fine if we do on release, to not break selection.
Comment 6 Christian Persch 2008-06-24 20:39:32 UTC
Unfortunately that doesn't work. Think click-move-release to select, but you release over something that's matched as a link -> opens the url.
Comment 7 Behdad Esfahbod 2008-06-24 20:40:51 UTC
Sure, I meant open URL only if not selecting.
Comment 8 Christian Persch 2008-06-24 21:21:11 UTC
Unfortunately there's no way to find out, afaics. VteTerminal's button-release-event handler always consumes the event.
Comment 9 Christian Persch 2008-06-24 21:30:57 UTC
Created attachment 113371 [details] [review]
concept patch

I thought this might work, but it didn't.
Comment 10 Behdad Esfahbod 2008-06-25 00:41:09 UTC
(In reply to comment #9)
> Created an attachment (id=113371) [edit]
> concept patch
> 
> I thought this might work, but it didn't.

I have a memory that I experimented with this before.

One way is o call the vte release method, then check selection... ugly.  Another is to fix vte...  Yeah, see bug 13299.
Comment 11 Behdad Esfahbod 2008-06-25 00:41:59 UTC
So, given bug 13299, I think making click open URLs is a wrong thing to do.  Lets focus on the rest of this bug.
Comment 12 Christian Persch 2008-06-25 12:20:59 UTC
The remainder being that g_app_info_launch_default_for_uri returns failure. Which glib and gtk versions? If svn, have you tried updating from svn?
Comment 13 Behdad Esfahbod 2008-06-25 13:29:28 UTC
(In reply to comment #12)
> The remainder being that g_app_info_launch_default_for_uri returns failure.

And the hand icon that shouldn't be there.  Maybe we can do a tooltip to suggest ctrl+click or something.  But given that it's in the context menu, I wouldn't bother.


> Which glib and gtk versions? If svn, have you tried updating from svn?

Compiling trunk.
Comment 14 Behdad Esfahbod 2008-06-25 15:00:14 UTC
(In reply to comment #12)
> The remainder being that g_app_info_launch_default_for_uri returns failure.
> Which glib and gtk versions? If svn, have you tried updating from svn?

Still happening with glib and gtk trunk.

(I also noticed that if I move the cursor from the sides to the URL, it doesn't recognize the URL.  If I move from above or below, it does.)
Comment 15 Christian Persch 2008-06-25 15:11:23 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > The remainder being that g_app_info_launch_default_for_uri returns failure.
> > Which glib and gtk versions? If svn, have you tried updating from svn?
> 
> Still happening with glib and gtk trunk.

Does gvfs-open work on the same URLs?

> (I also noticed that if I move the cursor from the sides to the URL, it doesn't
> recognize the URL.  If I move from above or below, it does.)

Sometimes it seems the cursor has to get about in the middle of the 1st/last character for the highlighting to occur, but on the next try it works at the border. Odd.
Comment 16 Behdad Esfahbod 2008-06-25 15:14:59 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #12)
> > > The remainder being that g_app_info_launch_default_for_uri returns failure.
> > > Which glib and gtk versions? If svn, have you tried updating from svn?
> > 
> > Still happening with glib and gtk trunk.
> 
> Does gvfs-open work on the same URLs?

Humm, no, I get the same error:

$ gvfs-open http://behdad.org/
gvfs-open: http://behdad.org/: error opening location: Operation not supported

Something wrong with my system then...


> > (I also noticed that if I move the cursor from the sides to the URL, it doesn't
> > recognize the URL.  If I move from above or below, it does.)
> 
> Sometimes it seems the cursor has to get about in the middle of the 1st/last
> character for the highlighting to occur, but on the next try it works at the
> border. Odd.

From the sides I can pass over the entire URL without it noticing.

Comment 17 Christian Persch 2008-06-27 17:35:47 UTC
So should we revert bug 105986, or add vte API to only hightlight when Ctrl is pressed, or live with hand cursor on links even without control?
Comment 18 Behdad Esfahbod 2008-06-27 18:59:08 UTC
Umm, I'd say add vte API to only hightlight when Ctrl is pressed, but only if we can add a decent generic API that makes sense.
Comment 19 Christian Persch 2008-09-25 19:03:26 UTC
Retitling.
Comment 20 Christian Persch 2008-11-11 09:59:00 UTC
*** Bug 560289 has been marked as a duplicate of this bug. ***
Comment 21 Omer Akram 2010-01-14 13:35:37 UTC
any love on this one?
Comment 22 Behdad Esfahbod 2010-01-14 17:03:10 UTC
ChPe, can you suggest vte API for this?  Alternatively we can simply drop the hand icon altogether.
Comment 23 Christian Persch 2011-08-05 19:07:04 UTC
-> vte, will address this on vte-next
Comment 24 GNOME Infrastructure Team 2021-06-10 14:00:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vte/-/issues/1518.