(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
This commit is contained in:
Larry Ewing
2003-01-18 16:56:32 +00:00
parent 8f44e1e0f9
commit 798c3cf8f0
2 changed files with 13 additions and 5 deletions

View File

@ -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 <lewing@ximian.com>

View File

@ -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.
*/