aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-18 03:47:41 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-18 03:47:41 +0800
commit9046018d52a1e4cafbc68dfb231197d02f5b3f0e (patch)
tree7f01fb071df5a6c7fab0953b0f506476722ed159 /mail
parent9e55ed8c3fac87a040f9ebc38885632cabc0a516 (diff)
downloadgsoc2013-evolution-9046018d52a1e4cafbc68dfb231197d02f5b3f0e.tar
gsoc2013-evolution-9046018d52a1e4cafbc68dfb231197d02f5b3f0e.tar.gz
gsoc2013-evolution-9046018d52a1e4cafbc68dfb231197d02f5b3f0e.tar.bz2
gsoc2013-evolution-9046018d52a1e4cafbc68dfb231197d02f5b3f0e.tar.lz
gsoc2013-evolution-9046018d52a1e4cafbc68dfb231197d02f5b3f0e.tar.xz
gsoc2013-evolution-9046018d52a1e4cafbc68dfb231197d02f5b3f0e.tar.zst
gsoc2013-evolution-9046018d52a1e4cafbc68dfb231197d02f5b3f0e.zip
Display an alternate description based on the trust value if we have a
2004-02-17 Jeffrey Stedfast <fejj@ximian.com> * em-format-html-display.c (efhd_xpkcs7mime_validity_clicked): Display an alternate description based on the trust value if we have a trust to work with. svn path=/trunk/; revision=24764
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/em-format-html-display.c24
2 files changed, 25 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c62d07986b..43c047541d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2004-02-17 Jeffrey Stedfast <fejj@ximian.com>
+ * em-format-html-display.c (efhd_xpkcs7mime_validity_clicked):
+ Display an alternate description based on the trust value if we
+ have a trust to work with.
+
* em-folder-browser.c (emfb_hide_deleted): Set the hide_deleted
bool on EMFolderView.
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index e00ed9161a..85ad67b872 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -636,12 +636,22 @@ efhd_complete(EMFormat *emf)
static const struct {
const char *icon, *shortdesc, *description;
} smime_sign_table[4] = {
- { NULL, N_("Unsigned"), N_("This message is not signed. There is no guarantee the sender of the message is authentic.") },
- { "pgp-signature-ok.png",N_("Valid signature"), N_("This message is signed and is valid, the sender of this message is very likely who they claim to be.") },
+ { NULL, N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") },
+ { "pgp-signature-ok.png", N_("Valid signature"), N_("This message is signed and is valid meaning that it is very likely that this message is authentic.") },
{ "pgp-signature-bad.png", N_("Invalid signature"), N_("The signature of this message cannot be verified, it may have been altered in transit.") },
{ "pgp-signature-nokey.png", N_("Valid signature, cannot verify sender"), N_("This message is signed with a valid signature, but the sender of the message cannot be verified.") },
};
+/* alternate sign_table descriptions for the GOOD signature case */
+static const char *smime_sign_trust[6] = {
+ NULL,
+ N_("This message is signed and valid but the sender is never to be trusted."),
+ N_("This message is signed and valid but there is no indication that the signature belongs to the sender."),
+ NULL,
+ NULL,
+ NULL,
+};
+
static const struct {
const char *icon, *shortdesc, *description;
} smime_encrypt_table[4] = {
@@ -753,6 +763,7 @@ static void
efhd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatHTMLPObject *pobject)
{
struct _smime_pobject *po = (struct _smime_pobject *)pobject;
+ const char *alt_desc = NULL;
GladeXML *xml;
GtkWidget *vbox, *w;
@@ -764,7 +775,14 @@ efhd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatHTMLPObject *pobject
po->widget = glade_xml_get_widget(xml, "message_security_dialog");
vbox = glade_xml_get_widget(xml, "signature_vbox");
- w = gtk_label_new(_(smime_sign_table[po->valid->sign.status].description));
+
+ if (po->valid->sign.trust)
+ alt_desc = smime_sign_trust[po->valid->sign.trust];
+ if (po->valid->sign.status == CAMEL_CIPHER_VALIDITY_SIGN_GOOD && alt_desc)
+ w = gtk_label_new (_(alt_desc));
+ else
+ w = gtk_label_new (_(smime_sign_table[po->valid->sign.status].description));
+
gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.5);
gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
gtk_box_pack_start((GtkBox *)vbox, w, TRUE, TRUE, 6);