aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-12 02:13:10 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-12 02:13:56 +0800
commitcadba671f336345f2b73728f757218b800439098 (patch)
treee3ae2abf5894ed39021a874c516b758e69d90e90 /widgets/misc
parent073d7e15933e6ec96a486e25111c8d8c621bc91b (diff)
downloadgsoc2013-evolution-cadba671f336345f2b73728f757218b800439098.tar
gsoc2013-evolution-cadba671f336345f2b73728f757218b800439098.tar.gz
gsoc2013-evolution-cadba671f336345f2b73728f757218b800439098.tar.bz2
gsoc2013-evolution-cadba671f336345f2b73728f757218b800439098.tar.lz
gsoc2013-evolution-cadba671f336345f2b73728f757218b800439098.tar.xz
gsoc2013-evolution-cadba671f336345f2b73728f757218b800439098.tar.zst
gsoc2013-evolution-cadba671f336345f2b73728f757218b800439098.zip
Bug 616640 - Don't display attachment size if it's unknown
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-attachment-tree-view.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets/misc/e-attachment-tree-view.c b/widgets/misc/e-attachment-tree-view.c
index 42876e4bfb..5729a68069 100644
--- a/widgets/misc/e-attachment-tree-view.c
+++ b/widgets/misc/e-attachment-tree-view.c
@@ -100,15 +100,18 @@ attachment_tree_view_render_size (GtkTreeViewColumn *column,
GtkTreeModel *model,
GtkTreeIter *iter)
{
- gchar *display_size;
+ gchar *display_size = NULL;
gint column_id;
guint64 size;
column_id = E_ATTACHMENT_STORE_COLUMN_SIZE;
gtk_tree_model_get (model, iter, column_id, &size, -1);
- display_size = g_format_size_for_display ((goffset) size);
+ if (size > 0)
+ display_size = g_format_size_for_display ((goffset) size);
+
g_object_set (renderer, "text", display_size, NULL);
+
g_free (display_size);
}