aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-05-11 13:25:44 +0000
committersaturneric <[email protected]>2024-05-11 13:25:44 +0000
commit50c8b159ebba504218ac0bd9a6364e602d301755 (patch)
tree77564e5af8427a86a0ec9cadb250435a68c6d3ff
parentfix: use gfalloc functions properly (diff)
downloadGpgFrontend-50c8b159ebba504218ac0bd9a6364e602d301755.tar.gz
GpgFrontend-50c8b159ebba504218ac0bd9a6364e602d301755.zip
fix: modules should be activated before adding actions to menu
-rw-r--r--src/ui/main_window/MainWindowUI.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp
index c6db5b27..8b611152 100644
--- a/src/ui/main_window/MainWindowUI.cpp
+++ b/src/ui/main_window/MainWindowUI.cpp
@@ -618,9 +618,17 @@ void MainWindow::create_menus() {
help_menu_ = menuBar()->addMenu(tr("Help"));
help_menu_->addAction(start_wizard_act_);
help_menu_->addSeparator();
- help_menu_->addAction(check_update_act_);
- help_menu_->addAction(gnupg_act_);
+
+ if (Module::IsModuleActivate(kGnuPGInfoGatheringModuleID)) {
+ help_menu_->addAction(gnupg_act_);
+ }
+
help_menu_->addAction(translate_act_);
+
+ if (Module::IsModuleActivate(kVersionCheckingModuleID)) {
+ help_menu_->addAction(check_update_act_);
+ }
+
help_menu_->addAction(about_act_);
}