From 1bbd7e92d8f03ced5a3401eb04316920309e0185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 7 Jan 2017 09:36:28 +0100 Subject: 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. --- plugins/StatusManager/src/stdafx.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/StatusManager/src/stdafx.h') 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 -- cgit v1.2.3