diff options
author | Not Zed <NotZed@Ximian.com> | 2004-01-29 17:45:59 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-01-29 17:45:59 +0800 |
commit | cd7969810436f5f4074736e72e6f68fac9469074 (patch) | |
tree | 7767882422251390ce1c9c06300bf662a2ffdc2b /mail/em-format-html-display.c | |
parent | 1d8c2ddc164c6b4c90f58310b385655ccdd98667 (diff) | |
download | gsoc2013-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-display.c')
-rw-r--r-- | mail/em-format-html-display.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index d904bf33a6..64fefde3fe 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -116,6 +116,8 @@ struct _attach_puri { const EMFormatHandler *handle; + const char *snoop_mime_type; + /* for the > and V buttons */ GtkWidget *forward, *down; /* currently no way to correlate this data to the frame :( */ @@ -1320,8 +1322,11 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje gtk_container_add((GtkContainer *)button, hbox); gtk_box_pack_start((GtkBox *)mainbox, button, TRUE, TRUE, 0); - /* FIXME: loses any snoop info */ - simple_type = camel_content_type_simple (((CamelDataWrapper *)pobject->part)->mime_type); + /* Check for snooped type to get the right icon/processing */ + if (info->snoop_mime_type) + simple_type = g_strdup(info->snoop_mime_type); + else + simple_type = camel_content_type_simple (((CamelDataWrapper *)pobject->part)->mime_type); camel_strdown(simple_type); /* FIXME: offline parts, just get icon */ @@ -1547,6 +1552,7 @@ efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(EMFormatHTMLPObject), classid, part, efhd_attachment_button); info->handle = handle; info->shown = em_format_is_inline(emf, info->puri.part) && handle != NULL; + info->snoop_mime_type = emf->snoop_mime_type; camel_stream_write_string(stream, "<table height=6><tr><td><a></a></td></tr></table>\n" |