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 586401 - Clicking URLs don't work in adium's themes
Clicking URLs don't work in adium's themes
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat themes
2.27.x
Other Linux
: Normal minor
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2009-06-19 15:20 UTC by Pierre-Luc Beaudoin
Modified: 2009-08-18 20:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix such urls on branch fix-586301 http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401 (757 bytes, patch)
2009-06-26 14:59 UTC, Pierre-Luc Beaudoin
none Details | Review
Update branch fix-586401 http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401 (750 bytes, patch)
2009-06-30 21:16 UTC, Pierre-Luc Beaudoin
none Details | Review
Completely new fix on branch fix-586401 where the http:// is added before hand and not when clicking on the link http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401 (655 bytes, patch)
2009-07-02 19:42 UTC, Pierre-Luc Beaudoin
rejected Details | Review
New fix using Xavier's comments on branch fix-586401 http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401 (2.32 KB, patch)
2009-08-17 23:00 UTC, Pierre-Luc Beaudoin
none Details | Review

Description Pierre-Luc Beaudoin 2009-06-19 15:20:11 UTC
I am unsure what does this theme do, but it inserts a URL button instead of URLs and it doesn't work (because the URL is appended to the basedir).
Comment 1 Olivier Le Thanh Duong 2009-06-22 01:10:27 UTC
I hit the same bug with the renkoo theme which doesn't hide the urls so it's probably a bug with the adium engine 
The link was www.espacemagh.be and I got a message saying it can't open URI :
/home/olivier/renkoo/renkoo.AdiumMessageStyle/Contents/Resources/www.espacemagh.be

Comment 2 Pierre-Luc Beaudoin 2009-06-26 14:59:32 UTC
Created attachment 137424 [details] [review]
Fix such urls on branch fix-586301 http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401

 libempathy-gtk/empathy-theme-adium.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Comment 3 Xavier Claessens 2009-06-29 19:53:21 UTC
Brackets don't respect coding style.
uri = &uri[len]; --> I prefer uri = uri + len or uri += len but that's fine I guess :p
Comment 4 Pierre-Luc Beaudoin 2009-06-30 21:16:37 UTC
Created attachment 137649 [details] [review]
Update branch fix-586401 http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401

 libempathy-gtk/empathy-theme-adium.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
Comment 5 Pierre-Luc Beaudoin 2009-07-02 19:42:17 UTC
Created attachment 137748 [details] [review]
Completely new fix on branch fix-586401 where the http:// is added before hand and not when clicking on the link http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401

 libempathy-gtk/empathy-theme-adium.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Comment 6 Xavier Claessens 2009-07-03 04:14:56 UTC
There is not only http(s) and mailto. The regex to catch URI has that (empathy-ui-utils.h):

#define SCHEMES "(https?|s?ftps?|nntp|news|javascript|about|ghelp|apt|telnet|"\
		"file|webcal|mailto)"

Probably the correct fix is if (g_str_has_prefix (url, "www.") ||g_str_has_prefix (url, "ftp."). It seems those are the 2 only non-absolute links we support.

Or if (g_uri_parse_scheme(url)==NULL)
Comment 7 Xavier Claessens 2009-07-03 04:18:04 UTC
Oh and last possibility, see fixup_url() in empathy-ui-utils.c. That's the function used to make the clicked URL absolute to work with gtk_show_uri(). It is a bit more agressive :)
Comment 8 Pierre-Luc Beaudoin 2009-08-17 23:00:59 UTC
Created attachment 141004 [details] [review]
New fix using Xavier's comments on branch fix-586401 http://git.collabora.co.uk/?p=user/pierlux/empathy.git;a=shortlog;h=refs/heads/fix-586401

 libempathy-gtk/empathy-theme-adium.c |   10 +++++++++-
 libempathy-gtk/empathy-ui-utils.c    |    6 +++---
 libempathy-gtk/empathy-ui-utils.h    |    2 ++
 3 files changed, 14 insertions(+), 4 deletions(-)
Comment 9 Pierre-Luc Beaudoin 2009-08-18 20:24:31 UTC
Merged after applying Xavier's comment (empathy_make_absolute_url should not return NULL) and a re-review.