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.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.c')
-rw-r--r-- | mail/em-format.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mail/em-format.c b/mail/em-format.c index ef6678dfb3..7eb8794827 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -477,10 +477,13 @@ void em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type) { const EMFormatHandler *handle = NULL; + const char *snoop_save = emf->snoop_mime_type; + + emf->snoop_mime_type = NULL; if (mime_type != NULL) { if (g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0) - mime_type = emf_snoop_part(part); + emf->snoop_mime_type = mime_type = emf_snoop_part(part); handle = em_format_find_handler(emf, mime_type); if (handle == NULL) @@ -490,6 +493,7 @@ em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const && !em_format_is_attachment(emf, part)) { d(printf("running handler for type '%s'\n", mime_type)); handle->handler(emf, stream, part, handle); + emf->snoop_mime_type = snoop_save; return; } d(printf("this type is an attachment? '%s'\n", mime_type)); @@ -498,6 +502,7 @@ em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const } ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment(emf, stream, part, mime_type, handle); + emf->snoop_mime_type = snoop_save; } void |