diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-12-08 22:04:58 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-12-08 22:04:58 +0000 |
commit | 23310c1d0a3f91bba0c5ba936566c7367c6f2c11 (patch) | |
tree | 43181c924db00f6ce713a4f4ef9f0bf3af4a668f | |
parent | shorten toolbutton text (diff) | |
download | gpg4usb-23310c1d0a3f91bba0c5ba936566c7367c6f2c11.tar.gz gpg4usb-23310c1d0a3f91bba0c5ba936566c7367c6f2c11.zip |
replace status integer with string in keyimportdetaildialog
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@681 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | keyimportdetaildialog.cpp | 36 |
2 files changed, 36 insertions, 2 deletions
@@ -30,6 +30,7 @@ Release 0.3.2 - if import failed, because no key was found [DONE] - if key is already in keyring - for now done just for import from file and clipboard + - BUG: Also show details, when key is really new - show message, when key export is successful (statusbar) - dropdown from menubar instead of dialog for file-cryption (files->encrypt,decrypt) - encrypt and sign, decrypt and verify (?) @@ -40,6 +41,7 @@ Release 0.3.2 - icon from "line spacing icon" - Change file encryption to single dialog for en- and decryption - Add default key functionality + BUGS: - import key toolbar dropdown shows text, even if only icon should be shown - investigate special characters in passphrase in windows diff --git a/keyimportdetaildialog.cpp b/keyimportdetaildialog.cpp index 995a4f0..772122f 100644 --- a/keyimportdetaildialog.cpp +++ b/keyimportdetaildialog.cpp @@ -27,7 +27,6 @@ KeyImportDetailDialog::KeyImportDetailDialog(GpgME::GpgContext* ctx, KeyList* ke mCtx = ctx; mKeyList = keyList; mResult = result; - // If no key for import found, just ahow a message if (mResult->considered == 0) { QMessageBox::information(0, tr("Key import details"), tr("No keys found to import")); @@ -114,8 +113,41 @@ void KeyImportDetailDialog::createKeysTable() keysTable->setItem(row, 0, new QTableWidgetItem(key.name)); keysTable->setItem(row, 1, new QTableWidgetItem(key.email)); keysTable->setItem(row, 2, new QTableWidgetItem(key.id)); - keysTable->setItem(row, 3, new QTableWidgetItem(QString::number(status->status))); + qDebug() << "Keystatus: " << status->status; + // Set status of key + int keystatus=status->status; + QString statusString; + // if key is private + if (keystatus > 15) { + statusString.append("private"); + keystatus=keystatus-16; + } else { + statusString.append("public"); + } + if (keystatus == 0) { + statusString.append(", "+tr("unchanged")); + } else { + if (keystatus == 1) { + statusString.append(", "+tr("new key")); + } else { + if (keystatus > 7) { + statusString.append(", "+tr("new subkey")); + keystatus=keystatus-8; + } + if (keystatus > 3) { + statusString.append(", "+tr("new signature")); + keystatus=keystatus-4; + } + if (keystatus > 1) { + statusString.append(", "+tr("new uid")); + keystatus=keystatus-2; + } + } + } + +// keysTable->setItem(row, 3, new QTableWidgetItem(QString::number(status->status))); + keysTable->setItem(row,3,new QTableWidgetItem(statusString)); status=status->next; row++; } |