aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-13 06:23:08 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-13 06:23:08 +0800
commit8ffcf0b7552e8b921228a8aa372335a161d262b8 (patch)
tree0742e7cc5dc7d17053c46d68b31a07a90eb0fc33 /mail/mail-format.c
parent5020c3bd9a2b87eca463118f31fdb75ff44caa46 (diff)
downloadgsoc2013-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-format.c')
-rw-r--r--mail/mail-format.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 1cc5a3d851..d353b0b249 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -92,6 +92,9 @@ static gboolean handle_multipart_encrypted (CamelMimePart *part,
static gboolean handle_multipart_signed (CamelMimePart *part,
const char *mime_type,
MailDisplay *md, GtkHTML *html, GtkHTMLStream *stream);
+static gboolean handle_multipart_digest (CamelMimePart *part,
+ const char *mime_type,
+ MailDisplay *md, GtkHTML *html, GtkHTMLStream *stream);
static gboolean handle_message_rfc822 (CamelMimePart *part,
const char *mime_type,
MailDisplay *md, GtkHTML *html, GtkHTMLStream *stream);
@@ -364,6 +367,8 @@ setup_mime_tables (void)
handle_multipart_encrypted);
g_hash_table_insert (mime_function_table, "multipart/signed",
handle_multipart_signed);
+ g_hash_table_insert (mime_function_table, "multipart/digest",
+ handle_multipart_digest);
/* RFC 2046 says unrecognized text subtypes can be treated
* as text/plain (as long as you recognize the character set),
@@ -1694,6 +1699,22 @@ handle_multipart_mixed (CamelMimePart *part, const char *mime_type,
}
static gboolean
+handle_multipart_digest (CamelMimePart *part, const char *mime_type,
+ MailDisplay *md, GtkHTML *html, GtkHTMLStream *stream)
+{
+ CamelDataWrapper *wrapper =
+ camel_medium_get_content_object (CAMEL_MEDIUM (part));
+
+ g_return_val_if_fail (CAMEL_IS_MULTIPART (wrapper), FALSE);
+
+ gtk_html_stream_printf (stream, "&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"digest:\"><img src=\"%s\">%s</a>",
+ get_url_for_icon (EVOLUTION_ICONSDIR "/envelope.png", md),
+ U_("View messages..."));
+
+ return TRUE;
+}
+
+static gboolean
handle_multipart_encrypted (CamelMimePart *part, const char *mime_type,
MailDisplay *md, GtkHTML *html, GtkHTMLStream *stream)
{