Skip to content
Snippets Groups Projects
Verified Commit ca4b690b authored by Ingo Klöcker's avatar Ingo Klöcker Committed by Ingo Klöcker
Browse files

Add "Change Cardholder" action to card actions menu

Set an icon for this action only for the icon-only edit button next to
the cardholder field because no other card action has an icon. The card
actions menu doesn't look good if there's only one action with an icon.

GnuPG-bug-id: 7018
parent d62de14e
No related branches found
No related tags found
No related merge requests found
......@@ -76,8 +76,7 @@ SmartCardActions::SmartCardActions()
"The PUK must contain at least eight characters."));
addAction(u"card_pgp_change_cardholder"_s, //
i18nc("@action", "Change Cardholder"),
i18nc("@info:tooltip", "Change the cardholder's name."),
QIcon::fromTheme(u"document-edit"_s));
i18nc("@info:tooltip", "Change the cardholder's name."));
// PIV-specific card actions
addAction(u"card_piv_change_pin"_s, //
......
......@@ -76,6 +76,7 @@ static std::vector<QAction *> actionsForCard(SmartCard::AppType appType)
u"card_pgp_unblock_card"_s,
u"card_pgp_change_admin_pin"_s,
u"card_pgp_change_puk"_s,
u"card_pgp_change_cardholder"_s,
};
break;
case AppType::P15App:
......@@ -204,6 +205,7 @@ SmartCardWidget::SmartCardWidget(Kleo::SmartCard::AppType appType, QWidget *pare
mCardholderField =
std::make_unique<InfoField>(i18nc("@label The owner of a smartcard. GnuPG refers to this as cardholder.", "Cardholder:"), parent);
const auto action = SmartCardActions::createProxyAction(SmartCardActions::instance()->action(u"card_pgp_change_cardholder"_s), parent);
action->setIcon(QIcon::fromTheme(u"document-edit"_s));
Kleo::setAccessibleName(action, action->text());
action->setText({});
mCardholderField->setAction(action);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment