[evolution/webkit: 24/182] Make expandable only attachments whose PURIs have write_func



commit 13fbd4b909058abc2f0066366ff7a584d07e460e
Author: Dan VrÃtil <dvratil redhat com>
Date:   Wed Sep 14 12:27:57 2011 +0200

    Make expandable only attachments whose PURIs have write_func

 mail/em-format-html-display.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index a866a56..ed18b53 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -418,7 +418,7 @@ efhd_parse_attachment (EMFormat *emf,
 	puri->attachment = e_attachment_new ();
 	puri->attachment_view_part_id = g_strdup (classid);
 	puri->description = html;
-	puri->handle = info->handler;
+	puri->handle = handler;
 
 	cid = camel_mime_part_get_content_id (part);
 	if (cid)
@@ -908,8 +908,6 @@ efhd_attachment_button (EMFormat *emf,
 	EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *) efh;
 	EAttachmentStore *store;
 	EAttachment *attachment;
-	GFileInfo *finfo;
-	const gchar *name;
 	GtkWidget *widget;
 	gpointer parent;
 	guint32 size = 0;
@@ -948,7 +946,7 @@ efhd_attachment_button (EMFormat *emf,
 	e_attachment_set_shown (attachment, info->shown);
 	e_attachment_set_signed (attachment, info->sign);
 	e_attachment_set_encrypted (attachment, info->encrypt);
-	e_attachment_set_can_show (attachment, info->handle != NULL);
+	e_attachment_set_can_show (attachment, info->handle != NULL && info->handle->write_func);
 
 	/* FIXME: Try to find a better way? */
 	shell = e_shell_get_default ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]