evolution r35672 - branches/gnome-2-22/mail
- From: msuman svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35672 - branches/gnome-2-22/mail
- Date: Sat, 21 Jun 2008 17:48:07 +0000 (UTC)
Author: msuman
Date: Sat Jun 21 17:48:07 2008
New Revision: 35672
URL: http://svn.gnome.org/viewvc/evolution?rev=35672&view=rev
Log:
Patch from Paul Bolle <pebolle tiscali nl>: Fix for bug #539268 (Do not use both filename and description if they are identical)
Modified:
branches/gnome-2-22/mail/ChangeLog
branches/gnome-2-22/mail/em-format.c
Modified: branches/gnome-2-22/mail/em-format.c
==============================================================================
--- branches/gnome-2-22/mail/em-format.c (original)
+++ branches/gnome-2-22/mail/em-format.c Sat Jun 21 17:48:07 2008
@@ -1149,16 +1149,17 @@
em_format_describe_part(CamelMimePart *part, const char *mime_type)
{
GString *stext;
- const char *text;
+ const char *filename, *description;
char *out;
stext = g_string_new("");
text = gnome_vfs_mime_get_description(mime_type);
g_string_append_printf(stext, _("%s attachment"), text?text:mime_type);
- if ((text = camel_mime_part_get_filename (part)))
- g_string_append_printf(stext, " (%s)", text);
- if ((text = camel_mime_part_get_description(part)))
- g_string_append_printf(stext, ", \"%s\"", text);
+ if ((filename = camel_mime_part_get_filename (part)))
+ g_string_append_printf(stext, " (%s)", filename);
+ if ((description = camel_mime_part_get_description(part)) &&
+ !(filename && (strcmp(filename, description) == 0)))
+ g_string_append_printf(stext, ", \"%s\"", description);
out = stext->str;
g_string_free(stext, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]