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

Reorder context menu entries

* Certify User IDs and Revoke Certifications are now next to each other
* Revoke User ID is now the last option

GnuPG-bug-id: 5843
parent c0743daa
......@@ -887,14 +887,6 @@ void CertificateDetailsWidget::Private::userIDTableContextMenuRequested(const QP
});
action->setEnabled(canSignUserIDs);
}
{
auto action = menu->addAction(QIcon::fromTheme(QStringLiteral("view-certificate-revoke")),
i18nc("@action:inmenu", "Revoke User ID"),
q, [this, singleUserID]() {
revokeUserID(singleUserID);
});
action->setEnabled(canCreateCertifications(key) && canRevokeUserID(singleUserID));
}
if (Kleo::Commands::RevokeCertificationCommand::isSupported()) {
const auto actionText = userIDs.empty() ? i18nc("@action:inmenu", "Revoke Certifications...")
: i18ncp("@action:inmenu", "Revoke Certification...", "Revoke Certifications...", userIDs.size());
......@@ -927,6 +919,14 @@ void CertificateDetailsWidget::Private::userIDTableContextMenuRequested(const QP
action->setEnabled(!singleUserID.isNull());
}
#endif // MAILAKONADI_ENABLED
{
auto action = menu->addAction(QIcon::fromTheme(QStringLiteral("view-certificate-revoke")),
i18nc("@action:inmenu", "Revoke User ID"),
q, [this, singleUserID]() {
revokeUserID(singleUserID);
});
action->setEnabled(!singleUserID.isNull() && canCreateCertifications(key) && canRevokeUserID(singleUserID));
}
connect(menu, &QMenu::aboutToHide, menu, &QObject::deleteLater);
menu->popup(ui.userIDTable->viewport()->mapToGlobal(p));
}
......
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