diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-13 06:23:08 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-13 06:23:08 +0800 |
commit | 8ffcf0b7552e8b921228a8aa372335a161d262b8 (patch) | |
tree | 0742e7cc5dc7d17053c46d68b31a07a90eb0fc33 /mail/mail-display.c | |
parent | 5020c3bd9a2b87eca463118f31fdb75ff44caa46 (diff) | |
download | gsoc2013-evolution-8ffcf0b7552e8b921228a8aa372335a161d262b8.tar.gz gsoc2013-evolution-8ffcf0b7552e8b921228a8aa372335a161d262b8.tar.zst gsoc2013-evolution-8ffcf0b7552e8b921228a8aa372335a161d262b8.zip |
Handle digest: urls.
2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (on_link_clicked): Handle digest: urls.
* mail-format.c (setup_mime_tables): Add a handler for multipart/digest.
(handle_multipart_digest): Handle multipart/digest parts.
svn path=/trunk/; revision=16133
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index 3b82856107..234ecd8db5 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -46,6 +46,8 @@ #include "e-searching-tokenizer.h" #include "folder-browser-factory.h" #include "mail-stream-gtkhtml.h" +#include "folder-browser-window.h" +#include "folder-browser.h" #include "mail-display.h" #include "mail-config.h" #include "mail-ops.h" @@ -217,17 +219,46 @@ mail_display_jump_to_anchor (MailDisplay *md, const char *url) } static void +mail_display_digest_clicked (MailDisplay *md, const char *url) +{ + FolderBrowser *fb, *parent_fb; + CamelFolder *digest; + CamelStore *store; + GtkWidget *window; + + parent_fb = (FolderBrowser *) gtk_widget_get_ancestor (GTK_WIDGET (md), FOLDER_BROWSER_TYPE); + + store = camel_digest_store_new (url); + + digest = camel_digest_folder_new (store, md->current_message); + camel_object_unref (CAMEL_OBJECT (store)); + if (!digest) + return; + + fb = (FolderBrowser *) folder_browser_new (parent_fb->shell, NULL); + folder_browser_set_message_preview (fb, TRUE); + folder_browser_set_folder (fb, digest, url); + camel_object_unref (CAMEL_OBJECT (digest)); + gtk_widget_show (GTK_WIDGET (fb)); + + window = folder_browser_window_new (fb); + gtk_widget_show (window); +} + +static void on_link_clicked (GtkHTML *html, const char *url, MailDisplay *md) { - if (!g_strncasecmp (url, "news:", 5) || - !g_strncasecmp (url, "nntp:", 5)) + if (!g_strncasecmp (url, "news:", 5) || !g_strncasecmp (url, "nntp:", 5)) { g_warning ("Can't handle news URLs yet."); - else if (!g_strncasecmp (url, "mailto:", 7)) + } else if (!g_strncasecmp (url, "mailto:", 7)) { send_to_url (url); - else if (*url == '#') + } else if (!g_strncasecmp (url, "digest:", 7)) { + mail_display_digest_clicked (md, url); + } else if (*url == '#') { mail_display_jump_to_anchor (md, url); - else + } else { gnome_url_show (url); + } } static void |