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/ChangeLog | 3 +++ mail/mail-display.c | 15 ++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 342d2a3661..00a8dc0893 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -2,6 +2,9 @@ * mail-display.c (html_button_press_event): make the event handlers return FALSE so that gtkhtml can process the events. + (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. 2003-01-17 Larry Ewing 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