From abc10da2ae623b381e6abe171a9e81ea916c8e33 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 12 Sep 2012 12:28:59 +0200 Subject: [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 file changed, 5 insertions(+), 11 deletions(-) (limited to 'modules/prefer-plain') diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c index 5eb5e6fecd..cd0b0bc3c1 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; -- cgit v1.2.3