diff options
author | Suman Manjunath <msuman@src.gnome.org> | 2008-06-22 01:48:26 +0800 |
---|---|---|
committer | Suman Manjunath <msuman@src.gnome.org> | 2008-06-22 01:48:26 +0800 |
commit | 09cf8261f05b531bf2bbe55882d3c034becfe2ca (patch) | |
tree | 43b79a979347a704cb26de83bd31abb8d7932294 /mail | |
parent | 7e2c873b8db2f0e21ba4c7cb8d1d679b50a2959f (diff) | |
download | gsoc2013-evolution-09cf8261f05b531bf2bbe55882d3c034becfe2ca.tar gsoc2013-evolution-09cf8261f05b531bf2bbe55882d3c034becfe2ca.tar.gz gsoc2013-evolution-09cf8261f05b531bf2bbe55882d3c034becfe2ca.tar.bz2 gsoc2013-evolution-09cf8261f05b531bf2bbe55882d3c034becfe2ca.tar.lz gsoc2013-evolution-09cf8261f05b531bf2bbe55882d3c034becfe2ca.tar.xz gsoc2013-evolution-09cf8261f05b531bf2bbe55882d3c034becfe2ca.tar.zst gsoc2013-evolution-09cf8261f05b531bf2bbe55882d3c034becfe2ca.zip |
Patch from Paul Bolle <pebolle@tiscali.nl>: Fix for bug #539268 (Do not use both filename and description if they are identical)
svn path=/trunk/; revision=35673
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-format.c | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 9b90e02e67..5622614a23 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,12 @@ 2008-06-21 Paul Bolle <pebolle@tiscali.nl> + ** Fix for bug #539268 + + * em-format.c: (em_format_describe_part): do not use both filename + and description if these are identical. + +2008-06-21 Paul Bolle <pebolle@tiscali.nl> + ** Fix for bug #538741 * em-format-html.c: (efh_format_header): diff --git a/mail/em-format.c b/mail/em-format.c index 4c887dfd44..eaa0d77185 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -1148,7 +1148,7 @@ char * 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 @@ em_format_describe_part(CamelMimePart *part, const char *mime_type) 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); |