summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/AsSingleWindow/src/AsSingleWindow.cpp7
-rw-r--r--plugins/AsSingleWindow/src/AsSingleWindow.h1
-rw-r--r--plugins/AsSingleWindow/src/Options.cpp5
-rw-r--r--plugins/AsSingleWindow/src/stdafx.h15
4 files changed, 13 insertions, 15 deletions
diff --git a/plugins/AsSingleWindow/src/AsSingleWindow.cpp b/plugins/AsSingleWindow/src/AsSingleWindow.cpp
index a2447bdd7b..d80548ba22 100644
--- a/plugins/AsSingleWindow/src/AsSingleWindow.cpp
+++ b/plugins/AsSingleWindow/src/AsSingleWindow.cpp
@@ -5,6 +5,7 @@
#include "version.h"
CLIST_INTERFACE *pcli;
+CMPlugin g_plugin;
int hLangpack;
PLUGININFOEX pluginInfo = {
@@ -21,12 +22,6 @@ PLUGININFOEX pluginInfo = {
sPluginVars pluginVars;
-bool WINAPI DllMain(HINSTANCE hInstDLL, DWORD, LPVOID)
-{
- pluginVars.hInst = hInstDLL;
- return true;
-}
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
diff --git a/plugins/AsSingleWindow/src/AsSingleWindow.h b/plugins/AsSingleWindow/src/AsSingleWindow.h
index d28bbfcb3d..035a7697b2 100644
--- a/plugins/AsSingleWindow/src/AsSingleWindow.h
+++ b/plugins/AsSingleWindow/src/AsSingleWindow.h
@@ -15,7 +15,6 @@
typedef std::list<sWindowInfo> windowsList;
struct sPluginVars {
- HINSTANCE hInst;
CRITICAL_SECTION m_CS;
HWND contactListHWND;
diff --git a/plugins/AsSingleWindow/src/Options.cpp b/plugins/AsSingleWindow/src/Options.cpp
index 80abf5b90f..54da7362e4 100644
--- a/plugins/AsSingleWindow/src/Options.cpp
+++ b/plugins/AsSingleWindow/src/Options.cpp
@@ -1,7 +1,4 @@
#include "stdafx.h"
-#include "AsSingleWindow.h"
-#include "Options.h"
-#include "resource.h"
int InitOptions(WPARAM wParam, LPARAM)
{
@@ -12,7 +9,7 @@ int InitOptions(WPARAM wParam, LPARAM)
Opts.pfnDlgProc = cbOptionsDialog;
Opts.pszTemplate = MAKEINTRESOURCEA(IDD_ASW_OPTIONSPAGE);
- Opts.hInstance = pluginVars.hInst;
+ Opts.hInstance = g_plugin.getInst();
Opts.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &Opts);
diff --git a/plugins/AsSingleWindow/src/stdafx.h b/plugins/AsSingleWindow/src/stdafx.h
index 92ec30a804..8b7fa46405 100644
--- a/plugins/AsSingleWindow/src/stdafx.h
+++ b/plugins/AsSingleWindow/src/stdafx.h
@@ -10,8 +10,6 @@
#include <list>
#include <algorithm>
-#define __NO_CMPLUGIN_NEEDED
-
#include "newpluginapi.h"
#include "m_system.h"
#include "m_langpack.h"
@@ -19,6 +17,15 @@
#include "m_message.h"
#include "m_clist.h"
#include "m_clistint.h"
-//#include "m_clui.h"
#include "m_options.h"
-//#include "m_plugins.h"
+
+#include "AsSingleWindow.h"
+#include "Options.h"
+#include "resource.h"
+
+struct CMPlugin : public PLUGIN<CMPlugin>
+{
+ CMPlugin() :
+ PLUGIN<CMPlugin>(SETTINGSNAME)
+ {}
+};