diff options
author | Dan Winship <danw@src.gnome.org> | 2000-04-27 11:32:10 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-04-27 11:32:10 +0800 |
commit | 67b29dfe36a67a9145187c955855df29daec34b2 (patch) | |
tree | f3d79ef60e3021fa643a436baca34eea4a226b40 /mail/mail-display.c | |
parent | e3f95dc9d46d8feff06ee81767cf4785286aa7cf (diff) | |
download | gsoc2013-evolution-67b29dfe36a67a9145187c955855df29daec34b2.tar.gz gsoc2013-evolution-67b29dfe36a67a9145187c955855df29daec34b2.tar.zst gsoc2013-evolution-67b29dfe36a67a9145187c955855df29daec34b2.zip |
Reorganize a bit and add a new flag, TEXT_TO_HTML_CONVERT_URLS to
* mail-format.c (text_to_html): Reorganize a bit and add a new
flag, TEXT_TO_HTML_CONVERT_URLS to recognize and wrap URLs
in text.
* mail-display.c (mail_html_new): Add link_clicked signal handler.
(on_link_clicked): Use gnome_url_show to launch a browser.
The Dingus has landed.
svn path=/trunk/; revision=2653
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index f5595dd671..d7ba658241 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -35,6 +35,12 @@ cid_stream (const char *cid, CamelMimeMessage *message) } static void +on_link_clicked (GtkHTML *html, const char *url, gpointer user_data) +{ + gnome_url_show (url); +} + +static void on_url_requested (GtkHTML *html, const char *url, GtkHTMLStreamHandle handle, gpointer user_data) { @@ -78,6 +84,8 @@ mail_html_new (GtkHTML **html, GtkHTMLStreamHandle **stream, GTK_SIGNAL_FUNC (html_size_req), NULL); gtk_signal_connect (GTK_OBJECT (*html), "url_requested", GTK_SIGNAL_FUNC (on_url_requested), root); + gtk_signal_connect (GTK_OBJECT (*html), "link_clicked", + GTK_SIGNAL_FUNC (on_link_clicked), root); *stream = gtk_html_begin (*html, ""); if (init) { |