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/HistorySweeperLight/src/main.cpp | 24 +++++++++++++++++------- plugins/HistorySweeperLight/src/stdafx.h | 4 +--- 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'plugins/HistorySweeperLight/src') diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index 9ddc5c5e84..dae726de88 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -26,6 +26,8 @@ int &hLangpack(g_plugin.m_hLang); LIST g_hWindows(5, PtrKeySortT); +///////////////////////////////////////////////////////////////////////////////////////// + static PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), @@ -40,7 +42,18 @@ static PLUGININFOEX pluginInfoEx = { 0x1d9bf74a, 0x44a8, 0x4b3f, { 0xa6, 0xe5, 0x73, 0x6, 0x9d, 0x3a, 0x89, 0x79 } } }; -int OnIconPressed(WPARAM hContact, LPARAM lParam) +CMPlugin::CMPlugin() : + PLUGIN(ModuleName, pluginInfoEx) +{} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static int OnIconPressed(WPARAM hContact, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData *)lParam; @@ -63,7 +76,7 @@ int OnIconPressed(WPARAM hContact, LPARAM lParam) return 0; } -int OnModulesLoaded(WPARAM, LPARAM) +static int OnModulesLoaded(WPARAM, LPARAM) { int sweep = db_get_b(NULL, ModuleName, "SweepHistory", 0); @@ -106,11 +119,6 @@ int OnModulesLoaded(WPARAM, LPARAM) return 0; } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfoEx); @@ -122,6 +130,8 @@ extern "C" __declspec(dllexport) int Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) int Unload(void) { ShutdownAction(); diff --git a/plugins/HistorySweeperLight/src/stdafx.h b/plugins/HistorySweeperLight/src/stdafx.h index 27d77a69d2..c6ee6ae3c4 100644 --- a/plugins/HistorySweeperLight/src/stdafx.h +++ b/plugins/HistorySweeperLight/src/stdafx.h @@ -46,9 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(ModuleName) - {} + CMPlugin(); }; // main.c -- cgit v1.2.3