From 2e3a3cf26e4d1894707703b15340529b8874466c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 15 Jan 2009 03:39:43 +0000 Subject: Merge revisions 37047:37074 from trunk. svn path=/branches/kill-bonobo/; revision=37075 --- plugins/prefer-plain/ChangeLog | 7 +++++++ plugins/prefer-plain/prefer-plain.c | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'plugins/prefer-plain') 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 + + ** 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 ** 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); -- cgit