diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-05-15 01:46:24 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-05-15 01:46:24 +0800 |
commit | 6f58e91a1c07f49aec286eb0bc80d06622b174b0 (patch) | |
tree | 476e0a250b4471d80205f05e6145270ee751eaf8 | |
parent | 951a1430928e5df1cfe053ce23e719ab46592df8 (diff) | |
download | gsoc2013-evolution-6f58e91a1c07f49aec286eb0bc80d06622b174b0.tar.gz gsoc2013-evolution-6f58e91a1c07f49aec286eb0bc80d06622b174b0.tar.zst gsoc2013-evolution-6f58e91a1c07f49aec286eb0bc80d06622b174b0.zip |
Same. Also changed the "Valid signature, cannot verify sender" string to
2004-05-14 Jeffrey Stedfast <fejj@novell.com>
* em-format-html.c (efh_format_secure): Same. Also changed the
"Valid signature, cannot verify sender" string to "Valid signature
but cannot verify sender" as I think it reads nicer.
* em-format-html-display.c (efhd_format_secure): Since signature
status is a tri-state, use 3 different colours too (yellow for
valid sig but unknown sender).
svn path=/trunk/; revision=25906
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 12 | ||||
-rw-r--r-- | mail/em-format-html.c | 14 |
3 files changed, 27 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 627debbc22..2d403adf7a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2004-05-14 Jeffrey Stedfast <fejj@novell.com> + + * em-format-html.c (efh_format_secure): Same. Also changed the + "Valid signature, cannot verify sender" string to "Valid signature + but cannot verify sender" as I think it reads nicer. + + * em-format-html-display.c (efhd_format_secure): Since signature + status is a tri-state, use 3 different colours too (yellow for + valid sig but unknown sender). + 2004-05-13 Jeffrey Stedfast <fejj@novell.com> * em-format.c (em_format_default_headers): Don't include the last diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 1ebc136303..f70eda5520 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -657,6 +657,10 @@ static const struct { { "stock_lock-ok", N_("Encrypted, strong"), N_("This message is encrypted, with a strong encryption algorithm. It would be very difficult for an outsider to view the content of this message in a practical amount of time.") }, }; +static const char *smime_sign_colour[4] = { + "", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\"" +}; + struct _smime_pobject { EMFormatHTMLPObject object; @@ -870,10 +874,10 @@ efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came || valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) { char *classid; struct _smime_pobject *pobj; - - 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); pobj = (struct _smime_pobject *)em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(*pobj), classid, part, efhd_xpkcs7mime_button); pobj->valid = camel_cipher_validity_clone(valid); 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); |