diff options
author | Milan Crha <mcrha@redhat.com> | 2012-09-12 18:28:59 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-09-12 18:28:59 +0800 |
commit | abc10da2ae623b381e6abe171a9e81ea916c8e33 (patch) | |
tree | 8d8400a87eeaaa292844aa17ea59b2560fba6ae2 | |
parent | 251e8b00da7f55c076c67d7a100fd4d7b3375051 (diff) | |
download | gsoc2013-evolution-abc10da2ae623b381e6abe171a9e81ea916c8e33.tar gsoc2013-evolution-abc10da2ae623b381e6abe171a9e81ea916c8e33.tar.gz gsoc2013-evolution-abc10da2ae623b381e6abe171a9e81ea916c8e33.tar.bz2 gsoc2013-evolution-abc10da2ae623b381e6abe171a9e81ea916c8e33.tar.lz gsoc2013-evolution-abc10da2ae623b381e6abe171a9e81ea916c8e33.tar.xz gsoc2013-evolution-abc10da2ae623b381e6abe171a9e81ea916c8e33.tar.zst gsoc2013-evolution-abc10da2ae623b381e6abe171a9e81ea916c8e33.zip |
[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.
-rw-r--r-- | 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 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; |