aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-21 10:50:08 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-21 10:50:08 +0800
commita8705a44c50e1303157b769c59d8a86d3b008839 (patch)
treef6df7dcd2c6fca41f5717b8d242dbbc6e1221566 /mail/em-format-html.c
parentb476b5573e56fb9da9bc7730d920f18b5a771ab1 (diff)
downloadgsoc2013-evolution-a8705a44c50e1303157b769c59d8a86d3b008839.tar.gz
gsoc2013-evolution-a8705a44c50e1303157b769c59d8a86d3b008839.tar.zst
gsoc2013-evolution-a8705a44c50e1303157b769c59d8a86d3b008839.zip
** See bug #53159.
2004-01-21 Not Zed <NotZed@Ximian.com> ** See bug #53159. * em-format.c (emf_message_rfc822): removed incorrect comment, this is not a fallback. * em-format-html.c (efh_text_plain): check the content-type of the containee object, not the holder. ** See bug #52979. * em-format-html.c: take out text/x-patch and put in text/* for a text/plain fallback handler instead. * em-format-html-display.c (efhd_find_handler): allow the bonobo handlers to override the builtin ones. svn path=/trunk/; revision=24341
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index a0346b00b0..441dc854e8 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -664,6 +664,7 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
CamelStreamFilter *filtered_stream;
CamelMimeFilter *html_filter;
CamelMultipart *mp;
+ CamelDataWrapper *dw;
CamelContentType *type;
const char *format;
guint32 rgb = 0x737373, flags;
@@ -677,10 +678,11 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
flags = efh->text_html_flags;
+ dw = camel_medium_get_content_object((CamelMedium *)part);
+
/* Check for RFC 2646 flowed text. */
- type = camel_mime_part_get_content_type(part);
- if (camel_content_type_is (type, "text", "plain")
- && (format = camel_content_type_param (type, "format"))
+ if (camel_content_type_is(dw->mime_type, "text", "plain")
+ && (format = camel_content_type_param(dw->mime_type, "format"))
&& !g_ascii_strcasecmp(format, "flowed"))
flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
@@ -703,9 +705,9 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
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), ((CamelDataWrapper *)part)->mime_type);
+ inline_filter = em_inline_filter_new(camel_mime_part_get_encoding(part), dw->mime_type);
camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)inline_filter);
- camel_data_wrapper_write_to_stream(camel_medium_get_content_object((CamelMedium *)part), (CamelStream *)filtered_stream);
+ camel_data_wrapper_write_to_stream(dw, (CamelStream *)filtered_stream);
camel_stream_close((CamelStream *)filtered_stream);
camel_object_unref(filtered_stream);
mp = em_inline_filter_get_multipart(inline_filter);
@@ -1132,10 +1134,9 @@ static EMFormatHandler type_builtin_table[] = {
{ "image/x-xpixmap", (EMFormatFunc)efh_image },
{ "text/enriched", (EMFormatFunc)efh_text_enriched },
{ "text/plain", (EMFormatFunc)efh_text_plain },
- { "text/x-patch", (EMFormatFunc)efh_text_plain },
{ "text/html", (EMFormatFunc)efh_text_html },
{ "text/richtext", (EMFormatFunc)efh_text_enriched },
- /*{ "text/ *", (EMFormatFunc)efh_text_plain },*/
+ { "text/*", (EMFormatFunc)efh_text_plain },
{ "message/external-body", (EMFormatFunc)efh_message_external },
{ "multipart/signed", (EMFormatFunc)efh_multipart_signed },
{ "multipart/related", (EMFormatFunc)efh_multipart_related },