[evolution/webkit] Don't _write() empty EAttachmentBar
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit] Don't _write() empty EAttachmentBar
- Date: Thu, 9 Feb 2012 17:43:16 +0000 (UTC)
commit 9beafedf922823cbaa947a465fecb86ba7c616ed
Author: Dan VrÃtil <dvratil redhat com>
Date: Thu Feb 9 18:43:05 2012 +0100
Don't _write() empty EAttachmentBar
mail/em-format-html-display.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index b726830..58f7953 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -686,8 +686,12 @@ efhd_write_attachment_bar (EMFormat *emf,
EMFormatWriterInfo *info,
GCancellable *cancellable)
{
+ EMFormatAttachmentBarPURI *efab = (EMFormatAttachmentBarPURI *) puri;
gchar *str;
+ if (e_attachment_store_get_num_attachments (efab->store) == 0)
+ return;
+
str = g_strdup_printf (
"<object type=\"application/x-attachment-bar\" "
"height=\"20\" width=\"100%%\" "
@@ -947,14 +951,6 @@ efhd_attachment_bar (EMFormat *emf,
EMFormatAttachmentBarPURI *abp = (EMFormatAttachmentBarPURI *) puri;
GtkWidget *widget;
- /* Don't display the attachment bar if it's empty.
- * At this point the parsing is done so we can be pretty much sure that
- * no new attachments will be added.
- * Returning NULL would however display "Missing Plugin" message, so
- * let's hack it this way. */
- if (e_attachment_store_get_num_attachments (abp->store) == 0)
- return gtk_label_new ("");
-
widget = e_mail_attachment_bar_new (abp->store);
return widget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]