aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/keypair_details/KeyPairDetailTab.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-27 19:51:18 +0000
committerSaturneric <[email protected]>2021-05-27 19:51:18 +0000
commitad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc (patch)
treef01ad3ec20f85a17d433502e169eab99f2719b92 /src/ui/keypair_details/KeyPairDetailTab.cpp
parentFix the wrong use of the signing key interface. (diff)
downloadGpgFrontend-ad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc.tar.gz
GpgFrontend-ad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc.zip
Adjust part of the text of the UI interface of the UID operation tab.
Write an interface to increase UID. Write logic to adapt and increase UID. Adjust the UI of KeygenDialog. Delete the Close button of KeyDetailTab and its logic. Adjust the KeyDetailTab fingerprint and its copy button UI. Fix the problem of refreshing the order of the KeyPairUIDTab list. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'src/ui/keypair_details/KeyPairDetailTab.cpp')
-rw-r--r--src/ui/keypair_details/KeyPairDetailTab.cpp33
1 files changed, 6 insertions, 27 deletions
diff --git a/src/ui/keypair_details/KeyPairDetailTab.cpp b/src/ui/keypair_details/KeyPairDetailTab.cpp
index 366abf27..873b478c 100644
--- a/src/ui/keypair_details/KeyPairDetailTab.cpp
+++ b/src/ui/keypair_details/KeyPairDetailTab.cpp
@@ -13,8 +13,6 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &key, QW
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()));
nameVarLabel = new QLabel(key.name);
nameVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
@@ -90,38 +88,21 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &key, QW
fingerPrintVarLabel = new QLabel(beautifyFingerprint(key.fpr));
fingerPrintVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
- fingerPrintVarLabel->setStyleSheet("margin-left: 20; margin-right: 20;");
+ fingerPrintVarLabel->setStyleSheet("margin-left: 5; margin-right: 5;");
auto *hboxFP = new QHBoxLayout();
hboxFP->addWidget(fingerPrintVarLabel);
- QIcon ico(":button_copy.png");
- QPushButton copyFingerprintButton(QIcon(ico.pixmap(12, 12)), "");
- //copyFingerprintButton.setStyleSheet("QPushButton {border: 0px; } QPushButton:Pressed {} ");
- copyFingerprintButton.setFlat(true);
- copyFingerprintButton.setToolTip(tr("copy fingerprint to clipboard"));
- connect(&copyFingerprintButton, SIGNAL(clicked()), this, SLOT(slotCopyFingerprint()));
+ auto *copyFingerprintButton = new QPushButton(tr("Copy"));
+ copyFingerprintButton->setFlat(true);
+ copyFingerprintButton->setToolTip(tr("copy fingerprint to clipboard"));
+ connect(copyFingerprintButton, SIGNAL(clicked()), this, SLOT(slotCopyFingerprint()));
- hboxFP->addWidget(&copyFingerprintButton);
+ hboxFP->addWidget(copyFingerprintButton);
fingerprintBox->setLayout(hboxFP);
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 != nullptr) {
-// auto *vboxUID = new QVBoxLayout();
-// while (addUserIds != nullptr) {
-// addUserIdsVarLabel = new QLabel(
-// QString::fromUtf8(addUserIds->name) + QString(" <") + addUserIds->email + ">");
-// addUserIdsVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
-// vboxUID->addWidget(addUserIdsVarLabel);
-// addUserIds = addUserIds->next;
-// }
-// additionalUidBox->setLayout(vboxUID);
-// mvbox->addWidget(additionalUidBox);
-// }
-
if (key.is_private_key) {
auto *privKeyBox = new QGroupBox(tr("Private Key"));
auto *vboxPK = new QVBoxLayout();
@@ -157,8 +138,6 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &key, QW
mvbox->addLayout(expBox);
}
- mvbox->addWidget(buttonBox);
-
setAttribute(Qt::WA_DeleteOnClose, true);
setLayout(mvbox);
}