diff options
| author | George Hazan <ghazan@miranda.im> | 2018-05-16 13:42:19 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2018-05-16 13:42:25 +0300 |
| commit | 51f216f7e0feb67ad21387219c1b90e42b14658d (patch) | |
| tree | 2ce37e615bf4f82320fe01babc37401fa4a56ca3 /src/core/stdidle | |
| parent | 2e8582832fe56c89bb422b82e884ddaf67a8dbb3 (diff) | |
Core plugins => CMPlugin
Diffstat (limited to 'src/core/stdidle')
| -rw-r--r-- | src/core/stdidle/src/main.cpp | 8 | ||||
| -rw-r--r-- | src/core/stdidle/src/options.cpp | 2 | ||||
| -rw-r--r-- | src/core/stdidle/src/stdafx.h | 9 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/core/stdidle/src/main.cpp b/src/core/stdidle/src/main.cpp index 07ac3d6d36..fa6340963f 100644 --- a/src/core/stdidle/src/main.cpp +++ b/src/core/stdidle/src/main.cpp @@ -24,8 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadIdleModule(void);
void UnloadIdleModule(void);
+CMPlugin g_plugin;
CLIST_INTERFACE* pcli;
-HINSTANCE hInst;
int hLangpack;
PLUGININFOEX pluginInfo = {
@@ -41,12 +41,6 @@ PLUGININFOEX pluginInfo = { { 0x53ac190b, 0xe223, 0x4341, {0x82, 0x5f, 0x70, 0x9d, 0x85, 0x20, 0x21, 0x5b}}
};
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
-{
- hInst = hinstDLL;
- return TRUE;
-}
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
diff --git a/src/core/stdidle/src/options.cpp b/src/core/stdidle/src/options.cpp index 6fd0773192..6f8732223b 100644 --- a/src/core/stdidle/src/options.cpp +++ b/src/core/stdidle/src/options.cpp @@ -57,7 +57,7 @@ class COptionsDlg : public CPluginDlgBase public: COptionsDlg() : - CPluginDlgBase(hInst, IDD_OPT_IDLE, IDLEMOD), + CPluginDlgBase(g_plugin.getInst(), IDD_OPT_IDLE, IDLEMOD), edt1sttime(this, IDC_IDLE1STTIME), spinIdle(this, IDC_IDLESPIN), cmbAAStatus(this, IDC_AASTATUS), diff --git a/src/core/stdidle/src/stdafx.h b/src/core/stdidle/src/stdafx.h index 594499c890..5eff95b29b 100644 --- a/src/core/stdidle/src/stdafx.h +++ b/src/core/stdidle/src/stdafx.h @@ -40,9 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <direct.h>
#include <malloc.h>
-#define __NO_CMPLUGIN_NEEDED
#include <win2k.h>
-
#include <m_system.h>
#include <newpluginapi.h>
#include <m_utils.h>
@@ -69,7 +67,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IDLEMOD "Idle"
-extern HINSTANCE hInst;
+struct CMPlugin : public PLUGIN<CMPlugin>
+{
+ CMPlugin() :
+ PLUGIN<CMPlugin>(IDLEMOD)
+ {}
+};
struct Settings
{
|
