From ca9161c7132255bad0e86465308858ee81134c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 3 Dec 2012 22:10:09 +0000 Subject: ProfileManager: Added restart tray menu item (fixes #101). Version bump. git-svn-id: http://svn.miranda-ng.org/main/trunk@2630 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ProfileManager/src/pmanagerEx.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index eff0eaad77..412cb0a8e0 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -16,6 +16,7 @@ There is no warranty. #include #include #include +#include #include #include @@ -27,12 +28,11 @@ TCHAR fn[MAX_PATH]; TCHAR lmn[MAX_PATH]; TCHAR* pathn; int hLangpack; -HANDLE hLoadPM, hChangePM, hDbchecker, hRestartMe; PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), "Miranda NG Profile Changer", - PLUGIN_MAKE_VERSION(0,0,0,4), + PLUGIN_MAKE_VERSION(0,0,0,5), "Adds a menu item to change or load a different profile of Miranda NG, restart or run a dbchecker.", "Roman Gemini", "woobind@ukr.net", @@ -102,30 +102,30 @@ extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfo); - hLoadPM = CreateServiceFunction("Database/LoadPM", LoadPM); + CreateServiceFunction("Database/LoadPM", LoadPM); // !!!!!!!! check it later CLISTMENUITEM mi = { sizeof(mi) }; mi.position = -500200000; mi.flags = CMIF_TCHAR; mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LoadPM)); - mi.ptszPopupName = LPGENT("Database"); - mi.ptszName = LPGENT("Load profile"); + mi.ptszPopupName = _T("Database"); + mi.ptszName = _T("Load profile"); mi.pszService = "Database/LoadPM"; Menu_AddMainMenuItem(&mi); - hChangePM = CreateServiceFunction("Database/ChangePM", ChangePM); + CreateServiceFunction("Database/ChangePM", ChangePM); ZeroMemory(&mi, sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = -500200000; mi.flags = CMIF_TCHAR; mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ChangePM)); - mi.ptszPopupName = LPGENT("Database"); - mi.ptszName = LPGENT("Change profile"); + mi.ptszPopupName = _T("Database"); + mi.ptszName = _T("Change profile"); mi.pszService = "Database/ChangePM"; Menu_AddMainMenuItem(&mi); - hDbchecker = CreateServiceFunction("Database/CheckDb", CheckDb); + CreateServiceFunction("Database/CheckDb", CheckDb); ZeroMemory(&mi, sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = -500200000; @@ -136,7 +136,7 @@ extern "C" __declspec(dllexport) int Load(void) mi.pszService = "Database/CheckDb"; Menu_AddMainMenuItem(&mi); - hRestartMe = CreateServiceFunction("System/RestartMe", RestartMe); + CreateServiceFunction("System/RestartMe", RestartMe); ZeroMemory(&mi, sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = -500200000; @@ -146,14 +146,12 @@ extern "C" __declspec(dllexport) int Load(void) mi.ptszName = _T("Restart"); mi.pszService = "System/RestartMe"; Menu_AddMainMenuItem(&mi); + Menu_AddTrayMenuItem(&mi); return 0; } extern "C" __declspec(dllexport) int Unload(void) { - DestroyServiceFunction(hLoadPM); - DestroyServiceFunction(hChangePM); - return 0; } -- cgit v1.2.3