aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-20 00:25:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-20 01:07:21 +0800
commit543b4d932102206527f42c7a2d1bf049a4b2415d (patch)
tree6d07fc796736bb60112a9875b4221237595a4c4e /em-format
parent42d1e89f02e6a50f4957a4d3b9cdc3f2b49c2852 (diff)
downloadgsoc2013-evolution-543b4d932102206527f42c7a2d1bf049a4b2415d.tar
gsoc2013-evolution-543b4d932102206527f42c7a2d1bf049a4b2415d.tar.gz
gsoc2013-evolution-543b4d932102206527f42c7a2d1bf049a4b2415d.tar.bz2
gsoc2013-evolution-543b4d932102206527f42c7a2d1bf049a4b2415d.tar.lz
gsoc2013-evolution-543b4d932102206527f42c7a2d1bf049a4b2415d.tar.xz
gsoc2013-evolution-543b4d932102206527f42c7a2d1bf049a4b2415d.tar.zst
gsoc2013-evolution-543b4d932102206527f42c7a2d1bf049a4b2415d.zip
Add e_mail_part_has_validity().
Diffstat (limited to 'em-format')
-rw-r--r--em-format/e-mail-formatter-print-headers.c2
-rw-r--r--em-format/e-mail-part.c9
-rw-r--r--em-format/e-mail-part.h1
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 591c28ee80..6e4826d80b 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 b7e4d67d34..ba43e7e2f2 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 19e62ac1cb..bcb42707e0 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