aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-29 17:45:59 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-29 17:45:59 +0800
commitcd7969810436f5f4074736e72e6f68fac9469074 (patch)
tree7767882422251390ce1c9c06300bf662a2ffdc2b /mail/em-format-html.c
parent1d8c2ddc164c6b4c90f58310b385655ccdd98667 (diff)
downloadgsoc2013-evolution-cd7969810436f5f4074736e72e6f68fac9469074.tar
gsoc2013-evolution-cd7969810436f5f4074736e72e6f68fac9469074.tar.gz
gsoc2013-evolution-cd7969810436f5f4074736e72e6f68fac9469074.tar.bz2
gsoc2013-evolution-cd7969810436f5f4074736e72e6f68fac9469074.tar.lz
gsoc2013-evolution-cd7969810436f5f4074736e72e6f68fac9469074.tar.xz
gsoc2013-evolution-cd7969810436f5f4074736e72e6f68fac9469074.tar.zst
gsoc2013-evolution-cd7969810436f5f4074736e72e6f68fac9469074.zip
Fixes a bug i can't find right now
2004-01-29 Not Zed <NotZed@Ximian.com> * em-format-html-display.c (efhd_attachment_button): check the snooped type for the icon/etc. (efhd_format_attachment): save the snooped type in the attach_puri. * em-format-html.c (efh_text_plain): If we had a snooped type, use that as the base type, rather than octet-stream, which will cause an attachment in attachment loop. * em-format.c (em_format_part_as): save the current snooped mime type in a stack if we had any. svn path=/trunk/; revision=24515
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 441dc854e8..a619040ef0 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -701,11 +701,20 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
if (mp == NULL) {
EMInlineFilter *inline_filter;
CamelStream *null;
+ CamelContentType *ct;
+
+ /* if we had to snoop the part type to get here, then
+ * use that as the base type, yuck */
+ if (((EMFormat *)efh)->snoop_mime_type == NULL
+ || (ct = camel_content_type_decode(((EMFormat *)efh)->snoop_mime_type)) == NULL) {
+ ct = dw->mime_type;
+ camel_content_type_ref(ct);
+ }
null = camel_stream_null_new();
filtered_stream = camel_stream_filter_new_with_stream(null);
camel_object_unref(null);
- inline_filter = em_inline_filter_new(camel_mime_part_get_encoding(part), dw->mime_type);
+ inline_filter = em_inline_filter_new(camel_mime_part_get_encoding(part), ct);
camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)inline_filter);
camel_data_wrapper_write_to_stream(dw, (CamelStream *)filtered_stream);
camel_stream_close((CamelStream *)filtered_stream);
@@ -713,6 +722,7 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
mp = em_inline_filter_get_multipart(inline_filter);
g_hash_table_insert(efh->priv->text_inline_parts, part, mp);
camel_object_unref(inline_filter);
+ camel_content_type_unref(ct);
}
filtered_stream = camel_stream_filter_new_with_stream(stream);