[evolution] Add e_mail_part_has_validity().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Add e_mail_part_has_validity().
- Date: Sun, 19 May 2013 17:07:26 +0000 (UTC)
commit 543b4d932102206527f42c7a2d1bf049a4b2415d
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun May 19 12:25:43 2013 -0400
Add e_mail_part_has_validity().
em-format/e-mail-formatter-print-headers.c | 2 +-
em-format/e-mail-part.c | 9 +++++++++
em-format/e-mail-part.h | 1 +
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/em-format/e-mail-formatter-print-headers.c b/em-format/e-mail-formatter-print-headers.c
index 591c28e..6e4826d 100644
--- a/em-format/e-mail-formatter-print-headers.c
+++ b/em-format/e-mail-formatter-print-headers.c
@@ -137,7 +137,7 @@ emfpe_headers_format (EMailFormatterExtension *extension,
for (link = head; link != NULL; link = g_list_next (link)) {
EMailPart *mail_part = link->data;
- if (g_queue_is_empty (&mail_part->validities))
+ if (!e_mail_part_has_validity (mail_part))
continue;
if (!e_mail_part_id_has_prefix (mail_part, part_id_prefix))
diff --git a/em-format/e-mail-part.c b/em-format/e-mail-part.c
index b7e4d67..ba43e7e 100644
--- a/em-format/e-mail-part.c
+++ b/em-format/e-mail-part.c
@@ -362,3 +362,12 @@ e_mail_part_get_validity (EMailPart *part,
return pair ? pair->validity : NULL;
}
+
+gboolean
+e_mail_part_has_validity (EMailPart *part)
+{
+ g_return_val_if_fail (part != NULL, FALSE);
+
+ return !g_queue_is_empty (&part->validities);
+}
+
diff --git a/em-format/e-mail-part.h b/em-format/e-mail-part.h
index 19e62ac..bcb4270 100644
--- a/em-format/e-mail-part.h
+++ b/em-format/e-mail-part.h
@@ -118,6 +118,7 @@ void e_mail_part_update_validity (EMailPart *part,
CamelCipherValidity *
e_mail_part_get_validity (EMailPart *part,
guint32 validity_type);
+gboolean e_mail_part_has_validity (EMailPart *part);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]