diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-10 01:02:24 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-10 01:02:24 +0000 |
commit | 2f0d0efa8f39d915d114537483bcc9b48aeae263 (patch) | |
tree | db4b89e5dca53fed6018dbcb19eb08ab170fac3d /gpgwin.cpp | |
parent | added detail dialog to verificationwidget (diff) | |
download | gpg4usb-2f0d0efa8f39d915d114537483bcc9b48aeae263.tar.gz gpg4usb-2f0d0efa8f39d915d114537483bcc9b48aeae263.zip |
just comments
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@512 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgwin.cpp')
-rw-r--r-- | gpgwin.cpp | 36 |
1 files changed, 17 insertions, 19 deletions
@@ -744,44 +744,39 @@ void GpgWin::verify() QString verifyLabelText; switch (textIsSigned) { - case 2: verifyLabelText="Message is completly signed by: "; + case 2: verifyLabelText=tr("Text is completly signed by the following key(s): "); + verifyDetailText->append(tr("Text is completly signed by the following key(s): ")+" \n\n"); break; - case 1: verifyLabelText="Message is partially signed by: "; + case 1: verifyLabelText=tr("Text is partially signed by the following key(s): "); + verifyDetailText->append(tr("Text is partially signed by the following key(s): ")+" \n\n"); break; } bool unknownKeyFound=false; + while (sign) { + verifyDetailText->append(tr("Fingerprint: ")+QString(sign->fpr)+"\n"); if (gpg_err_code(sign->status) == 9) { - verifyLabelText.append("Key with keyid "+QString(sign->fpr)+" not present."); - - verifyDetailText->append("Message signed by: \n"); - verifyDetailText->append("Key with keyid "+QString(sign->fpr)+" not present."); + verifyLabelText.append(tr("Key not present with Fingerprint: ")+QString(sign->fpr)); *vn->keysNotInList << sign->fpr; vn->setProperty("keyNotFound", true); unknownKeyFound=true; + verifyDetailText->append(tr("Signature status: ")); + verifyDetailText->append(gpg_strerror(sign->status)); + verifyDetailText->append("\nsig validity reason: "+QString(gpgme_strerror(sign->validity_reason))+"\n"); } else { QString name = mKeyList->getKeyNameByFpr(sign->fpr); QString email = "<"+mKeyList->getKeyEmailByFpr(sign->fpr)+">"; if ( email == "<>" ) { email=""; } - verifyDetailText->append("Message successfully verified for: \n"); - verifyDetailText->append("Name: "+name+"\n"); - verifyDetailText->append("EMail: "+email); + verifyDetailText->append(tr("Name: ")+name+"\n"); + verifyDetailText->append(tr("EMail: ")+email); verifyLabelText.append(name+email); -// verifyLabelText.append(gpg_strerror(sign->status)); vn->setProperty("keyFound", true); } verifyLabelText.append("\n"); - verifyDetailText->append("\nFingerprint: "); - verifyDetailText->append(sign->fpr); - verifyDetailText->append("\nsig status: "); - verifyDetailText->append(gpg_strerror(sign->status)); - verifyDetailText->append("\nsig validity reason: "); -// verifyDetailText->append(sign->validity_reason); - verifyDetailText->append(gpgme_strerror(sign->validity_reason)); verifyDetailText->append("\n\n"); qDebug() << "sig fingerprint: " << sign->fpr; qDebug() << "sig status: " << sign->status << " - " << gpg_err_code(sign->status) << " - " << gpg_strerror(sign->status); @@ -790,11 +785,14 @@ void GpgWin::verify() sign = sign->next; } vn->setVerifyDetailText(*verifyDetailText); + + // If an unknown key is found, enable the importfromkeyserveraction if (unknownKeyFound) { - vn->addImportAction(); + vn->showImportAction(); } else { - vn->removeImportAction(); + vn->hideImportAction(); } + // Remove the last linebreak verifyLabelText.remove(verifyLabelText.length()-1,1); |