aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-01-29 21:49:27 +0800
committerMilan Crha <mcrha@redhat.com>2013-01-29 21:49:27 +0800
commit6d7b644e8e890929d267fbfffcaed5e60d9dff2a (patch)
tree1264b312e43a8b87de2ad460b9a2a9e861f380d5 /modules
parent26a6c53d0a6b306691a3f064729d4a98e74883e0 (diff)
downloadgsoc2013-evolution-6d7b644e8e890929d267fbfffcaed5e60d9dff2a.tar
gsoc2013-evolution-6d7b644e8e890929d267fbfffcaed5e60d9dff2a.tar.gz
gsoc2013-evolution-6d7b644e8e890929d267fbfffcaed5e60d9dff2a.tar.bz2
gsoc2013-evolution-6d7b644e8e890929d267fbfffcaed5e60d9dff2a.tar.lz
gsoc2013-evolution-6d7b644e8e890929d267fbfffcaed5e60d9dff2a.tar.xz
gsoc2013-evolution-6d7b644e8e890929d267fbfffcaed5e60d9dff2a.tar.zst
gsoc2013-evolution-6d7b644e8e890929d267fbfffcaed5e60d9dff2a.zip
Bug #692775 - Double-quoting message with HTML and text
Diffstat (limited to 'modules')
-rw-r--r--modules/prefer-plain/e-mail-parser-prefer-plain.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c
index 1351b33c6c..914b96952d 100644
--- a/modules/prefer-plain/e-mail-parser-prefer-plain.c
+++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c
@@ -311,6 +311,20 @@ empe_prefer_plain_parse (EMailParserExtension *extension,
if (has_calendar || (nparts > 1 && emp_pp->mode == PREFER_HTML))
hide_parts (&plain_text_parts);
+ if (!g_queue_is_empty (&plain_text_parts) && !g_queue_is_empty (&work_queue) && nparts > 1) {
+ /* a text/html part is hidden, but not marked as attachment,
+ thus do that now, when there exists a text/plain part */
+ GList *qiter;
+
+ for (qiter = g_queue_peek_head_link (&work_queue); qiter; qiter = g_list_next (qiter)) {
+ EMailPart *mpart = qiter->data;
+
+ if (mpart && mpart->is_hidden && g_strcmp0 (mpart->mime_type, "text/html") == 0) {
+ mpart->is_attachment = TRUE;
+ }
+ }
+ }
+
/* plain_text parts should be always first */
e_queue_transfer (&plain_text_parts, out_mail_parts);
e_queue_transfer (&work_queue, out_mail_parts);