aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-01-15 01:30:18 +0800
committerMilan Crha <mcrha@src.gnome.org>2009-01-15 01:30:18 +0800
commit670cd5a1d4d7a1daf02d8193ea75d991542c04a8 (patch)
tree5eb079e93838b7301e24e05a0a5ba85815007798 /plugins
parent81dd4dc7093219b04e3e13fa9b9f7e61211d02f2 (diff)
downloadgsoc2013-evolution-670cd5a1d4d7a1daf02d8193ea75d991542c04a8.tar.gz
gsoc2013-evolution-670cd5a1d4d7a1daf02d8193ea75d991542c04a8.tar.zst
gsoc2013-evolution-670cd5a1d4d7a1daf02d8193ea75d991542c04a8.zip
** Fix for bug #567687
2009-01-14 Milan Crha <mcrha@redhat.com> ** Fix for bug #567687 * prefer-plain.c: (org_gnome_prefer_plain_multipart_alternative): Force text/html part only when choosing between text/plain and it. svn path=/trunk/; revision=37071
Diffstat (limited to 'plugins')
-rw-r--r--plugins/prefer-plain/ChangeLog7
-rw-r--r--plugins/prefer-plain/prefer-plain.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/plugins/prefer-plain/ChangeLog b/plugins/prefer-plain/ChangeLog
index 9fbb00082b..18e1b74300 100644
--- a/plugins/prefer-plain/ChangeLog
+++ b/plugins/prefer-plain/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-14 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #567687
+
+ * prefer-plain.c: (org_gnome_prefer_plain_multipart_alternative):
+ Force text/html part only when choosing between text/plain and it.
+
2008-09-09 Milan Crha <mcrha@redhat.com>
** Fix for bug #551492
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index 45cafa562a..ed4b6dc363 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -119,9 +119,7 @@ org_gnome_prefer_plain_multipart_alternative(void *ep, EMFormatHookTarget *t)
/* Try to find text/html part even when not as last and force to show it.
Old handler will show the last part of multipart/alternate, but if we
can offer HTML, then offer it, regardless of position in multipart.
- But do this only when have text/plain in a list, because otherwise it
- can be something else (like outlooks meeting invites with only text/html
- part and calendar part).
+ But do this when have only text/plain and text/html parts, not more.
*/
nparts = camel_multipart_get_number (mp);
for (i = 0; i < nparts; i++) {
@@ -148,7 +146,7 @@ org_gnome_prefer_plain_multipart_alternative(void *ep, EMFormatHookTarget *t)
}
}
- if (display_part && have_plain) {
+ if (display_part && have_plain && nparts == 2) {
g_string_append_printf (t->format->part_id, ".alternative.%d", displayid);
em_format_part_as (t->format, t->stream, display_part, "text/html");
g_string_truncate (t->format->part_id, partidlen);