diff options
Diffstat (limited to 'plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp')
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp index a8d4a70d58..35e6b95a7f 100644 --- a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp @@ -41,8 +41,7 @@ static INT_PTR AddContextFrameMenuItem(WPARAM, LPARAM lParam) fmep->Frameid = mi->popupPosition;
fmep->param1 = (INT_PTR)mi->pszContactOwner;
tmi.ownerdata = fmep;
-
- return CallService(MO_ADDNEWMENUITEM, (WPARAM)hFrameMenuObject, (LPARAM)&tmi);
+ return (INT_PTR)Menu_AddItem(hFrameMenuObject, &tmi);
}
//called with:
@@ -61,7 +60,7 @@ INT_PTR FrameMenuExecService(WPARAM wParam, LPARAM lParam) //true - ok,false ignore
INT_PTR FrameMenuCheckService(WPARAM wParam, LPARAM)
{
- PCheckProcParam pcpp = (PCheckProcParam)wParam;
+ TCheckProcParam *pcpp = (TCheckProcParam*)wParam;
if (pcpp == NULL)
return FALSE;
@@ -85,14 +84,9 @@ static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam) static INT_PTR BuildContextFrameMenu(WPARAM wParam, LPARAM lParam)
{
- ListParam param = { 0 };
- param.MenuObjectHandle = hFrameMenuObject;
- param.wParam = wParam;
- param.lParam = lParam;
-
HMENU hMenu = CreatePopupMenu();
ContextFrameMenuNotify(wParam, -1);
- CallService(MO_BUILDMENU, (WPARAM)hMenu, (LPARAM)¶m);
+ Menu_Build(hMenu, hFrameMenuObject, wParam, lParam);
return (INT_PTR)hMenu;
}
@@ -110,7 +104,7 @@ int InitFramesMenus(void) hPreBuildFrameMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDFRAMEMENU);
// frame menu object
- hFrameMenuObject = MO_CreateMenuObject("FrameMenu", LPGEN("Frame menu"), "FrameMenuCheckService", "FrameMenuExecService");
+ hFrameMenuObject = Menu_AddObject("FrameMenu", LPGEN("Frame menu"), "FrameMenuCheckService", "FrameMenuExecService");
Menu_ConfigureObject(hFrameMenuObject, MCO_OPT_FREE_SERVICE, "FrameMenuFreeService");
return 0;
}
|