summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src/stdafx.h
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2017-01-07 09:36:28 +0100
committerRobert Pösel <robyer@seznam.cz>2017-01-07 09:36:28 +0100
commit1bbd7e92d8f03ced5a3401eb04316920309e0185 (patch)
treefe73d095c32e8c070569930e1453e9de750cd071 /plugins/StatusManager/src/stdafx.h
parentca08d491b0f3058e465513c6c181ab9c121e2ca9 (diff)
StatusManager: Respect if subplugin was disabled as dll previously
This makes a bit better update experience for users that used and disabled one of subplugins in the past, because they will be disabled by default after update to StatusManager.
Diffstat (limited to 'plugins/StatusManager/src/stdafx.h')
-rw-r--r--plugins/StatusManager/src/stdafx.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/StatusManager/src/stdafx.h b/plugins/StatusManager/src/stdafx.h
index fcd8d0d745..f82e4ae86a 100644
--- a/plugins/StatusManager/src/stdafx.h
+++ b/plugins/StatusManager/src/stdafx.h
@@ -37,9 +37,14 @@ extern HINSTANCE hInst;
static BYTE IsSubPluginEnabled(const char* name)
{
+ // Check if this plugin was disabled as separate dll
+ CMStringA dllName(FORMAT, "%s.dll", name);
+ dllName.MakeLower();
+ bool dllEnabled = !db_get_b(NULL, "PluginDisable", dllName);
+
char setting[128];
mir_snprintf(setting, "%s_enabled", name);
- return db_get_b(NULL, MODULENAME, setting, 1);
+ return db_get_b(NULL, MODULENAME, setting, dllEnabled ? 1 : 0);
}
class CSubPluginsOptionsDlg : CPluginDlgBase