summaryrefslogtreecommitdiff
path: root/plugins/Weather/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/Weather/src
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/Weather/src')
-rw-r--r--plugins/Weather/src/stdafx.h8
-rw-r--r--plugins/Weather/src/weather.cpp16
2 files changed, 12 insertions, 12 deletions
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>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(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;
@@ -58,10 +60,6 @@ BOOL ModuleLoaded;
HANDLE hTBButton = nullptr;
/////////////////////////////////////////////////////////////////////////////////////////
-
-CMPlugin g_plugin;
-
-/////////////////////////////////////////////////////////////////////////////////////////
// plugin info
static const PLUGININFOEX pluginInfoEx =
@@ -78,6 +76,14 @@ static const PLUGININFOEX pluginInfoEx =
{0x6b612a34, 0xdcf2, 0x4e32, {0x85, 0xcf, 0xb6, 0xfd, 0x0, 0x6b, 0x74, 0x5e}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(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;