aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ui/keypair_details/KeyPairDetailTab.cpp2
-rw-r--r--src/ui/keypair_details/KeyPairSubkeyTab.cpp4
-rw-r--r--src/ui/keypair_details/KeyPairUIDTab.cpp28
3 files changed, 24 insertions, 10 deletions
diff --git a/src/ui/keypair_details/KeyPairDetailTab.cpp b/src/ui/keypair_details/KeyPairDetailTab.cpp
index 441fae77..cf690626 100644
--- a/src/ui/keypair_details/KeyPairDetailTab.cpp
+++ b/src/ui/keypair_details/KeyPairDetailTab.cpp
@@ -43,7 +43,7 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &key, QW
keySizeVal = QString::number(key.length);
if (key.expires.toTime_t() == 0) {
- keyExpireVal = tr("Never");
+ keyExpireVal = tr("Never Expired");
} else {
keyExpireVal = key.expires.toString();
}
diff --git a/src/ui/keypair_details/KeyPairSubkeyTab.cpp b/src/ui/keypair_details/KeyPairSubkeyTab.cpp
index a67c119e..9d25a70c 100644
--- a/src/ui/keypair_details/KeyPairSubkeyTab.cpp
+++ b/src/ui/keypair_details/KeyPairSubkeyTab.cpp
@@ -145,7 +145,7 @@ void KeyPairSubkeyTab::slotRefreshSubkeyList() {
tmp3->setTextAlignment(Qt::AlignCenter);
subkeyList->setItem(row, 3, tmp3);
- auto *tmp4= new QTableWidgetItem(subkeys->expires.toString());
+ auto *tmp4= new QTableWidgetItem(subkeys->expires.toTime_t() == 0 ? "Never Expire" : subkeys->expires.toString());
tmp4->setTextAlignment(Qt::AlignCenter);
subkeyList->setItem(row, 4, tmp4);
@@ -175,7 +175,7 @@ void KeyPairSubkeyTab::slotRefreshSubkeyDetail() {
keyidVarLabel->setText(key->id);
keySizeVarLabel->setText(QString::number(key->length));
- expireVarLabel->setText(key->expires.toString());
+ expireVarLabel->setText(key->expires.toTime_t() == 0 ? "Never Expire" : key->expires.toString());
algorithmVarLabel->setText(key->pubkey_algo);
createdVarLabel->setText(key->timestamp.toString());
diff --git a/src/ui/keypair_details/KeyPairUIDTab.cpp b/src/ui/keypair_details/KeyPairUIDTab.cpp
index 73cd0bdb..f04e7357 100644
--- a/src/ui/keypair_details/KeyPairUIDTab.cpp
+++ b/src/ui/keypair_details/KeyPairUIDTab.cpp
@@ -25,16 +25,30 @@ KeyPairUIDTab::KeyPairUIDTab(GpgME::GpgContext *ctx, const GpgKey &key, QWidget
uidButtonsLayout->addWidget(manageUIDButton, 0, 2);
auto gridLayout = new QGridLayout();
+
gridLayout->addWidget(uidList, 0, 0);
gridLayout->addLayout(uidButtonsLayout, 1, 0);
- gridLayout->addWidget(sigList, 2, 0);
+ auto uidGroupBox = new QGroupBox();
+ uidGroupBox->setLayout(gridLayout);
+ uidGroupBox->setTitle("UIDs");
+
+ auto signGridLayout = new QGridLayout();
+ signGridLayout->addWidget(sigList, 0, 0);
+
+ auto signGroupBox = new QGroupBox();
+ signGroupBox->setLayout(signGridLayout);
+ signGroupBox->setTitle("Signature of Selected UID");
+
+ auto vboxLayout = new QVBoxLayout();
+ vboxLayout->addWidget(uidGroupBox);
+ vboxLayout->addWidget(signGroupBox);
connect(addUIDButton, SIGNAL(clicked(bool)), this, SLOT(slotAddUID()));
connect(mCtx, SIGNAL(signalKeyInfoChanged()), this, SLOT(slotRefreshUIDList()));
connect(uidList, SIGNAL(itemSelectionChanged()), this, SLOT(slotRefreshSigList()));
- setLayout(gridLayout);
+ setLayout(vboxLayout);
setAttribute(Qt::WA_DeleteOnClose, true);
slotRefreshUIDList();
@@ -44,7 +58,7 @@ void KeyPairUIDTab::createUIDList() {
uidList = new QTableWidget(this);
uidList->setColumnCount(4);
- uidList->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
+ // uidList->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
uidList->verticalHeader()->hide();
uidList->setShowGrid(false);
uidList->setSelectionBehavior(QAbstractItemView::SelectRows);
@@ -67,7 +81,7 @@ void KeyPairUIDTab::createUIDList() {
void KeyPairUIDTab::createSignList() {
sigList = new QTableWidget(this);
- sigList->setColumnCount(5);
+ sigList->setColumnCount(4);
sigList->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
sigList->verticalHeader()->hide();
sigList->setShowGrid(false);
@@ -82,7 +96,7 @@ void KeyPairUIDTab::createSignList() {
sigList->setAlternatingRowColors(true);
QStringList labels;
- labels << tr("Key ID") << tr("Name") << tr("Email") << tr("Create Time") << tr("Valid Time");
+ labels << tr("Key ID") << tr("Name") << tr("Email") << tr("Create Date");
sigList->setHorizontalHeaderLabels(labels);
sigList->horizontalHeader()->setStretchLastSection(true);
@@ -175,8 +189,8 @@ void KeyPairUIDTab::slotRefreshSigList() {
auto *tmp4 = new QTableWidgetItem(sig->create_time.toString());
sigList->setItem(sigRow, 3, tmp4);
- auto *tmp5 = new QTableWidgetItem(sig->expire_time.toString());
- sigList->setItem(sigRow, 4, tmp5);
+// auto *tmp5 = new QTableWidgetItem(sig->expire_time.toTime_t() == 0 ? "Never Expire" : sig->expire_time.toString());
+// sigList->setItem(sigRow, 4, tmp5);
sigRow++;
}