diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-08 20:01:02 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-08 20:01:02 +0000 |
commit | 188282cd21fccce9f67a180d499e2cb875a5f938 (patch) | |
tree | a8f976006e0a15e749e63607c79e154c4b350ea8 /gpgwin.cpp | |
parent | changed removeNoteByClassname to hideNoteByClassname since remove doesn't work (diff) | |
download | gpg4usb-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.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |