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 = mKeyWidgets.at(openPGPKeyRef); const KeyWidgets &widgets = mKeyWidgets.at(openPGPKeyRef);
const auto cardSupportsKey = !widgets.cardKeyRef.empty();
widgets.keyTitleLabel->setVisible(cardSupportsKey);
widgets.keyInfoLabel->setVisible(cardSupportsKey);
if (widgets.createCSRButton) {
widgets.createCSRButton->setVisible(cardSupportsKey);
}
if (!cardSupportsKey) {
return;
}
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>"));
......
Markdown is supported
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