[evolution] [prefer-plain] Always show HTML part as attachment for only HTML messages



commit abc10da2ae623b381e6abe171a9e81ea916c8e33
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 12 12:28:59 2012 +0200

    [prefer-plain] Always show HTML part as attachment for only HTML messages
    
    When the prefer-plain is set to show only text/plain parts, without showing
    suppressed HTML parts as attachments, and the received message contains
    only one part, the text/html part, then the preview was completely empty,
    which is confusing. With this change, the text/html only messages will
    show the suppressed part as attachment regardless the setting.

 modules/prefer-plain/e-mail-parser-prefer-plain.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c
index 5eb5e6f..cd0b0bc 100644
--- a/modules/prefer-plain/e-mail-parser-prefer-plain.c
+++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c
@@ -201,17 +201,11 @@ empe_prefer_plain_parse (EMailParserExtension *extension,
 		if (emp_pp->mode != ONLY_PLAIN)
 			return NULL;
 
-		/* Enforcing text/plain, but wants HTML as attachment */
-		if (emp_pp->show_suppressed) {
-			return make_part_attachment (
-				parser, part, part_id,
-				FALSE, cancellable);
-		}
-
-		/* Enforcing text/plain, does not want HTML part as attachment
-		 * so return nothing (can't return NULL as parser would fall
-		 * back to next extension) */
-		return g_slist_alloc ();
+		/* Enforcing text/plain, but got only HTML part, thus add it as attachment,
+		   to not show empty message preview, which is confusing */
+		return make_part_attachment (
+			parser, part, part_id,
+			FALSE, cancellable);
 	}
 
 	parts = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]