From: Colin Leroy Date: Sat, 16 Jul 2005 03:07:13 +0000 (+0000) Subject: 2005-07-16 [colin] 1.9.12cvs67 X-Git-Tag: rel_1_9_13~26 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=0d0811eb49cb47752fd4cecb73fb5aa62925e111 2005-07-16 [colin] 1.9.12cvs67 * src/plugins/pgpcore/sgpgme.c Make messages a bit better. --- diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index 5e6298feb..9a84f40db 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,8 @@ +2005-07-16 [colin] 1.9.12cvs67 + + * src/plugins/pgpcore/sgpgme.c + Make messages a bit better. + 2005-07-16 [colin] 1.9.12cvs66 * src/imap.c diff --git a/PATCHSETS b/PATCHSETS index ae8e53aae..062b62d7f 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -661,3 +661,4 @@ ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/prefs_other.c; ) > 1.9.12cvs64.patchset ( cvs diff -u -r 1.115.2.43 -r 1.115.2.44 src/main.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_other.c; ) > 1.9.12cvs65.patchset ( cvs diff -u -r 1.179.2.53 -r 1.179.2.54 src/imap.c; cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/etpan/imap-thread.c; ) > 1.9.12cvs66.patchset +( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/plugins/pgpcore/sgpgme.c; ) > 1.9.12cvs67.patchset diff --git a/configure.ac b/configure.ac index 927220546..31a30f89b 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=12 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=66 +EXTRA_VERSION=67 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c index 906047911..c4adca337 100644 --- a/src/plugins/pgpcore/sgpgme.c +++ b/src/plugins/pgpcore/sgpgme.c @@ -118,37 +118,39 @@ static const gchar *get_validity_str(unsigned long validity) gchar *sgpgme_sigstat_info_short(gpgme_ctx_t ctx, gpgme_verify_result_t status) { gpgme_signature_t sig = NULL; - + gpgme_user_id_t user = NULL; + gchar *uname = NULL; + gpgme_key_t key; + if (status == NULL) { - return g_strdup(_("The signature has not been checked")); + return g_strdup(_("The signature has not been checked.")); } sig = status->signatures; if (sig == NULL) { - return g_strdup(_("The signature has not been checked")); + return g_strdup(_("The signature has not been checked.")); } + gpgme_get_key(ctx, sig->fpr, &key, 0); + if (key) + uname = key->uids->uid; + else + uname = ""; switch (gpg_err_code(sig->status)) { case GPG_ERR_NO_ERROR: - { gpgme_user_id_t user = NULL; - gpgme_key_t key; - - gpgme_get_key(ctx, sig->fpr, &key, 0); - - user = key->uids; - - return g_strdup_printf(_("Valid signature by %s (Trust: %s)"), - user->uid, get_validity_str(sig->validity)); + { + return g_strdup_printf(_("Good signature from %s (Trust: %s)."), + uname, get_validity_str(sig->validity)); } case GPG_ERR_SIG_EXPIRED: - return g_strdup(_("The signature has expired")); + return g_strdup_printf(_("Expired signature from %s."), uname); case GPG_ERR_KEY_EXPIRED: - return g_strdup(_("The key that was used to sign this part has expired")); + return g_strdup_printf(_("Expired key from %s."), uname); case GPG_ERR_BAD_SIGNATURE: - return g_strdup(_("This signature is invalid")); + return g_strdup_printf(_("Bad signature from %s."), uname); case GPG_ERR_NO_PUBKEY: - return g_strdup(_("You have no key to verify this signature")); + return g_strdup(_("No key available to verify this signature.")); default: - return g_strdup(_("The signature has not been checked")); + return g_strdup(_("The signature has not been checked.")); } return g_strdup(_("Error")); }