[evolution] [prefer-plain] Fix displaying suppressed HTML parts
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] [prefer-plain] Fix displaying suppressed HTML parts
- Date: Tue, 26 Jun 2012 13:27:22 +0000 (UTC)
commit 2992ba8de93a8d57c48fbf77549ddcab6d49bccd
Author: Dan VrÃtil <dvratil redhat com>
Date: Tue Jun 26 15:12:23 2012 +0200
[prefer-plain] Fix displaying suppressed HTML parts
Fix regression from commit 99a875ed which has broken displaying
of suppressed HTML parts as attachments when the HTML part is embedded
in a multipart/* container.
modules/prefer-plain/e-mail-parser-prefer-plain.c | 41 +++++++++++----------
1 files changed, 21 insertions(+), 20 deletions(-)
---
diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c
index a6f0f4c..6780172 100644
--- a/modules/prefer-plain/e-mail-parser-prefer-plain.c
+++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c
@@ -280,28 +280,29 @@ empe_prefer_plain_parse (EMailParserExtension *extension,
sparts = e_mail_parser_parse_part (
parser, sp, part_id, cancellable);
- if (emp_pp->mode != PREFER_HTML) {
- hide_parts (sparts);
- } else {
- GSList *iter;
- gboolean has_html = FALSE;
-
- /* Check whether the multipart contains a
- * text/html part and hide the whole multipart if
- * it does not. Otherwise assume that it's what
- * we wan't to display */
- for (iter = sparts; iter; iter = g_slist_next (iter)) {
- EMailPart *p = iter->data;
- if (!p)
- continue;
-
- if (strstr (p->id, ".text_html") != NULL) {
- has_html = TRUE;
- break;
- }
+ GSList *iter;
+ gboolean has_html = FALSE;
+
+ /* Check whether the multipart contains a text/html part */
+ for (iter = sparts; iter; iter = g_slist_next (iter)) {
+ EMailPart *p = iter->data;
+ if (!p)
+ continue;
+
+ if (strstr (p->id, ".text_html") != NULL) {
+ has_html = TRUE;
+ break;
}
- if (!has_html)
+ }
+
+ if (has_html && (emp_pp->mode != PREFER_HTML)) {
+ if (emp_pp->show_suppressed) {
+ sparts = e_mail_parser_wrap_as_attachment (
+ parser, sp, sparts, part_id,
+ cancellable);
+ } else {
hide_parts (sparts);
+ }
}
parts = g_slist_concat (parts, sparts);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]