diff options
| author | Mataes <mataes2007@gmail.com> | 2018-05-15 22:54:05 +0300 | 
|---|---|---|
| committer | Mataes <mataes2007@gmail.com> | 2018-05-15 22:54:05 +0300 | 
| commit | 7de97c48a3d1c4d6f60c03f7850c9019de3169af (patch) | |
| tree | 7c9dd79e416274ae17ec2f7e1578ba6d2d8896f0 /plugins/AsSingleWindow/src | |
| parent | 8cd3e043ccb6acb688ba87260f115380e0f126f5 (diff) | |
AsSingleWindow: cmplugin adaptation
Diffstat (limited to 'plugins/AsSingleWindow/src')
| -rw-r--r-- | plugins/AsSingleWindow/src/AsSingleWindow.cpp | 7 | ||||
| -rw-r--r-- | plugins/AsSingleWindow/src/AsSingleWindow.h | 1 | ||||
| -rw-r--r-- | plugins/AsSingleWindow/src/Options.cpp | 5 | ||||
| -rw-r--r-- | plugins/AsSingleWindow/src/stdafx.h | 15 | 
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) +	{} +};  | 
