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 562512 - Make hyperlinks clickable in Memos, Tasks, and Calendar items
Make hyperlinks clickable in Memos, Tasks, and Calendar items
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Memos
2.22.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: Milan Crha
Evolution QA team
evolution[compeditor]
: 304112 597115 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-11-28 00:25 UTC by Nick Jenkins
Modified: 2009-10-16 07:22 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
proposed evo patch (6.08 KB, patch)
2009-05-29 14:36 UTC, Milan Crha
needs-work Details | Review
widgets/misc/e-buffer-tagger.h (1.04 KB, text/plain)
2009-05-29 14:37 UTC, Milan Crha
  Details
widgets/misc/e-buffer-tagger.c (14.56 KB, text/plain)
2009-05-29 14:38 UTC, Milan Crha
  Details
Rebased patch (22.77 KB, patch)
2009-08-03 15:05 UTC, Matthew Barnes
needs-work Details | Review
proposed evo patch ][ (23.21 KB, patch)
2009-08-03 19:38 UTC, Milan Crha
committed Details | Review

Description Nick Jenkins 2008-11-28 00:25:42 UTC
Steps to illustrate:
* Open Evolution 2.22.3.1
* Make a new memo item OR calendar item OR task item.
* Select the "description" field.
* type or copy-paste: "this next string: http://test.com/blah should be clickable"
* click on the URL.

what happens:
* Nothing

What should ideally happen:
* Hyperlink is opened in the default browser.
Comment 1 Matthew Barnes 2009-02-24 03:50:06 UTC
Yeah I really want this to.  I use Tasks as a TODO list for bugs, so I use lots of hyperlinks.  Will try to look into this for 2.27.x, but no promises.
Comment 2 Milan Crha 2009-05-29 14:36:32 UTC
Created attachment 135553 [details] [review]
proposed evo patch

for evolution;

A raw parser for uris, not as that good as in GtkHTML, though taken from there.
The patch isn't complete, I do not know how to add new files to patch in git, thus attaching them individually.
Comment 3 Milan Crha 2009-05-29 14:37:18 UTC
Created attachment 135554 [details]
widgets/misc/e-buffer-tagger.h
Comment 4 Milan Crha 2009-05-29 14:38:14 UTC
Created attachment 135555 [details]
widgets/misc/e-buffer-tagger.c
Comment 5 Milan Crha 2009-07-28 12:40:20 UTC
*** Bug 304112 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Barnes 2009-08-03 15:02:54 UTC
Patch somewhat works in that the URIs I tested were correctly identified and rendered.  Links were not clickable in the editor window, however.  The mouse cursor did not change when I hovered over them either, which might be a clue to the problem.

I see code in EBufferTagger that looks like it should handle this.  Maybe something broke?

Still very much looking forward to this.  :)

Also, I assume by now you've learned how to include new files in git patches?
Comment 7 Matthew Barnes 2009-08-03 15:05:18 UTC
Created attachment 139792 [details] [review]
Rebased patch

Same patch, just rebased to today's git master.  Includes e-buffer-tagger.[ch].
Comment 8 Milan Crha 2009-08-03 16:09:01 UTC
It's necessary to hold Ctrl to let it behave clickable. It's because you are editing a text, where this behaviour without holding ctrl may result in hard-to-select issue. You know, even composer works this way, so I did it similarly.
Comment 9 Matthew Barnes 2009-08-03 17:31:09 UTC
Ah, so it does.  That's fine.

Further testing found that clicking the link works, but causes the mouse cursor to continue using the "pointing-finger" icon when hovering over a link (without Ctrl pressed), instead of the normal text-editing icon.  Might need to just reset the cursor manually in invoke_link_if_present().

Also, would it be difficult to add a tooltip to links explaining how to invoke them?   Something like: "Hold the Ctrl key down and click the link to open it"

Leaving patch in "needs-work" state to get the mouse cursor glitch resolved.
The tooltip can be a separate enhancement if you prefer.
Comment 10 Milan Crha 2009-08-03 19:38:14 UTC
Created attachment 139814 [details] [review]
proposed evo patch ][

for evolution;

Fixed the above. With respect of hints, I'm not liking the idea, it's a special thing for the URL itself, not the whole widget. but I understand your point too, probably only a few people knows how to trigger URLs in the composer. Maybe a doc for it should be "enough"?
Comment 11 Matthew Barnes 2009-08-03 20:18:32 UTC
(In reply to comment #10)
> probably only a few people knows how to trigger URLs in the composer.

I didn't know how and I maintain it.  :)

Turns out OpenOffice Writer does the tooltip thing for links:

    "Ctrl-click to open hyperlink: http://...whatever..."

So there's precedent for it.  Obviously you can't set a tooltip for the whole widget, but you could probably show and hide it manually with the same events you're already using to change the mouse cursor.

Anyway, I'll give the new patch a test drive soon.
Comment 12 André Klapper 2009-10-03 18:44:11 UTC
*** Bug 597115 has been marked as a duplicate of this bug. ***
Comment 13 Milan Crha 2009-10-15 16:36:28 UTC
Created commit 971a53b in evo master (2.29.1+)

Let's close this and wait on user's feedback, if they claim, I can try to add the tooltip somehow.
Comment 14 Nick Jenkins 2009-10-16 01:10:21 UTC
Sounds good, very much looking forward to using this in 2.30!

I did not know about holding down ctrl to open links in the mail composer. In fact for a while I had wondered why URLs turn blue at all in the mail composer, since (I thought) you couldn't do anything with them! Now that I understand better how it works, there are some suggestions related to this - I have logged them all as separate bugs to make tracking easier and keep it manageable, but understand that some are mutually incompatible and/or have overlap:

Suggest either:
a) just making hyperlinks clickable, even in edit mode, for mail composer/memos/tasks/etc. Yes, this can make selecting text inside hyperlinks harder (e.g have to use the text cursor + arrow keys + the shift key instead), but I think the web & browsers have taught people to expect that clicking on a blue hyperlink will cause that link in a web browser. IMHO, trying to fight this user expectation, which has been drummed into people's brains for years, is like pushing a boulder uphill - it's fighting a losing battle. Logged as bug 598633 .
b) Have a tooltip. Logged as bug 598631 .

Both are an improvement. I personally favor a), since I think it's easier than a modifier key, and is more common that selecting inside a hyperlink, but that's a personal opinion, and it's almost certainly more work than the tooltip option (which is definitely a downside).

There's also another option, which is compatible with both of the above: When right-clicking on a link, in the context menu have "Open Link" as the first option, and "Copy Link Address" as the second option. I don't forsee anyone objecting to this. Logged as bug 598634 .

There's also a small problem in that when plain text containing a URL is pasted into the mail composer, it does not get hyperlinked. Logged as bug 598635 .
Comment 15 Milan Crha 2009-10-16 07:22:14 UTC
OK, I'll comment on each respective bug report.