Commit a304d9fb authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Remove informational text and add label for User ID table

For S/MIME, the informational text duplicates the "Related addresses"
label. And for OpenPGP, the text makes no sense for signing-only keys
and for keys without email addresses as user IDs. Therefore, we decided
to remove/hide it for S/MIME certificates and to use a simple "User IDs:"
label for OpenPGP keys. Setting the user ID table as buddy of the label
allows quick navigation to the table.

GnuPG-bug-id: 5843
parent cc80179d
Pipeline #197335 passed with stage
in 2 minutes and 16 seconds
......@@ -245,7 +245,7 @@ public:
private:
struct UI {
QLabel *label = nullptr;
QLabel *userIDTableLabel = nullptr;
InfoField *smimeOwnerField = nullptr;
QLabel *smimeRelatedAddresses = nullptr;
UserIDTable *userIDTable = nullptr;
......@@ -273,10 +273,9 @@ private:
{
auto mainLayout = new QVBoxLayout{parent};
label = new QLabel(i18n("You can use this certificate to secure communication with the following email addresses:"), parent);
label->setWordWrap(true);
userIDTableLabel = new QLabel(i18n("User IDs:"), parent);
mainLayout->addWidget(label);
mainLayout->addWidget(userIDTableLabel);
{
auto gridLayout_2 = new QGridLayout;
......@@ -300,6 +299,7 @@ private:
}
userIDTable = new UserIDTable{parent};
userIDTableLabel->setBuddy(userIDTable);
QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem();
__qtreewidgetitem->setText(0, QString::fromUtf8("1"));
userIDTable->setHeaderItem(__qtreewidgetitem);
......@@ -469,6 +469,8 @@ void CertificateDetailsWidget::Private::setupCommonProperties()
const bool hasSecret = key.hasSecret();
const bool isOpenPGP = key.protocol() == GpgME::OpenPGP;
ui.userIDTableLabel->setVisible(isOpenPGP);
ui.changePassphraseBtn->setVisible(hasSecret);
ui.genRevokeBtn->setVisible(isOpenPGP && hasSecret);
ui.certifyBtn->setVisible(isOpenPGP && !hasSecret);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment