aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/controller')
-rw-r--r--src/ui/dialog/controller/GnuPGControllerDialog.cpp15
-rw-r--r--src/ui/dialog/controller/ModuleControllerDialog.cpp27
2 files changed, 19 insertions, 23 deletions
diff --git a/src/ui/dialog/controller/GnuPGControllerDialog.cpp b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
index 1874e255..b09b7280 100644
--- a/src/ui/dialog/controller/GnuPGControllerDialog.cpp
+++ b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
@@ -100,9 +100,6 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent)
this, tr("Open Directory"), {},
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
- GF_UI_LOG_DEBUG("key database path selected: {}",
- selected_custom_key_database_path);
-
custom_key_database_path_ = selected_custom_key_database_path;
// announce the restart
@@ -120,9 +117,6 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent)
this, tr("Open Directory"), {},
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
- GF_UI_LOG_DEBUG("gnupg install path selected: {}",
- selected_custom_gnupg_install_path);
-
custom_gnupg_path_ = selected_custom_gnupg_install_path;
// announce the restart
@@ -177,8 +171,6 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent)
void GnuPGControllerDialog::SlotAccept() {
apply_settings();
- GF_UI_LOG_DEBUG("gnupg controller apply done");
- GF_UI_LOG_DEBUG("restart needed: {}", get_restart_needed());
if (get_restart_needed() != 0) {
emit SignalRestartNeeded(get_restart_needed());
}
@@ -198,8 +190,6 @@ void GnuPGControllerDialog::slot_update_custom_key_database_path_label(
.GetSettings()
.value("gnupg/custom_key_database_path")
.toString();
- GF_UI_LOG_DEBUG("selected_custom_key_database_path from settings: {}",
- custom_key_database_path);
custom_key_database_path_ = custom_key_database_path;
}
@@ -217,7 +207,6 @@ void GnuPGControllerDialog::slot_update_custom_key_database_path_label(
if (ui_->currentKeyDatabasePathLabel->text().isEmpty()) {
const auto database_path = Module::RetrieveRTValueTypedOrDefault<>(
"core", "gpgme.ctx.database_path", QString{});
- GF_UI_LOG_DEBUG("got gpgme.ctx.database_path from rt: {}", database_path);
ui_->currentKeyDatabasePathLabel->setText(database_path);
}
}
@@ -236,8 +225,6 @@ void GnuPGControllerDialog::slot_update_custom_gnupg_install_path_label(
.GetSettings()
.value("gnupg/custom_gnupg_install_path")
.toString();
- GF_UI_LOG_DEBUG("custom_gnupg_install_path from settings: {}",
- custom_gnupg_install_path);
custom_gnupg_path_ = custom_gnupg_install_path;
}
@@ -256,7 +243,6 @@ void GnuPGControllerDialog::slot_update_custom_gnupg_install_path_label(
if (ui_->currentCustomGnuPGInstallPathLabel->text().isEmpty()) {
const auto gnupg_path = Module::RetrieveRTValueTypedOrDefault<>(
"core", "gpgme.ctx.app_path", QString{});
- GF_UI_LOG_DEBUG("got gnupg home path from rt: {}", gnupg_path);
auto dir = QFileInfo(gnupg_path).path();
ui_->currentCustomGnuPGInstallPathLabel->setText(dir);
}
@@ -351,7 +337,6 @@ auto GnuPGControllerDialog::get_restart_needed() const -> int {
}
void GnuPGControllerDialog::slot_set_restart_needed(int mode) {
- GF_UI_LOG_INFO("announce restart needed, mode: {}", mode);
this->restart_mode_ = mode;
}
diff --git a/src/ui/dialog/controller/ModuleControllerDialog.cpp b/src/ui/dialog/controller/ModuleControllerDialog.cpp
index 4c727b48..e7c0d5fe 100644
--- a/src/ui/dialog/controller/ModuleControllerDialog.cpp
+++ b/src/ui/dialog/controller/ModuleControllerDialog.cpp
@@ -62,14 +62,14 @@ ModuleControllerDialog::ModuleControllerDialog(QWidget* parent)
connect(ui_->moduleListView, &ModuleListView::SignalSelectModule, this,
&ModuleControllerDialog::slot_load_module_details);
- connect(ui_->activateOrDeactiveButton, &QPushButton::clicked, this, [=]() {
+ connect(ui_->activateOrDeactivateButton, &QPushButton::clicked, this, [=]() {
auto module_id = ui_->moduleListView->GetCurrentModuleID();
if (module_id.isEmpty()) return;
if (!module_manager_->IsModuleActivated(module_id)) {
module_manager_->ActiveModule(module_id);
} else {
- module_manager_->DeactiveModule(module_id);
+ module_manager_->DeactivateModule(module_id);
}
QTimer::singleShot(1000, [=]() { slot_load_module_details(module_id); });
@@ -93,19 +93,32 @@ ModuleControllerDialog::ModuleControllerDialog(QWidget* parent)
Module::TriggerEvent(event_id);
});
+ connect(ui_->pushButton_4, &QPushButton::clicked, this, []() {
+
+ });
+
connect(ui_->showModsDirButton, &QPushButton::clicked, this, [=]() {
QDesktopServices::openUrl(QUrl::fromLocalFile(
GlobalSettingStation::GetInstance().GetModulesDir()));
});
#ifdef RELEASE
- ui_->tabWidget->setTabEnabled(2, false);
+ ui_->tabWidget->setTabVisible(2, false);
#endif
+
+ // give user ability to give up all modules
+ auto disable_loading_all_modules =
+ GlobalSettingStation::GetInstance()
+ .GetSettings()
+ .value("basic/disable_loading_all_modules", false)
+ .toBool();
+ if (disable_loading_all_modules) {
+ ui_->tabWidget->setTabEnabled(0, false);
+ }
}
void ModuleControllerDialog::slot_load_module_details(
Module::ModuleIdentifier module_id) {
- GF_UI_LOG_DEBUG("loading module details, module id: {}", module_id);
auto module = module_manager_->SearchModule(module_id);
SettingsObject so(QString("module.%1.so").arg(module_id));
ModuleSO module_so(so);
@@ -122,8 +135,6 @@ void ModuleControllerDialog::slot_load_module_details(
module_so.module_id = module_id;
module_so.module_hash = module->GetModuleHash();
module_so.auto_activate = false;
- GF_UI_LOG_DEBUG("reseting module settings object, module id: {}",
- module_id);
so.Store(module_so.ToJson());
}
@@ -177,8 +188,8 @@ void ModuleControllerDialog::slot_load_module_details(
}
ui_->moduleInfoTextBrowser->setText(buffer);
- ui_->activateOrDeactiveButton->setText(if_activated ? tr("Deactivate")
- : tr("Activate"));
+ ui_->activateOrDeactivateButton->setText(if_activated ? tr("Deactivate")
+ : tr("Activate"));
ui_->autoActivateButton->setText(module_so.auto_activate
? tr("Disable Auto Activate")
: tr("Enable Auto Activate"));