aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/KeyMgmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/main_window/KeyMgmt.cpp')
-rw-r--r--src/ui/main_window/KeyMgmt.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/ui/main_window/KeyMgmt.cpp b/src/ui/main_window/KeyMgmt.cpp
index e3128231..f9364ecf 100644
--- a/src/ui/main_window/KeyMgmt.cpp
+++ b/src/ui/main_window/KeyMgmt.cpp
@@ -428,12 +428,20 @@ void KeyMgmt::SlotExportKeyToClipboard() {
}
void KeyMgmt::SlotGenerateKeyDialog() {
- (new KeyGenerateDialog(key_list_->GetCurrentGpgContextChannel(), this))
- ->exec();
- this->raise();
+ if (!CheckGpgVersion(key_list_->GetCurrentGpgContextChannel(), "2.2.0")) {
+ CommonUtils::RaiseMessageBoxNotSupported(this);
+ return;
+ }
+
+ new KeyGenerateDialog(key_list_->GetCurrentGpgContextChannel(), this);
}
void KeyMgmt::SlotGenerateSubKey() {
+ if (!CheckGpgVersion(key_list_->GetCurrentGpgContextChannel(), "2.2.0")) {
+ CommonUtils::RaiseMessageBoxNotSupported(this);
+ return;
+ }
+
auto key = key_list_->GetSelectedGpgKey();
if (key == nullptr) return;
@@ -444,10 +452,7 @@ void KeyMgmt::SlotGenerateSubKey() {
return;
}
- (new SubkeyGenerateDialog(key_list_->GetCurrentGpgContextChannel(), key,
- this))
- ->exec();
- this->raise();
+ new SubkeyGenerateDialog(key_list_->GetCurrentGpgContextChannel(), key, this);
}
void KeyMgmt::SlotExportAsOpenSSHFormat() {