aboutsummaryrefslogtreecommitdiffstats
path: root/keydetailsdialog.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-05 23:39:15 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-05 23:39:15 +0000
commit9a1f54862a32c801cf26c23d4842e1fb1dedb691 (patch)
treea03f7f3b0aaf778a4024c7f6a1bc47b31a004d7e /keydetailsdialog.cpp
parentfix other crashes related to help tab (diff)
downloadgpg4usb-9a1f54862a32c801cf26c23d4842e1fb1dedb691.tar.gz
gpg4usb-9a1f54862a32c801cf26c23d4842e1fb1dedb691.zip
added show additional uids in keydetaildialog
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@660 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'keydetailsdialog.cpp')
-rw-r--r--keydetailsdialog.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/keydetailsdialog.cpp b/keydetailsdialog.cpp
index c2de5e4..ba4981a 100644
--- a/keydetailsdialog.cpp
+++ b/keydetailsdialog.cpp
@@ -31,6 +31,7 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid
ownerBox = new QGroupBox(tr("Owner details"));
keyBox = new QGroupBox(tr("Key details"));
fingerprintBox = new QGroupBox(tr("Fingerprint"));
+ additionalUidBox = new QGroupBox(tr("Additional Uids"));
buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
@@ -45,6 +46,7 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid
nameVarLabel = new QLabel(key->uids->name);
emailVarLabel = new QLabel(key->uids->email);
+
commentVarLabel = new QLabel(key->uids->comment);
keyidVarLabel = new QLabel(key->subkeys->keyid);
@@ -79,7 +81,6 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid
createdVarLabel = new QLabel(keyCreatedVal);
algorithmVarLabel = new QLabel(keyAlgoVal);
-
mvbox = new QVBoxLayout();
vboxKD = new QGridLayout();
vboxOD = new QGridLayout();
@@ -116,6 +117,18 @@ KeyDetailsDialog::KeyDetailsDialog(GpgME::GpgContext* ctx, gpgme_key_t key, QWid
fingerprintBox->setLayout(vboxFP);
mvbox->addWidget(fingerprintBox);
+ // If key has more than primary uid, also show the other uids
+ gpgme_user_id_t addUserIds= key->uids->next;
+ if (addUserIds !=NULL) {
+ vboxUID = new QVBoxLayout();
+ while (addUserIds != NULL){
+ vboxUID->addWidget(new QLabel(addUserIds->name+ QString(" <")+addUserIds->email+">"));
+ addUserIds=addUserIds->next;
+ }
+ additionalUidBox->setLayout(vboxUID);
+ mvbox->addWidget(additionalUidBox);
+ }
+
if (key->secret) {
QGroupBox *privKeyBox = new QGroupBox(tr("Private Key"));
QVBoxLayout *vboxPK = new QVBoxLayout();