aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-26 03:09:19 +0800
committerDan Winship <danw@src.gnome.org>2000-04-26 03:09:19 +0800
commita8b75db188973f543024dc51b0aeeb74bae7387f (patch)
tree4842c464720130196f520349da3a9cc30eb74db8 /mail
parent0759a9fa89706b3197ae3771f2098c2393f49386 (diff)
downloadgsoc2013-evolution-a8b75db188973f543024dc51b0aeeb74bae7387f.tar
gsoc2013-evolution-a8b75db188973f543024dc51b0aeeb74bae7387f.tar.gz
gsoc2013-evolution-a8b75db188973f543024dc51b0aeeb74bae7387f.tar.bz2
gsoc2013-evolution-a8b75db188973f543024dc51b0aeeb74bae7387f.tar.lz
gsoc2013-evolution-a8b75db188973f543024dc51b0aeeb74bae7387f.tar.xz
gsoc2013-evolution-a8b75db188973f543024dc51b0aeeb74bae7387f.tar.zst
gsoc2013-evolution-a8b75db188973f543024dc51b0aeeb74bae7387f.zip
(setup_function_table): pass unknown text subtypes to
handle_text_plain. (handle_multipart_appledouble): new handler. Just ignores the first (application/applefile) part and tries to display the second part. Since the second part is usually application/octet-stream, this doesn't work very well still usually. svn path=/trunk/; revision=2611
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-format.c30
2 files changed, 34 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 0789226ed8..4a34902734 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -3,6 +3,13 @@
* mail-format.c (reply_body): Fix some bugs that crept into reply
generation. This needs a lot more work to deal correctly with
complicated bodies.
+ (setup_function_table): pass unknown text subtypes to
+ handle_text_plain.
+ (handle_multipart_appledouble): new handler. Just ignores the
+ first (application/applefile) part and tries to display the
+ second part. Since the second part is usually
+ application/octet-stream, this doesn't work very well still
+ usually.
* mail-display.c, mail-format.c: Redo large chunks of this. The
mail display now consists of a vbox in a scrolled window, in which
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 6d303f49fb..ae4af7fef8 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -54,6 +54,9 @@ static void handle_multipart_related (CamelMimePart *part,
static void handle_multipart_alternative (CamelMimePart *part,
CamelMimeMessage *root,
GtkBox *box);
+static void handle_multipart_appledouble (CamelMimePart *part,
+ CamelMimeMessage *root,
+ GtkBox *box);
static void handle_audio (CamelMimePart *part,
CamelMimeMessage *root,
GtkBox *box);
@@ -174,6 +177,11 @@ setup_function_table (void)
handle_text_enriched);
g_hash_table_insert (mime_function_table, "text/html",
handle_text_html);
+ /* RFC 2046 says unrecognized text subtypes can be treated
+ * as text/plain (as long as you recognize the character set).
+ */
+ g_hash_table_insert (mime_function_table, "text",
+ handle_text_plain);
g_hash_table_insert (mime_function_table, "image",
handle_image);
@@ -190,6 +198,8 @@ setup_function_table (void)
handle_multipart_related);
g_hash_table_insert (mime_function_table, "multipart/mixed",
handle_multipart_mixed);
+ g_hash_table_insert (mime_function_table, "multipart/appledouble",
+ handle_multipart_appledouble);
/* RFC 2046 says unrecognized multipart subtypes should be
* treated like multipart/mixed.
*/
@@ -871,10 +881,24 @@ handle_multipart_alternative (CamelMimePart *part, CamelMimeMessage *root,
handle_unknown_type (part, root, box);
}
-void
-stream_destroy_notify (gpointer data)
+/* RFC 1740 */
+static void
+handle_multipart_appledouble (CamelMimePart *part, CamelMimeMessage *root,
+ GtkBox *box)
{
- camel_stream_close (data);
+ CamelDataWrapper *wrapper =
+ camel_medium_get_content_object (CAMEL_MEDIUM (part));
+ CamelMultipart *multipart;
+
+ g_return_if_fail (CAMEL_IS_MULTIPART (wrapper));
+ multipart = CAMEL_MULTIPART (wrapper);
+
+ /* The first part is application/applefile and is not useful
+ * to us. The second part _may_ be displayable data. Most
+ * likely it's application/octet-stream though.
+ */
+ part = CAMEL_MIME_PART (camel_multipart_get_part (multipart, 1));
+ call_handler_function (part, root, box);
}
static void