summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src/stdafx.h
blob: f82e4ae86a0a06efd656743d0808a896835ee76e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef _COMMON_H_
#define _COMMON_H_

#include <windows.h>
#include <process.h>
#include <winsock.h>
#include <wininet.h>
#include <ipexport.h>
#include <icmpapi.h>
#include <commctrl.h>

#include <newpluginapi.h>

#include <m_core.h>
#include <m_skin.h>
#include <m_clist.h>
#include <m_utils.h>
#include <m_icolib.h>
#include <m_options.h>
#include <m_protosvc.h>
#include <m_protocols.h>
#include <m_toptoolbar.h>
#include <m_statusplugins.h>
#include <m_gui.h>

#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_