diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/Weather/src | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/Weather/src')
-rw-r--r-- | plugins/Weather/src/stdafx.h | 8 | ||||
-rw-r--r-- | plugins/Weather/src/weather.cpp | 16 |
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;
|