[evolution/gnome-3-8] Show parts with Content-ID of multipart/mixed as attachments
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-8] Show parts with Content-ID of multipart/mixed as attachments
- Date: Thu, 4 Apr 2013 18:49:12 +0000 (UTC)
commit 62da90cd15a0c61fe524bbe0d8a3b30068aef8d8
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 4 20:44:40 2013 +0200
Show parts with Content-ID of multipart/mixed as attachments
The multipart/mixed should behave differently than multipart/related,
because subparts of multipart/mixed are not meant to reference each
other by default, thus the subparts should be shown as attachments.
This was reported at https://bugzilla.redhat.com/show_bug.cgi?id=947409
em-format/e-mail-parser-multipart-mixed.c | 9 ++++++---
em-format/e-mail-parser-multipart-related.c | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/em-format/e-mail-parser-multipart-mixed.c b/em-format/e-mail-parser-multipart-mixed.c
index 1fdfb3c..1d14fce 100644
--- a/em-format/e-mail-parser-multipart-mixed.c
+++ b/em-format/e-mail-parser-multipart-mixed.c
@@ -83,10 +83,13 @@ empe_mp_mixed_parse (EMailParserExtension *extension,
ct = camel_mime_part_get_content_type (subpart);
/* Display parts with CID as attachments
- * (unless they already are attachments). */
+ * (unless they already are attachments).
+ * Show also hidden attachments with CID,
+ * because this is multipart/mixed,
+ * not multipart/related. */
if (mail_part != NULL &&
- mail_part->cid != NULL &&
- !mail_part->is_attachment) {
+ mail_part->cid != NULL &&
+ (!mail_part->is_attachment || mail_part->is_hidden)) {
e_mail_parser_wrap_as_attachment (
parser, subpart, part_id, &work_queue);
diff --git a/em-format/e-mail-parser-multipart-related.c b/em-format/e-mail-parser-multipart-related.c
index e2ed728..c90e5bf 100644
--- a/em-format/e-mail-parser-multipart-related.c
+++ b/em-format/e-mail-parser-multipart-related.c
@@ -125,7 +125,7 @@ empe_mp_related_parse (EMailParserExtension *extension,
for (link = head; link != NULL; link = g_list_next (link)) {
EMailPart *mail_part = link->data;
- /* Don't render the part on it's own! */
+ /* Don't render the part on its own! */
if (e_mail_part_utils_body_refers (html_body, mail_part->cid))
mail_part->is_hidden = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]