[evolution] Bug #692775 - Double-quoting message with HTML and text
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #692775 - Double-quoting message with HTML and text
- Date: Tue, 29 Jan 2013 13:49:58 +0000 (UTC)
commit 6d7b644e8e890929d267fbfffcaed5e60d9dff2a
Author: Milan Crha <mcrha redhat com>
Date: Tue Jan 29 14:49:27 2013 +0100
Bug #692775 - Double-quoting message with HTML and text
modules/prefer-plain/e-mail-parser-prefer-plain.c | 14 ++++++++++++++
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 1351b33..914b969 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]