From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/StartPosition/src/main.cpp | 6 +++--- plugins/StartPosition/src/options.cpp | 24 ++++++++++++------------ plugins/StartPosition/src/startposition.cpp | 2 +- plugins/StartPosition/src/stdafx.h | 4 +++- 4 files changed, 19 insertions(+), 17 deletions(-) (limited to 'plugins/StartPosition/src') diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp index 5b8e2b3c5c..0fb2da4d0f 100644 --- a/plugins/StartPosition/src/main.cpp +++ b/plugins/StartPosition/src/main.cpp @@ -28,7 +28,7 @@ CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// -PLUGININFOEX pluginInfo = { +PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -43,14 +43,14 @@ PLUGININFOEX pluginInfo = { extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { - return &pluginInfo; + return &pluginInfoEx; } ///////////////////////////////////////////////////////////////////////////////////////// extern "C" __declspec(dllexport) int Load(void) { - mir_getLP(&pluginInfo); + mir_getLP(&pluginInfoEx); g_plugin.Init(); g_plugin.positionClist(); diff --git a/plugins/StartPosition/src/options.cpp b/plugins/StartPosition/src/options.cpp index 32eb9f3c78..fba92709ef 100644 --- a/plugins/StartPosition/src/options.cpp +++ b/plugins/StartPosition/src/options.cpp @@ -1,22 +1,22 @@ #include "stdafx.h" StartPositionOptions::StartPositionOptions() : - setTopPosition(MODULE_NAME, "CLEnableTop", 1), - setBottomPosition(MODULE_NAME, "CLEnableBottom", 0), - setSidePosition(MODULE_NAME, "CLEnableSide", 1), - clistAlign(MODULE_NAME, "CLAlign", ClistAlign::right), - setClistWidth(MODULE_NAME, "CLEnableWidth", 0), - setClistStartState(MODULE_NAME, "CLEnableState", 0), - clistState(MODULE_NAME, "CLState", ClistState::normal), - pixelsFromTop(MODULE_NAME, "CLpixelsTop", 3), - pixelsFromBottom(MODULE_NAME, "CLpixelsBottom", 3), - pixelsFromSide(MODULE_NAME, "CLpixelsSide", 3), - clistWidth(MODULE_NAME, "CLWidth", 180) + setTopPosition(MODULENAME, "CLEnableTop", 1), + setBottomPosition(MODULENAME, "CLEnableBottom", 0), + setSidePosition(MODULENAME, "CLEnableSide", 1), + clistAlign(MODULENAME, "CLAlign", ClistAlign::right), + setClistWidth(MODULENAME, "CLEnableWidth", 0), + setClistStartState(MODULENAME, "CLEnableState", 0), + clistState(MODULENAME, "CLState", ClistState::normal), + pixelsFromTop(MODULENAME, "CLpixelsTop", 3), + pixelsFromBottom(MODULENAME, "CLpixelsBottom", 3), + pixelsFromSide(MODULENAME, "CLpixelsSide", 3), + clistWidth(MODULENAME, "CLWidth", 180) { } COptionsDlg::COptionsDlg() : - CPluginDlgBase(g_plugin, IDD_OPTIONS, MODULE_NAME), + CPluginDlgBase(g_plugin, IDD_OPTIONS, MODULENAME), 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 64479d266c..34602969a6 100644 --- a/plugins/StartPosition/src/startposition.cpp +++ b/plugins/StartPosition/src/startposition.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" CMPlugin::CMPlugin() : - PLUGIN(MODULE_NAME) + PLUGIN(MODULENAME, pluginInfoEx) {} void CMPlugin::Init() diff --git a/plugins/StartPosition/src/stdafx.h b/plugins/StartPosition/src/stdafx.h index f654557d13..92602adbc0 100644 --- a/plugins/StartPosition/src/stdafx.h +++ b/plugins/StartPosition/src/stdafx.h @@ -32,8 +32,10 @@ along with this program. If not, see . #include "resource.h" #include "version.h" -#define MODULE_NAME "StartPosition" +#define MODULENAME "StartPosition" #define CLIST_MODULE_NAME "CList" #include "options.h" #include "startposition.h" + +extern PLUGININFOEX pluginInfoEx; \ No newline at end of file -- cgit v1.2.3