From 798c3cf8f02dfd96b8520b3e0dff833f42bc9c35 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sat, 18 Jan 2003 16:56:32 +0000 Subject: (on_link_clicked): call gnome_url_show with all its arguments so that it actually does something. Also pass news and nntp urls to gnome_url_show so that they can be handled properly. svn path=/trunk/; revision=19515 --- mail/mail-display.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mail/mail-display.c') diff --git a/mail/mail-display.c b/mail/mail-display.c index e5ccf7c24a..e156f72243 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -296,14 +296,19 @@ mail_display_jump_to_anchor (MailDisplay *md, const char *url) static void on_link_clicked (GtkHTML *html, const char *url, MailDisplay *md) { - if (!strncasecmp (url, "news:", 5) || !strncasecmp (url, "nntp:", 5)) { - g_warning ("Can't handle news URLs yet."); - } else if (!strncasecmp (url, "mailto:", 7)) { + + if (!strncasecmp (url, "mailto:", 7)) { send_to_url (url); } else if (*url == '#') { mail_display_jump_to_anchor (md, url); } else { - gnome_url_show (url); + GError *err = NULL; + gnome_url_show (url, err); + + if (err) { + g_warning ("gnome_url_show: %s", err->message); + g_error_free (err); + } } } @@ -823,7 +828,7 @@ save_url (MailDisplay *md, const char *url) g_return_val_if_fail (urls != NULL, NULL); /* See if it's some piece of cached data if it is then pretend it - * is a mime part so that we can use the mime part saveing routines. + * is a mime part so that we can use the mime part saving routines. * It is gross but it keeps duplicated code to a minimum and helps * out with ref counting and the like. */ -- cgit v1.2.3