From abdefcaa26ca7116bfc5b7aaa9ee2f04de533ecb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 21 Nov 2012 17:57:07 +0100 Subject: Bug #687670 - Signing with both pgp and S/MIME shows only one signature --- em-format/e-mail-formatter-print-headers.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'em-format/e-mail-formatter-print-headers.c') diff --git a/em-format/e-mail-formatter-print-headers.c b/em-format/e-mail-formatter-print-headers.c index a74b94f2cd..a16264b9bf 100644 --- a/em-format/e-mail-formatter-print-headers.c +++ b/em-format/e-mail-formatter-print-headers.c @@ -136,31 +136,31 @@ emfpe_headers_format (EMailFormatterExtension *extension, if (mail_part == NULL) continue; - if (mail_part->validity_type == 0) + if (!mail_part->validities) continue; if (!g_str_has_prefix (mail_part->id, part_id_prefix)) continue; - if ((mail_part->validity_type & E_MAIL_PART_VALIDITY_PGP) && - (mail_part->validity_type & E_MAIL_PART_VALIDITY_SIGNED)) { + if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_PGP | E_MAIL_PART_VALIDITY_SIGNED)) { g_string_append (tmp, _("GPG signed")); } - if ((mail_part->validity_type & E_MAIL_PART_VALIDITY_PGP) && - (mail_part->validity_type & E_MAIL_PART_VALIDITY_ENCRYPTED)) { - if (tmp->len > 0) g_string_append (tmp, ", "); + + if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_PGP | E_MAIL_PART_VALIDITY_ENCRYPTED)) { + if (tmp->len > 0) + g_string_append (tmp, ", "); g_string_append (tmp, _("GPG encrpyted")); } - if ((mail_part->validity_type & E_MAIL_PART_VALIDITY_SMIME) && - (mail_part->validity_type & E_MAIL_PART_VALIDITY_SIGNED)) { - if (tmp->len > 0) g_string_append (tmp, ", "); + if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_SMIME | E_MAIL_PART_VALIDITY_SIGNED)) { + if (tmp->len > 0) + g_string_append (tmp, ", "); g_string_append (tmp, _("S/MIME signed")); } - if ((mail_part->validity_type & E_MAIL_PART_VALIDITY_SMIME) && - (mail_part->validity_type & E_MAIL_PART_VALIDITY_ENCRYPTED)) { - if (tmp->len > 0) g_string_append (tmp, ", "); + if (e_mail_part_get_validity (mail_part, E_MAIL_PART_VALIDITY_SMIME | E_MAIL_PART_VALIDITY_ENCRYPTED)) { + if (tmp->len > 0) + g_string_append (tmp, ", "); g_string_append (tmp, _("S/MIME encrpyted")); } -- cgit v1.2.3