evolution r37071 - trunk/plugins/prefer-plain



Author: mcrha
Date: Wed Jan 14 17:30:18 2009
New Revision: 37071
URL: http://svn.gnome.org/viewvc/evolution?rev=37071&view=rev

Log:
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.



Modified:
   trunk/plugins/prefer-plain/ChangeLog
   trunk/plugins/prefer-plain/prefer-plain.c

Modified: trunk/plugins/prefer-plain/prefer-plain.c
==============================================================================
--- trunk/plugins/prefer-plain/prefer-plain.c	(original)
+++ trunk/plugins/prefer-plain/prefer-plain.c	Wed Jan 14 17:30:18 2009
@@ -119,9 +119,7 @@
 		/* 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 @@
 			}
 		}
 
-		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);



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