diff options
author | saturneric <[email protected]> | 2024-04-12 09:14:37 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-04-12 09:14:37 +0000 |
commit | 26e24222e434036e5ec13f8ec99b958faf325154 (patch) | |
tree | 2a7145ae6f480713a529a20a29a90de4c436c399 /src/ui/main_window/MainWindowUI.cpp | |
parent | fix: find and solve some issues on module management (diff) | |
download | GpgFrontend-26e24222e434036e5ec13f8ec99b958faf325154.tar.gz GpgFrontend-26e24222e434036e5ec13f8ec99b958faf325154.zip |
feat: add auto activate function and optimums for some structures
Diffstat (limited to 'src/ui/main_window/MainWindowUI.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowUI.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp index 3d321264..c38684d7 100644 --- a/src/ui/main_window/MainWindowUI.cpp +++ b/src/ui/main_window/MainWindowUI.cpp @@ -421,26 +421,29 @@ void MainWindow::create_actions() { connect(about_act_, &QAction::triggered, this, [=]() { new AboutDialog(0, this); }); - gnupg_act_ = new QAction(tr("GnuPG"), this); - gnupg_act_->setIcon(QIcon(":/icons/help.png")); - gnupg_act_->setToolTip(tr("Information about Gnupg")); - connect(gnupg_act_, &QAction::triggered, this, - [=]() { new AboutDialog(1, this); }); + if (Module::IsModuleAcivate( + "com.bktus.gpgfrontend.module.integrated.gnupg_info_gathering")) { + gnupg_act_ = new QAction(tr("GnuPG"), this); + gnupg_act_->setIcon(QIcon(":/icons/help.png")); + gnupg_act_->setToolTip(tr("Information about Gnupg")); + connect(gnupg_act_, &QAction::triggered, this, + [=]() { new AboutDialog(tr("GnuPG"), this); }); + } translate_act_ = new QAction(tr("Translate"), this); translate_act_->setIcon(QIcon(":/icons/help.png")); translate_act_->setToolTip(tr("Information about translation")); connect(translate_act_, &QAction::triggered, this, - [=]() { new AboutDialog(2, this); }); - - /* - * Check Update Menu - */ - check_update_act_ = new QAction(tr("Check for Updates"), this); - check_update_act_->setIcon(QIcon(":/icons/help.png")); - check_update_act_->setToolTip(tr("Check for updates")); - connect(check_update_act_, &QAction::triggered, this, - [=]() { new AboutDialog(3, this); }); + [=]() { new AboutDialog(tr("Translators"), this); }); + + if (Module::IsModuleAcivate( + "com.bktus.gpgfrontend.module.integrated.version_checking")) { + check_update_act_ = new QAction(tr("Check for Updates"), this); + check_update_act_->setIcon(QIcon(":/icons/help.png")); + check_update_act_->setToolTip(tr("Check for updates")); + connect(check_update_act_, &QAction::triggered, this, + [=]() { new AboutDialog(tr("Update"), this); }); + } start_wizard_act_ = new QAction(tr("Open Wizard"), this); start_wizard_act_->setToolTip(tr("Open the wizard")); |