[evolution/webkit: 77/196] em_utils_message_to_html() - set all validity flags found in entire processed message
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit: 77/196] em_utils_message_to_html() - set all validity flags found in entire processed message
- Date: Tue, 27 Mar 2012 16:07:12 +0000 (UTC)
commit 03079a886501526c08f965257f198c7dbcf359c1
Author: Dan VrÃtil <dvratil redhat com>
Date: Wed Dec 14 16:46:31 2011 +0100
em_utils_message_to_html() - set all validity flags found in entire processed message
Originally the EMFormat held field with flags of all detected validities
(signature/encryption). In the new EMFormat each PURI has it's own validity
flags describing validity of the particular PURI. To make the function work
as before we need to iterate through all the PURIs and return all flags we
run into.
mail/em-utils.c | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
---
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 842e9eb..a053e05 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1190,12 +1190,28 @@ em_utils_message_to_html (CamelMimeMessage *message,
/* FIXME Not passing a GCancellable here. */
em_format_parse (EM_FORMAT (emfq), message, NULL, NULL);
- /* FIXME WEBKIT The validity is now per-part, not global :(
- if (validity_found)
- *validity_found = ((EMFormat *)emfq)->validity_type;
- */
- em_format_quote_write (emfq, mem, NULL);
+ if (validity_found) {
+ GList *iter;
+ EMFormat *emf = (EMFormat *) emfq;
+
+ if (validity_found)
+ *validity_found = 0;
+
+ /* Return all found validities */
+ for (iter = emf->mail_part_list; iter; iter = iter->next) {
+
+ EMFormatPURI *puri = iter->data;
+ if (!puri)
+ continue;
+
+ if (*validity_found && puri->validity_type)
+ *validity_found |= puri->validity_type;
+ }
+
+ }
+
+ em_format_quote_write (emfq, mem, NULL);
g_object_unref (emfq);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]