[evolution/webkit: 147/196] Don't _write() empty EAttachmentBar
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit: 147/196] Don't _write() empty EAttachmentBar
- Date: Tue, 27 Mar 2012 16:13:04 +0000 (UTC)
commit 7cb3d4ada716b7401bd8e2b6873248487395ed00
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 d10f151..0f838e3 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -699,8 +699,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%%\" "
@@ -960,14 +964,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]