[evolution/webkit: 79/123] Store properly information about attachment signature/encryption



commit a42d0ab19c4b7fe26face31ada5e256e1f1a5aad
Author: Dan VrÃtil <dvratil redhat com>
Date:   Wed Dec 14 20:25:45 2011 +0100

    Store properly information about attachment signature/encryption
    
    Attachment buttons now have correct icon overlay marking signature/encryption of
    the particular attachment (I somehow missed this in intial porting)

 mail/em-format-html-display.c |    8 ++++++--
 mail/em-format-html-display.h |    4 ----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 49d28c4..2642593 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -452,6 +452,8 @@ efhd_parse_attachment (EMFormat *emf,
 	puri->attachment_view_part_id = g_strdup (part_id->str);
 	puri->description = html;
 	puri->handle = handler;
+        if (info->validity)
+                puri->puri.validity = camel_cipher_validity_clone (info->validity);
 
 	cid = camel_mime_part_get_content_id (part);
 	if (cid)
@@ -486,8 +488,10 @@ efhd_parse_attachment (EMFormat *emf,
 
 	e_attachment_set_mime_part (puri->attachment, part);
 	e_attachment_set_shown (puri->attachment, puri->shown);
-	e_attachment_set_signed (puri->attachment, puri->sign);
-	e_attachment_set_encrypted (puri->attachment, puri->encrypt);
+        if (puri->puri.validity) {
+	        e_attachment_set_signed (puri->attachment, puri->puri.validity->sign.status);
+	        e_attachment_set_encrypted (puri->attachment, puri->puri.validity->encrypt.status);
+        }
 	e_attachment_set_can_show (puri->attachment, puri->handle != NULL && puri->handle->write_func);
 
 	/* FIXME: Try to find a better way? */
diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h
index 079d9bb..cf3cac4 100644
--- a/mail/em-format-html-display.h
+++ b/mail/em-format-html-display.h
@@ -86,10 +86,6 @@ struct _EMFormatAttachmentPURI {
 
 	/* Optional Text Mem Stream */
 	CamelStreamMem *mstream;
-
-	/* Signed / Encrypted */
-	camel_cipher_validity_sign_t sign;
-	camel_cipher_validity_encrypt_t encrypt;
 };
 
 struct _EMFormatSMIMEPURI {



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