From 2aa59179945482dee30935c991f9317dfbf31946 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 May 2018 18:23:34 +0300 Subject: Tipper, StopSpamMod, StopSpam, StatusManager, StatusChange, StartupSilence, StartPosition, SplashScreen, SpellChecker, Spamotron => CMPlugin --- plugins/StartPosition/src/main.cpp | 9 +++------ plugins/StartPosition/src/options.cpp | 2 +- plugins/StartPosition/src/startposition.cpp | 2 +- plugins/StartPosition/src/startposition.h | 5 +---- plugins/StartPosition/src/stdafx.h | 3 --- 5 files changed, 6 insertions(+), 15 deletions(-) (limited to 'plugins/StartPosition') 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 . #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 . #include "stdafx.h" -class CMPlugin : public PLUGIN +struct CMPlugin : public PLUGIN { - 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 . #pragma once #include -#define __NO_CMPLUGIN_NEEDED #include #include #include @@ -33,8 +32,6 @@ along with this program. If not, see . #include "resource.h" #include "version.h" -extern HINSTANCE g_hInstance; - #define MODULE_NAME "StartPosition" #define CLIST_MODULE_NAME "CList" -- cgit v1.2.3