#ifndef _COMMON_H_ #define _COMMON_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "resource.h" #define MODULENAME "StatusManager" #include "commonstatus.h" #include "KeepStatus\keepstatus.h" #include "StartupStatus\startupstatus.h" #include "AdvancedAutoAway\advancedautoaway.h" 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, dllEnabled ? 1 : 0); } class CSubPluginsOptionsDlg : CPluginDlgBase { private: CCtrlCheck m_enableKeepStatus; CCtrlCheck m_enableStartupStatus; CCtrlCheck m_enableAdvancedAutoAway; protected: void OnInitDialog(); void OnApply(); public: CSubPluginsOptionsDlg(); static int OnOptionsInit(WPARAM wParam, LPARAM); static CDlgBase *CreateOptionsPage() { return new CSubPluginsOptionsDlg(); } }; #endif //_COMMON_H_