evolution r35673 - trunk/mail
- From: msuman svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35673 - trunk/mail
- Date: Sat, 21 Jun 2008 17:48:26 +0000 (UTC)
Author: msuman
Date: Sat Jun 21 17:48:26 2008
New Revision: 35673
URL: http://svn.gnome.org/viewvc/evolution?rev=35673&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:
trunk/mail/ChangeLog
trunk/mail/em-format.c
Modified: trunk/mail/em-format.c
==============================================================================
--- trunk/mail/em-format.c (original)
+++ trunk/mail/em-format.c Sat Jun 21 17:48:26 2008
@@ -1148,7 +1148,7 @@
em_format_describe_part(CamelMimePart *part, const char *mime_type)
{
GString *stext;
- const char *text;
+ const char *filename, *description;
char *out, *desc;
stext = g_string_new("");
@@ -1156,10 +1156,11 @@
desc = g_content_type_get_description (mime_type);
g_string_append_printf (stext, _("%s attachment"), desc ? desc : mime_type);
g_free (desc);
- 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]