aboutsummaryrefslogtreecommitdiffstats
path: root/gpgwin.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-08 20:01:02 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-08 20:01:02 +0000
commit188282cd21fccce9f67a180d499e2cb875a5f938 (patch)
treea8f976006e0a15e749e63607c79e154c4b350ea8 /gpgwin.cpp
parentchanged removeNoteByClassname to hideNoteByClassname since remove doesn't work (diff)
downloadgpg4usb-188282cd21fccce9f67a180d499e2cb875a5f938.tar.gz
gpg4usb-188282cd21fccce9f67a180d499e2cb875a5f938.zip
only show import key action in verificynotification-menu when theres missing key on verify
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@510 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgwin.cpp')
-rw-r--r--gpgwin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 494b622..c8ed8bd 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -747,6 +747,7 @@ void GpgWin::verify()
case 1: verifyLabelText="Message is partially signed by: ";
break;
}
+ bool unknownKeyFound=false;
while (sign) {
if (gpg_err_code(sign->status) == 9) {
verifyLabelText.append("Key with keyid ");
@@ -755,6 +756,7 @@ void GpgWin::verify()
verifyLabelText.append(" not present.");
*vn->keysNotInList << sign->fpr;
vn->setProperty("keyNotFound", true);
+ unknownKeyFound=true;
} else {
QString name = mKeyList->getKeyNameByFpr(sign->fpr);
QString email = "<"+mKeyList->getKeyEmailByFpr(sign->fpr)+">";
@@ -774,6 +776,11 @@ void GpgWin::verify()
qDebug() << "sig validity reason: " << sign->validity_reason << " - " << gpg_err_code(sign->validity_reason) << " - " << gpgme_strerror(sign->validity_reason);
sign = sign->next;
}
+ if (unknownKeyFound) {
+ vn->addImportAction();
+ } else {
+ vn->removeImportAction();
+ }
// Remove the last linebreak
verifyLabelText.remove(verifyLabelText.length()-1,1);