aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp')
-rw-r--r--src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp b/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
index 73e7f4e5..b8942b94 100644
--- a/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
+++ b/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
@@ -66,6 +66,11 @@ KeyPairSubkeyTab::KeyPairSubkeyTab(int channel, GpgKeyPtr key, QWidget* parent)
add_adsk_button->hide();
}
+ if (!CheckGpgVersion(channel, "2.4.1")) {
+ add_adsk_button->setDisabled(true);
+ add_adsk_button->hide();
+ }
+
uid_buttons_layout->addWidget(add_subkey_button, 0, 0);
uid_buttons_layout->addWidget(add_adsk_button, 0, 1);
@@ -277,9 +282,12 @@ void KeyPairSubkeyTab::slot_refresh_subkey_list() {
}
void KeyPairSubkeyTab::slot_add_subkey() {
- auto* dialog =
- new SubkeyGenerateDialog(current_gpg_context_channel_, key_, this);
- dialog->show();
+ if (!CheckGpgVersion(current_gpg_context_channel_, "2.2.0")) {
+ CommonUtils::RaiseMessageBoxNotSupported(this);
+ return;
+ }
+
+ new SubkeyGenerateDialog(current_gpg_context_channel_, key_, this);
}
void KeyPairSubkeyTab::slot_add_adsk() {