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 414029 - Hyperlinks cannot be dragged with mouse
Hyperlinks cannot be dragged with mouse
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
: 469088 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-02 22:09 UTC by Wouter Bolsterlee (uws)
Modified: 2009-10-04 00:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Activate links on button release (767 bytes, patch)
2008-10-24 17:27 UTC, Stefan Schweizer
none Details | Review
Allow dragging of hyperlinks with the mouse (1.68 KB, patch)
2009-05-06 12:56 UTC, Stefan Schweizer
committed Details | Review
Fix middle-click pasting of links (1.43 KB, patch)
2009-05-13 09:23 UTC, Stefan Schweizer
committed Details | Review

Description Wouter Bolsterlee (uws) 2007-03-02 22:09:04 UTC
Hyperlinks should be activated on button release, not on button press. This makes dragging hyperlinked text impossible.
Comment 1 Sandy Armstrong 2007-04-24 02:00:05 UTC
This is an exact dupe of bug #157241.  Does anyone know if GtkTextView still has no URL support?  I don't want to mark it as a dupe if it can actually be fixed now.
Comment 2 Boyd Timothy 2008-02-26 19:15:05 UTC
Setting the default assignee and QA Contact to "tomboy-maint@gnome.bugs".
Comment 3 Stefan Schweizer 2008-10-24 17:27:07 UTC
Created attachment 121295 [details] [review]
Activate links on button release

I changed the event from ButtonPress to ButtonRelease. It seems to work except for a problem with evolution links: when I activate an email link, the message opens but the cursor keeps selecting text although no button is pressed. I guess that happens because the event handler returns true now for the release event and the event is not propagated further. Can we safely return false from this method all the time?
Comment 4 Stefan Schweizer 2009-05-06 12:56:31 UTC
Created attachment 134103 [details] [review]
Allow dragging of hyperlinks with the mouse

I tried to finish this. The patch changes the event type from ButtonPress to ButtonRelease, all links in Tomboy are now opened when the mouse button is released. To solve the selection problem, the handler now always returns false.

Another effect of changing the event type was that links could no longer be activated with the middle button because the current selection was inserted into the link. That is why the ButtonPress event is still handled for such cases.

Please test this patch extensively.
Comment 5 Sandy Armstrong 2009-05-06 15:05:53 UTC
Confirming, let's look at this for 0.15.1.
Comment 6 Stefan Schweizer 2009-05-07 12:19:38 UTC
I just found a problem with my patch: when middle-click-pasting a link to a note, the link is opened immediatley.
Comment 7 Sandy Armstrong 2009-05-07 14:02:01 UTC
Do we have to do something like saving and checking against the last link that received a ButtonPress with button 1?  Or is it simpler than that...do we just need to check for the right button on ButtonRelease?
Comment 8 bugra 2009-05-12 14:18:25 UTC
bug #469088 seems to be a duplicate of this one.
Comment 9 Sandy Armstrong 2009-05-12 14:32:51 UTC
*** Bug 469088 has been marked as a duplicate of this bug. ***
Comment 10 Sandy Armstrong 2009-05-12 14:33:44 UTC
Okay, let's just make sure we cover all links and not just web/file links in this bug.
Comment 11 Stefan Schweizer 2009-05-13 09:23:40 UTC
Created attachment 134553 [details] [review]
Fix middle-click pasting of links

Now links are only activated if there was a preceding ButtonPress event. Both patches have to be applied when testing this.
Comment 12 Sandy Armstrong 2009-05-13 17:32:55 UTC
This seems to work really well for me.  The only thing I noticed is that when I drag a bugzilla link, I lose the icon.

I've pushed these two commits...let's fix the bugzilla thing and whatever else comes up.
Comment 13 Stefan Schweizer 2009-05-15 08:40:05 UTC
Same with evolution mail icons. I think this is a general problem with links that include icons, there is also a bug report about copy/paste: bug #500927.
Comment 14 Sandy Armstrong 2009-05-15 17:15:01 UTC
Okay, please confirm and update bug #500927.  Closing this bug as fixed.  Thanks!