aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index c6ad7b0a4f..dbedb1bf0b 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -560,7 +560,7 @@ static const struct {
{ NULL, N_("Unsigned") },
{ "stock_signature-ok", N_("Valid signature") },
{ "stock_signature-bad", N_("Invalid signature") },
- { "stock_signature", N_("Valid signature, cannot verify sender") },
+ { "stock_signature", N_("Valid signature but cannot verify sender") },
};
static const struct {
@@ -572,6 +572,10 @@ static const struct {
{ "stock_lock-ok", N_("Encrypted, strong") },
};
+static const char *smime_sign_colour[4] = {
+ "", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\""
+};
+
/* TODO: this could probably be virtual on em-format-html
then we only need one version of each type handler */
static void
@@ -589,10 +593,10 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
char *classid;
char *iconpath;
CamelMimePart *iconpart;
-
- camel_stream_printf(stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0 bgcolor=%s><tr>",
- valid->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_GOOD?"#88bb88":"#bb8888");
-
+
+ camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
+ smime_sign_colour[valid->sign.status]);
+
classid = g_strdup_printf("smime:///em-format-html/%s/icon/signed", emf->part_id->str);
camel_stream_printf(stream, "<td valign=\"top\"><img src=\"%s\"></td><td valign=\"top\" width=\"100%%\">", classid);
iconpath = e_icon_factory_get_icon_filename (smime_sign_table[valid->sign.status].icon, E_ICON_SIZE_DIALOG);