[evolution] Bug 616640 - Don't display attachment size if it's unknown
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 616640 - Don't display attachment size if it's unknown
- Date: Tue, 11 May 2010 18:14:04 +0000 (UTC)
commit cadba671f336345f2b73728f757218b800439098
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue May 11 13:13:10 2010 -0500
Bug 616640 - Don't display attachment size if it's unknown
widgets/misc/e-attachment-tree-view.c | 7 +++++--
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 42876e4..5729a68 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]