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/Weather/src/stdafx.h | 8 +------- plugins/Weather/src/weather.cpp | 16 +++++++++++----- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/Weather/src') diff --git a/plugins/Weather/src/stdafx.h b/plugins/Weather/src/stdafx.h index 9d0c550575..c197c848cf 100644 --- a/plugins/Weather/src/stdafx.h +++ b/plugins/Weather/src/stdafx.h @@ -521,12 +521,6 @@ void ReleaseIconEx(HICON hIcon); struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(WEATHERPROTONAME) - { - opt.NoProtoCondition = db_get_b(NULL, WEATHERPROTONAME, "NoStatus", true); - RegisterProtocol((opt.NoProtoCondition) ? PROTOTYPE_VIRTUAL : PROTOTYPE_PROTOCOL); - SetUniqueId("ID"); - } + CMPlugin(); }; diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index 4e8637c590..d7957beeaf 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -39,13 +39,15 @@ HANDLE hHookWeatherError; MWindowList hDataWindowList, hWindowList; HANDLE hUpdateMutex; -CLIST_INTERFACE *pcli; unsigned status; unsigned old_status; UINT_PTR timerId; + +CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); +CLIST_INTERFACE *pcli; MYOPTIONS opt; @@ -57,10 +59,6 @@ BOOL ModuleLoaded; HANDLE hTBButton = nullptr; -///////////////////////////////////////////////////////////////////////////////////////// - -CMPlugin g_plugin; - ///////////////////////////////////////////////////////////////////////////////////////// // plugin info @@ -78,6 +76,14 @@ static const PLUGININFOEX pluginInfoEx = {0x6b612a34, 0xdcf2, 0x4e32, {0x85, 0xcf, 0xb6, 0xfd, 0x0, 0x6b, 0x74, 0x5e}} }; +CMPlugin::CMPlugin() : + PLUGIN(WEATHERPROTONAME, pluginInfoEx) +{ + opt.NoProtoCondition = db_get_b(NULL, WEATHERPROTONAME, "NoStatus", true); + RegisterProtocol((opt.NoProtoCondition) ? PROTOTYPE_VIRTUAL : PROTOTYPE_PROTOCOL); + SetUniqueId("ID"); +} + extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfoEx; -- cgit v1.2.3