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



commit 46546325209ac24393d1dad66657a2697af96466
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 1fb6205..6cd4beb 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -466,6 +466,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)
@@ -500,8 +502,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]