summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-25 12:23:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-25 12:23:28 +0000
commitadca17ccaecda72c8dd1234f1a7b91a0d5aff564 (patch)
treef0eaacc2570951ed615afd310f7f7ab144b612a9 /plugins/Clist_nicer
parent12d7476bd6e91fd3020a83b9249b63bafe68cd1d (diff)
another portion of dead genmenu services
git-svn-id: http://svn.miranda-ng.org/main/trunk@14377 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp24
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp15
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp34
3 files changed, 25 insertions, 48 deletions
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index 7f30fff6d2..4dcb13a226 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -1381,7 +1381,7 @@ static int CLUIFramesLoadMainMenu()
return -1;
if (MainMIRoot != (HANDLE)-1) {
- CallService(MO_REMOVEMENUITEM, (WPARAM)MainMIRoot, 0);
+ Menu_RemoveItem(MainMIRoot);
MainMIRoot = (HGENMENU)-1;
}
@@ -3012,17 +3012,17 @@ static int CLUIFrameOnModulesUnload(WPARAM, LPARAM)
WaitForSingleObject(hThreadMFUpdate, 2000);
CloseHandle(g_hEventThread);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIVisible, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMITitle, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMITBVisible, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMILock, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIColl, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIFloating, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIAlignRoot, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIAlignTop, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIAlignClient, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIAlignBottom, 0);
- CallService(MO_REMOVEMENUITEM, (LPARAM)contMIBorder, 0);
+ Menu_RemoveItem(contMIVisible);
+ Menu_RemoveItem(contMITitle);
+ Menu_RemoveItem(contMITBVisible);
+ Menu_RemoveItem(contMILock);
+ Menu_RemoveItem(contMIColl);
+ Menu_RemoveItem(contMIFloating);
+ Menu_RemoveItem(contMIAlignRoot);
+ Menu_RemoveItem(contMIAlignTop);
+ Menu_RemoveItem(contMIAlignClient);
+ Menu_RemoveItem(contMIAlignBottom);
+ Menu_RemoveItem(contMIBorder);
return 0;
}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp
index 858c65dcf7..d013caefd9 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp
+++ b/plugins/Clist_nicer/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:
@@ -62,7 +61,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;
@@ -86,14 +85,10 @@ 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;
+ ContextFrameMenuNotify(wParam, -1);
HMENU hMenu = CreatePopupMenu();
- ContextFrameMenuNotify(wParam, -1);
- CallService(MO_BUILDMENU, (WPARAM)hMenu, (LPARAM)&param);
+ Menu_Build(hMenu, hFrameMenuObject, wParam, lParam);
return (INT_PTR)hMenu;
}
@@ -111,7 +106,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;
}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
index d203d954c9..dd77bc9232 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
@@ -53,21 +53,10 @@ typedef struct {
static INT_PTR BuildGroupMenu(WPARAM, LPARAM)
{
- int tick;
- HMENU hMenu;
- ListParam param = {0};
- param.MenuObjectHandle = hGroupMenuObject;
-
- //hMenu = hMainMenu;
- hMenu = CreatePopupMenu();
- //hMenu = wParam;
- tick = GetTickCount();
-
NotifyEventHooks(hPreBuildGroupMenuEvent, 0, 0);
- CallService(MO_BUILDMENU, (WPARAM)hMenu, (LPARAM)&param);
- //DrawMenuBar((HWND)CallService("CLUI/GetHwnd",0,0));
- tick = GetTickCount() - tick;
+ HMENU hMenu = CreatePopupMenu();
+ Menu_Build(hMenu, hGroupMenuObject);
return (INT_PTR)hMenu;
}
@@ -92,7 +81,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
}
tmi.ownerdata = mmep;
- HGENMENU hNewItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hGroupMenuObject, (LPARAM)&tmi);
+ HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, &tmi);
char buf[1024];
mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
@@ -241,7 +230,7 @@ void InitGroupMenus(void)
InitSubGroupMenus();
//Group menu
- hGroupMenuObject = MO_CreateMenuObject("GroupMenu", LPGEN("Group menu"), 0, "CLISTMENUSGroup/ExecService");
+ hGroupMenuObject = Menu_AddObject("GroupMenu", LPGEN("Group menu"), 0, "CLISTMENUSGroup/ExecService");
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
@@ -369,16 +358,10 @@ static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
static INT_PTR BuildSubGroupMenu(WPARAM wParam, LPARAM)
{
- ListParam param = {0};
- param.MenuObjectHandle = hSubGroupMenuObject;
- param.wParam = wParam;
-
- HMENU hMenu = CreatePopupMenu();
- int tick = GetTickCount();
NotifyEventHooks(hPreBuildSubGroupMenuEvent, wParam, 0);
- CallService(MO_BUILDMENU, (WPARAM)hMenu, (LPARAM)&param);
- tick = GetTickCount() - tick;
+ HMENU hMenu = CreatePopupMenu();
+ Menu_Build(hMenu, hSubGroupMenuObject, wParam);
return (INT_PTR)hMenu;
}
@@ -402,8 +385,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
mmep->Param2 = gmp->lParam;
}
tmi.ownerdata = mmep;
-
- HGENMENU hNewItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hSubGroupMenuObject, (LPARAM)&tmi);
+ HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, &tmi);
char buf[1024];
mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
@@ -489,7 +471,7 @@ void InitSubGroupMenus(void)
HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU, OnBuildSubGroupMenu);
// SubGroup menu
- hSubGroupMenuObject = MO_CreateMenuObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
+ hSubGroupMenuObject = Menu_AddObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuonAddService");