diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-12 12:12:01 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-12 12:12:01 +0800 |
commit | c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8 (patch) | |
tree | 246bdb714e24e1b0c9a8ce4a3e45a46b230316de /mail/em-format.c | |
parent | f8b33bc4ebe9dd8043674141b5fe4660efaa99e8 (diff) | |
download | gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar.gz gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.tar.zst gsoc2013-evolution-c7d3c9f95609123035ebaa267f9d2e6ecfa8c2e8.zip |
Merge revisions 36866:37046 from trunk.
svn path=/branches/kill-bonobo/; revision=37050
Diffstat (limited to 'mail/em-format.c')
-rw-r--r-- | mail/em-format.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mail/em-format.c b/mail/em-format.c index 9b05b1ef6e..4af272a3ff 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -1653,6 +1653,8 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart CamelCipherValidity *valid; CamelException *ex; CamelMimePart *opart; + CamelDataWrapper *dw; + char *mime_type; cipher = camel_gpg_context_new(emf->session); ex = camel_exception_new(); @@ -1671,6 +1673,19 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart return; } + dw = camel_medium_get_content_object ((CamelMedium *)opart); + mime_type = camel_data_wrapper_get_mime_type (dw); + + /* this ensures to show the 'opart' as inlined, if possible */ + if (mime_type && g_ascii_strcasecmp (mime_type, "application/octet-stream") == 0) { + const char *snoop = em_utils_snoop_type (opart); + + if (snoop) + camel_data_wrapper_set_mime_type (dw, snoop); + } + + g_free (mime_type); + /* Pass it off to the real formatter */ em_format_format_secure(emf, stream, opart, valid); |