summaryrefslogtreecommitdiff
path: root/plugins/Popup/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-05 23:13:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-05 23:13:56 +0000
commit4810d4b1b7a47701b8e6c45490fb2643ea425123 (patch)
treefb94dd5889fdd0558605ffe738f0b2d6d2f08ca2 /plugins/Popup/src
parent007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (diff)
rest of menu cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4325 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src')
-rw-r--r--plugins/Popup/src/main.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 5ccb4ac13d..711ec72259 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -54,22 +54,21 @@ HMODULE hDwmapiDll = 0;
GLOBAL_WND_CLASSES g_wndClass = {0};
//===== MTextControl ====
-HANDLE htuText = NULL;
-HANDLE htuTitle = NULL;
+HANDLE htuText;
+HANDLE htuTitle;
//===== Menu item =====
-HANDLE hMenuRoot = NULL;
-HANDLE hMenuItem = NULL;
-HANDLE hMenuItemHistory = NULL;
+HGENMENU hMenuRoot;
+HGENMENU hMenuItem;
+HGENMENU hMenuItemHistory;
//===== Event Handles =====
-HANDLE hTTButton = NULL;
+HANDLE hTTButton;
//===== Options pages =====
static int OptionsInitialize(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 100000000;
odp.groupPosition = 910000000;
odp.hInstance = hInst;
@@ -129,12 +128,12 @@ static int IconsChanged(WPARAM wParam, LPARAM lParam)
mi.hIcon = IcoLib_GetIcon(ICO_POPUP_OFF, 0);
}
mi.flags = CMIM_ICON;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)&mi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuRoot, (LPARAM)&mi);
+ Menu_ModifyItem(hMenuItem, &mi);
+ Menu_ModifyItem(hMenuRoot, &mi);
mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.flags = CMIM_ICON;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItemHistory, (LPARAM)&mi);
+ Menu_ModifyItem(hMenuItemHistory, &mi);
return 0;
}
@@ -158,9 +157,6 @@ static int TTBLoaded(WPARAM wParam, LPARAM lParam)
//===== EnableDisableMenuCommand =====
INT_PTR svcEnableDisableMenuCommand(WPARAM wp, LPARAM lp)
{
- int iResult = 0;
- int iResultRoot = 0;
-
CLISTMENUITEM mi = { sizeof(mi) };
if (PopUpOptions.ModuleIsEnabled) {
//The module is enabled.
@@ -179,14 +175,14 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM wp, LPARAM lp)
mi.hIcon = IcoLib_GetIcon(ICO_POPUP_ON,0);
}
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
- iResult = CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hMenuItem, &mi);
mi.flags = CMIM_ICON;
- iResultRoot = CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuRoot, (LPARAM)&mi);
+ Menu_ModifyItem(hMenuRoot, &mi);
if (hTTButton)
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, (PopUpOptions.ModuleIsEnabled) ? TTBST_PUSHED : TTBST_RELEASED);
- return (iResult != 0 && iResultRoot != 0);
+ return 0;
}
INT_PTR svcShowHistory(WPARAM, LPARAM)