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

Hide widgets of keys not supported by the card

For example, Kleopatra currently supports the authentication key only for
OpenPGP cards.

GnuPG-bug-id: 4876
parent 74f90c8f
...@@ -121,6 +121,16 @@ void OpenPGPKeyCardWidget::Private::updateKeyWidgets(const std::string &openPGPK ...@@ -121,6 +121,16 @@ void OpenPGPKeyCardWidget::Private::updateKeyWidgets(const std::string &openPGPK
{ {
const KeyWidgets &widgets =; const KeyWidgets &widgets =;
const auto cardSupportsKey = !widgets.cardKeyRef.empty();
if (widgets.createCSRButton) {
if (!cardSupportsKey) {
if (widgets.keyFingerprint.empty()) { if (widgets.keyFingerprint.empty()) {
widgets.keyInfoLabel->setTextFormat(Qt::RichText); widgets.keyInfoLabel->setTextFormat(Qt::RichText);
widgets.keyInfoLabel->setText(i18nc("@info", "<em>No key</em>")); widgets.keyInfoLabel->setText(i18nc("@info", "<em>No key</em>"));
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