diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-07 12:19:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-07 12:19:25 +0300 |
commit | 1213ce7d1386f5677342951df1a80d589ce2779b (patch) | |
tree | 76ecc7f76b77453b9d3c1800f955e8f7c8da38ac /plugins/StatusManager/src/options.cpp | |
parent | f18d37c4c90bc39f295fea9fedbfae0e806d9f61 (diff) |
warning fixes
Diffstat (limited to 'plugins/StatusManager/src/options.cpp')
-rw-r--r-- | plugins/StatusManager/src/options.cpp | 18 |
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) |