evolution r37228 - trunk/mail
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r37228 - trunk/mail
- Date: Thu, 5 Feb 2009 17:59:45 +0000 (UTC)
Author: mcrha
Date: Thu Feb 5 17:59:45 2009
New Revision: 37228
URL: http://svn.gnome.org/viewvc/evolution?rev=37228&view=rev
Log:
2009-02-05 Milan Crha <mcrha redhat com>
** Part of fix for bug #554458
* em-format.c: (em_format_describe_part):
Make content type from a mime type first.
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 Thu Feb 5 17:59:45 2009
@@ -1151,11 +1151,12 @@
{
GString *stext;
const char *filename, *description;
- char *out, *desc;
+ char *content_type, *desc;
stext = g_string_new("");
- /* TODO: mime_type isn't content_type on some systems (Win32), thus this will not work there. */
- desc = g_content_type_get_description (mime_type);
+ content_type = g_content_type_from_mime_type (mime_type);
+ desc = g_content_type_get_description (content_type ? content_type : mime_type);
+ g_free (content_type);
g_string_append_printf (stext, _("%s attachment"), desc ? desc : mime_type);
g_free (desc);
if ((filename = camel_mime_part_get_filename (part)))
@@ -1165,10 +1166,7 @@
!(filename && (strcmp(filename, description) == 0)))
g_string_append_printf(stext, ", \"%s\"", description);
- out = stext->str;
- g_string_free(stext, FALSE);
-
- return out;
+ return g_string_free (stext, FALSE);
}
/* ********************************************************************** */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]