diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-04-11 08:14:51 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-04-11 08:14:51 +0800 |
commit | 942cdf2df9091e347e09c25d62015e77775f38b6 (patch) | |
tree | 6800b693776d993e8514fcd0c7fe95510fded7c6 /widgets/misc/e-attachment.c | |
parent | 1509a85170184895f6c91f9c57167a74af5cd2db (diff) | |
download | gsoc2013-evolution-942cdf2df9091e347e09c25d62015e77775f38b6.tar gsoc2013-evolution-942cdf2df9091e347e09c25d62015e77775f38b6.tar.gz gsoc2013-evolution-942cdf2df9091e347e09c25d62015e77775f38b6.tar.bz2 gsoc2013-evolution-942cdf2df9091e347e09c25d62015e77775f38b6.tar.lz gsoc2013-evolution-942cdf2df9091e347e09c25d62015e77775f38b6.tar.xz gsoc2013-evolution-942cdf2df9091e347e09c25d62015e77775f38b6.tar.zst gsoc2013-evolution-942cdf2df9091e347e09c25d62015e77775f38b6.zip |
Bug fixes and formerly unfinished bits of the attachment rewrite.
svn path=/branches/kill-bonobo/; revision=37513
Diffstat (limited to 'widgets/misc/e-attachment.c')
-rw-r--r-- | widgets/misc/e-attachment.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index 16bd9fd26c..a97ea1e70f 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -136,6 +136,7 @@ attachment_update_file_info_columns (EAttachment *attachment) GtkTreeIter iter; GFileInfo *file_info; const gchar *content_type; + const gchar *description; const gchar *display_name; gchar *content_desc; gchar *display_size; @@ -162,17 +163,20 @@ attachment_update_file_info_columns (EAttachment *attachment) content_desc = g_content_type_get_description (content_type); display_size = g_format_size_for_display (size); + description = e_attachment_get_description (attachment); + description = (description != NULL) ? description : display_name; + if (size > 0) caption = g_strdup_printf ( - "%s\n(%s)", display_name, display_size); + "%s\n(%s)", description, display_size); else - caption = g_strdup (display_name); + caption = g_strdup (description); gtk_list_store_set ( GTK_LIST_STORE (model), &iter, E_ATTACHMENT_STORE_COLUMN_CAPTION, caption, E_ATTACHMENT_STORE_COLUMN_CONTENT_TYPE, content_desc, - E_ATTACHMENT_STORE_COLUMN_DISPLAY_NAME, display_name, + E_ATTACHMENT_STORE_COLUMN_DESCRIPTION, description, E_ATTACHMENT_STORE_COLUMN_SIZE, size, -1); |