aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keydetailsdialog.cpp15
-rw-r--r--keydetailsdialog.h3
2 files changed, 17 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();
diff --git a/keydetailsdialog.h b/keydetailsdialog.h
index a655a4b..3beb34e 100644
--- a/keydetailsdialog.h
+++ b/keydetailsdialog.h
@@ -55,12 +55,15 @@ private:
QGroupBox *ownerBox;
QGroupBox *keyBox;
QGroupBox *fingerprintBox;
+ QGroupBox *additionalUidBox;
QDialogButtonBox *buttonBox;
QVBoxLayout *mvbox;
QGridLayout *vboxKD;
QGridLayout *vboxOD;
QVBoxLayout *vboxFP;
+ QVBoxLayout *vboxUID;
+
QLabel *nameLabel;
QLabel *emailLabel;