diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-17 18:23:34 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-17 18:23:34 +0300 |
commit | 2aa59179945482dee30935c991f9317dfbf31946 (patch) | |
tree | 49fc2b77d68b636c7842a1af462af59c94ff6da5 /plugins/StartPosition | |
parent | 4c4735a232c680e60a85d0f85e2cb392e012c6e0 (diff) |
Tipper, StopSpamMod, StopSpam, StatusManager, StatusChange, StartupSilence, StartPosition, SplashScreen, SpellChecker, Spamotron => CMPlugin
Diffstat (limited to 'plugins/StartPosition')
-rw-r--r-- | plugins/StartPosition/src/main.cpp | 9 | ||||
-rw-r--r-- | plugins/StartPosition/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/StartPosition/src/startposition.cpp | 2 | ||||
-rw-r--r-- | plugins/StartPosition/src/startposition.h | 5 | ||||
-rw-r--r-- | plugins/StartPosition/src/stdafx.h | 3 |
5 files changed, 6 insertions, 15 deletions
diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp index 36705787a5..80bbb1d457 100644 --- a/plugins/StartPosition/src/main.cpp +++ b/plugins/StartPosition/src/main.cpp @@ -23,8 +23,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
-HINSTANCE g_hInstance;
int hLangpack;
+CMPlugin g_plugin;
+
+/////////////////////////////////////////////////////////////////////////////////////////
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
@@ -46,17 +48,12 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) /////////////////////////////////////////////////////////////////////////////////////////
-CMPlugin g_plugin;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
g_plugin.Init();
g_plugin.positionClist();
-
return 0;
}
diff --git a/plugins/StartPosition/src/options.cpp b/plugins/StartPosition/src/options.cpp index f797c1d030..9ba3fe4262 100644 --- a/plugins/StartPosition/src/options.cpp +++ b/plugins/StartPosition/src/options.cpp @@ -16,7 +16,7 @@ StartPositionOptions::StartPositionOptions() : } COptionsDlg::COptionsDlg() : - CPluginDlgBase(g_hInstance, IDD_OPTIONS, MODULE_NAME), + CPluginDlgBase(g_plugin.getInst(), IDD_OPTIONS, MODULE_NAME), chkPositionTop(this, IDC_CLTOPENABLE), edtPositionTop(this, IDC_CLTOP), chkPositionBottom(this, IDC_CLBOTTOMENABLE), diff --git a/plugins/StartPosition/src/startposition.cpp b/plugins/StartPosition/src/startposition.cpp index d6927d0ee1..64479d266c 100644 --- a/plugins/StartPosition/src/startposition.cpp +++ b/plugins/StartPosition/src/startposition.cpp @@ -48,7 +48,7 @@ void CMPlugin::positionClist() int CMPlugin::OnOptionsInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = {}; - odp.hInstance = g_hInstance; + odp.hInstance = g_plugin.getInst(); odp.szGroup.a = LPGEN("Contact list"); odp.szTitle.a = LPGEN("Start position"); odp.pDialog = new COptionsDlg(); diff --git a/plugins/StartPosition/src/startposition.h b/plugins/StartPosition/src/startposition.h index 35c3982cc8..455fb8981b 100644 --- a/plugins/StartPosition/src/startposition.h +++ b/plugins/StartPosition/src/startposition.h @@ -19,11 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h" -class CMPlugin : public PLUGIN<CMPlugin> +struct CMPlugin : public PLUGIN<CMPlugin> { - friend COptionsDlg; - -public: CMPlugin(); void Init(); diff --git a/plugins/StartPosition/src/stdafx.h b/plugins/StartPosition/src/stdafx.h index 0ad957d508..f654557d13 100644 --- a/plugins/StartPosition/src/stdafx.h +++ b/plugins/StartPosition/src/stdafx.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once
#include <windows.h>
-#define __NO_CMPLUGIN_NEEDED
#include <newpluginapi.h>
#include <m_gui.h>
#include <m_langpack.h>
@@ -33,8 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "resource.h"
#include "version.h"
-extern HINSTANCE g_hInstance;
-
#define MODULE_NAME "StartPosition"
#define CLIST_MODULE_NAME "CList"
|