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/Toaster/src | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/Toaster/src')
-rw-r--r-- | plugins/Toaster/src/main.cpp | 14 | ||||
-rw-r--r-- | plugins/Toaster/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/Toaster/src/stdafx.h | 6 |
3 files changed, 13 insertions, 11 deletions
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp index acf2eae2a6..f41dd3e512 100644 --- a/plugins/Toaster/src/main.cpp +++ b/plugins/Toaster/src/main.cpp @@ -5,7 +5,7 @@ CMPlugin g_plugin; /////////////////////////////////////////////////////////////////////////////////////////
-PLUGININFOEX pluginInfo =
+PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -19,13 +19,17 @@ PLUGININFOEX pluginInfo = { 0x1fdbd8f0, 0x3929, 0x41bc, { 0x92, 0xd1, 0x2, 0x7, 0x79, 0x46, 0x7, 0x69 } }
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
if (!IsWinVer8Plus()) {
- MessageBox(nullptr, TranslateT("This plugin requires Windows 8 or higher"), _T(MODULE), MB_OK | MB_ICONERROR);
+ MessageBox(nullptr, TranslateT("This plugin requires Windows 8 or higher"), _T(MODULENAME), MB_OK | MB_ICONERROR);
return nullptr;
}
- return &pluginInfo;
+ return &pluginInfoEx;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -51,7 +55,7 @@ static int OnPreShutdown(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
HookEvent(ME_OPT_INITIALISE, OnOptionsInitialized);
HookEvent(ME_SYSTEM_PRESHUTDOWN, &OnPreShutdown);
@@ -65,7 +69,7 @@ extern "C" int __declspec(dllexport) Load(void) if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
CreateDirectoryTreeW(wszTempDir);
}
- else MessageBox(nullptr, TranslateT("Failed to create temporary directory"), _T(MODULE), MB_OK | MB_ICONERROR);
+ else MessageBox(nullptr, TranslateT("Failed to create temporary directory"), _T(MODULENAME), MB_OK | MB_ICONERROR);
return 0;
}
diff --git a/plugins/Toaster/src/options.cpp b/plugins/Toaster/src/options.cpp index 5475b67e54..da2e46ae84 100644 --- a/plugins/Toaster/src/options.cpp +++ b/plugins/Toaster/src/options.cpp @@ -46,10 +46,10 @@ void COptions::Enabled_OnChange(CCtrlCheck* chk) int OnOptionsInitialized(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.szTitle.w = L"Popups"; //_T(MODULE);
+ odp.szTitle.w = L"Popups"; //_T(MODULENAME);
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.position = -790000000;
- odp.szTab.w = _T(MODULE);
+ odp.szTab.w = _T(MODULENAME);
odp.pDialog = new COptions();
Options_AddPage(wParam, &odp);
diff --git a/plugins/Toaster/src/stdafx.h b/plugins/Toaster/src/stdafx.h index 1d337c7cf8..a5914af140 100644 --- a/plugins/Toaster/src/stdafx.h +++ b/plugins/Toaster/src/stdafx.h @@ -29,14 +29,12 @@ const wchar_t AppUserModelID[] = L"MirandaNG";
-#define MODULE "Toaster"
+#define MODULENAME "Toaster"
#define CHECKHR(x) if (FAILED(x)) return x;
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULE)
- {}
+ CMPlugin();
};
class ToastNotification;
|