aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-format-html-display.c10
-rw-r--r--mail/em-format-html.c17
3 files changed, 28 insertions, 10 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e7e78dd534..5dfddcb7ce 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2004-05-19 Not Zed <NotZed@Ximian.com>
+
+ * em-format-html.c (efh_format_secure): make this match the efhd
+ stuff.
+
+ * em-format-html-display.c: removed stock_signature-nokey since it
+ doesn't exist in gnome-icon-theme.
+ (efhd_xpkcs7mime_button): if there is no signing, but encryption,
+ use its icon. if there's no encryption too, use a broken icon
+ (?).
+
2004-05-05 William Jon McCann <mccann@jhu.edu>
* GNOME_Evolution_Mail.server.in.in: Add menu_label and
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index f70eda5520..ae704152b8 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -638,11 +638,10 @@ efhd_complete(EMFormat *emf)
/* TODO: move the dialogue elsehwere */
/* FIXME: also in em-format-html.c */
-/* FIXME: stock_signature-nokey is not in the icon theme yet */
static const struct {
const char *icon, *shortdesc, *description;
} smime_sign_table[4] = {
- { "stock_signature-nokey", N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") },
+ { "stock_signature-bad", N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") },
{ "stock_signature-ok", N_("Valid signature"), N_("This message is signed and is valid meaning that it is very likely that this message is authentic.") },
{ "stock_signature-bad", N_("Invalid signature"), N_("The signature of this message cannot be verified, it may have been altered in transit.") },
{ "stock_signature", N_("Valid signature, cannot verify sender"), N_("This message is signed with a valid signature, but the sender of the message cannot be verified.") },
@@ -651,7 +650,7 @@ static const struct {
static const struct {
const char *icon, *shortdesc, *description;
} smime_encrypt_table[4] = {
- { "stock_signature-nokey", N_("Unencrypted"), N_("This message is not encrypted. Its content may be viewed in transit across The Internet.") },
+ { "stock_lock-broken", N_("Unencrypted"), N_("This message is not encrypted. Its content may be viewed in transit across The Internet.") },
{ "stock_lock-ok", N_("Encrypted, weak"), N_("This message is encrypted, but with a weak encryption algorithm. It would be difficult, but not impossible for an outsider to view the content of this message in a practical amount of time.") },
{ "stock_lock-ok", N_("Encrypted"), N_("This message is encrypted. It would be difficult for an outsider to view the content of this message.") },
{ "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.") },
@@ -845,7 +844,10 @@ efhd_xpkcs7mime_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
const char *name;
/* FIXME: need to have it based on encryption and signing too */
- name = smime_sign_table[po->valid->sign.status].icon;
+ if (po->valid->sign.status != 0)
+ name = smime_sign_table[po->valid->sign.status].icon;
+ else
+ name = smime_encrypt_table[po->valid->encrypt.status].icon;
pixbuf = e_icon_factory_get_icon (name, E_ICON_SIZE_LARGE_TOOLBAR);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index c135447300..f2d346378a 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -558,7 +558,7 @@ efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
static const struct {
const char *icon, *shortdesc;
} smime_sign_table[4] = {
- { NULL, N_("Unsigned") },
+ { "stock_signature-bad", N_("Unsigned") },
{ "stock_signature-ok", N_("Valid signature") },
{ "stock_signature-bad", N_("Invalid signature") },
{ "stock_signature", N_("Valid signature but cannot verify sender") },
@@ -567,8 +567,8 @@ static const struct {
static const struct {
const char *icon, *shortdesc;
} smime_encrypt_table[4] = {
- { NULL, N_("Unencrypted") },
- { "stock_lock-ok", N_("Encrypted, weak"),},
+ { "stock_lock-broken", N_("Unencrypted") },
+ { "stock_lock", N_("Encrypted, weak"),},
{ "stock_lock-ok", N_("Encrypted") },
{ "stock_lock-ok", N_("Encrypted, strong") },
};
@@ -591,8 +591,8 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
if (emf->valid == valid
&& (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
|| valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
- char *classid;
- char *iconpath;
+ char *classid, *iconpath;
+ const char *icon;
CamelMimePart *iconpart;
camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
@@ -600,7 +600,12 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
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);
+
+ if (valid->sign.status != 0)
+ icon = smime_sign_table[valid->sign.status].icon;
+ else
+ icon = smime_encrypt_table[valid->encrypt.status].icon;
+ iconpath = e_icon_factory_get_icon_filename(icon, E_ICON_SIZE_DIALOG);
iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath);
if (iconpart) {
(void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image);