diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-29 01:32:48 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-29 01:38:08 +0800 |
commit | 27988a2b71e00a8f7a12f67a187c98bdbbfd9126 (patch) | |
tree | 05d30889b108c6fc5e2a9bd72fdd121fa9605222 | |
parent | e8c67c85c95d8103c2fda752315e1b890134e64c (diff) | |
download | gsoc2013-evolution-27988a2b71e00a8f7a12f67a187c98bdbbfd9126.tar.gz gsoc2013-evolution-27988a2b71e00a8f7a12f67a187c98bdbbfd9126.tar.zst gsoc2013-evolution-27988a2b71e00a8f7a12f67a187c98bdbbfd9126.zip |
Don't show total attachment size if it's zero.
-rw-r--r-- | mail/e-mail-attachment-bar.c | 13 | ||||
-rw-r--r-- | widgets/misc/e-attachment-paned.c | 13 |
2 files changed, 18 insertions, 8 deletions
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c index 6b50aac304..8461faf0c9 100644 --- a/mail/e-mail-attachment-bar.c +++ b/mail/e-mail-attachment-bar.c @@ -114,10 +114,15 @@ mail_attachment_bar_update_status (EMailAttachmentBar *bar) total_size = e_attachment_store_get_total_size (store); display_size = g_format_size_for_display (total_size); - markup = g_strdup_printf ( - "<b>%d</b> %s (%s)", num_attachments, ngettext ( - "Attachment", "Attachments", num_attachments), - display_size); + if (total_size > 0) + markup = g_strdup_printf ( + "<b>%d</b> %s (%s)", num_attachments, ngettext ( + "Attachment", "Attachments", num_attachments), + display_size); + else + markup = g_strdup_printf ( + "<b>%d</b> %s", num_attachments, ngettext ( + "Attachment", "Attachments", num_attachments)); gtk_label_set_markup (label, markup); g_free (markup); diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c index 8cdfe6c864..519d4070c8 100644 --- a/widgets/misc/e-attachment-paned.c +++ b/widgets/misc/e-attachment-paned.c @@ -142,10 +142,15 @@ attachment_paned_update_status (EAttachmentPaned *paned) total_size = e_attachment_store_get_total_size (store); display_size = g_format_size_for_display (total_size); - markup = g_strdup_printf ( - "<b>%d</b> %s (%s)", num_attachments, ngettext ( - "Attachment", "Attachments", num_attachments), - display_size); + if (total_size > 0) + markup = g_strdup_printf ( + "<b>%d</b> %s (%s)", num_attachments, ngettext ( + "Attachment", "Attachments", num_attachments), + display_size); + else + markup = g_strdup_printf ( + "<b>%d</b> %s", num_attachments, ngettext ( + "Attachment", "Attachments", num_attachments)); gtk_label_set_markup (label, markup); g_free (markup); |