summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/StatusManager/src/options.cpp')
-rw-r--r--plugins/StatusManager/src/options.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/StatusManager/src/options.cpp b/plugins/StatusManager/src/options.cpp
index c6fe45bda4..cb3d19e7fe 100644
--- a/plugins/StatusManager/src/options.cpp
+++ b/plugins/StatusManager/src/options.cpp
@@ -1,7 +1,21 @@
#include "stdafx.h"
-CSubPluginsOptionsDlg::CSubPluginsOptionsDlg()
- : CPluginDlgBase(hInst, IDD_OPT_SUBPLUGINS, MODULENAME),
+bool IsSubPluginEnabled(const char *name)
+{
+ // Check if this plugin was disabled as separate dll
+ CMStringA dllName(FORMAT, "%s.dll", name);
+ dllName.MakeLower();
+ int dllEnabled = !db_get_b(NULL, "PluginDisable", dllName);
+
+ char setting[128];
+ mir_snprintf(setting, "%s_enabled", name);
+ return db_get_b(NULL, MODULENAME, setting, dllEnabled) != 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+CSubPluginsOptionsDlg::CSubPluginsOptionsDlg() :
+ CPluginDlgBase(hInst, IDD_OPT_SUBPLUGINS, MODULENAME),
m_enableKeepStatus(this, IDC_ENABLE_KEEPSTATUS),
m_enableStartupStatus(this, IDC_ENABLE_STARTUPSTATUS),
m_enableAdvancedAutoAway(this, IDC_ENABLE_ADVANCEDAUTOAWAY)