summaryrefslogtreecommitdiff
path: root/plugins/Mwclist/CLUIFrames/cluiframes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Mwclist/CLUIFrames/cluiframes.cpp')
-rw-r--r--plugins/Mwclist/CLUIFrames/cluiframes.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/plugins/Mwclist/CLUIFrames/cluiframes.cpp b/plugins/Mwclist/CLUIFrames/cluiframes.cpp
index 12d4f71ac4..ab56da832d 100644
--- a/plugins/Mwclist/CLUIFrames/cluiframes.cpp
+++ b/plugins/Mwclist/CLUIFrames/cluiframes.cpp
@@ -630,7 +630,7 @@ int CLUIFramesGetalClientFrame(void)
return -1;
}
-HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addservice)
+HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGENMENU (*pfnAdd )( CLISTMENUITEM* ))
{
CLISTMENUITEM mi;
//TMO_MenuItem tmi;
@@ -647,7 +647,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.pszName = LPGEN("&FrameTitle");
mi.flags = CMIF_CHILDPOPUP|CMIF_GRAYED;
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMITitle = menuid;
else Frames[framepos].MenuHandles.MITitle = menuid;
@@ -661,7 +661,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszContactOwner = (char *)0;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIVisible = menuid;
else Frames[framepos].MenuHandles.MIVisible = menuid;
@@ -672,7 +672,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMITBVisible = menuid;
else Frames[framepos].MenuHandles.MITBVisible = menuid;
@@ -686,7 +686,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMILock = menuid;
else Frames[framepos].MenuHandles.MILock = menuid;
@@ -697,7 +697,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIColl = menuid;
else Frames[framepos].MenuHandles.MIColl = menuid;
@@ -709,7 +709,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP;
mi.pszService = "Set_Floating";
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIFloating = menuid;
else Frames[framepos].MenuHandles.MIFloating = menuid;
@@ -723,7 +723,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIBorder = menuid;
else Frames[framepos].MenuHandles.MIBorder = menuid;
@@ -737,7 +737,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP|CMIF_ROOTPOPUP;
mi.pszService = "";
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIAlignRoot = menuid;
else Frames[framepos].MenuHandles.MIAlignRoot = menuid;
@@ -749,7 +749,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.pszName = LPGEN("&Top");
mi.pszService = CLUIFRAMESSETALIGNALTOP;
mi.pszContactOwner = (char *)alTop;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIAlignTop = menuid;
else Frames[framepos].MenuHandles.MIAlignTop = menuid;
@@ -759,7 +759,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.pszName = LPGEN("&Client");
mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
mi.pszContactOwner = (char *)alClient;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIAlignClient = menuid;
else Frames[framepos].MenuHandles.MIAlignClient = menuid;
@@ -768,7 +768,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.pszName = LPGEN("&Bottom");
mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
mi.pszContactOwner = (char *)alBottom;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if (frameid == -1) contMIAlignBottom = menuid;
else Frames[framepos].MenuHandles.MIAlignBottom = menuid;
@@ -781,7 +781,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP|CMIF_ROOTPOPUP;
mi.pszService = "";
mi.pszContactOwner = (char *)0;
- menuid = (HANDLE)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
mi.pszPopupName = (char *)menuid;
mi.popupPosition = frameid;
@@ -790,7 +790,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP;
mi.pszService = CLUIFRAMESMOVEUPDOWN;
mi.pszContactOwner = (char *)1;
- CallService(addservice,0,(LPARAM)&mi);
+ pfnAdd(&mi);
mi.pszPopupName = (char *)menuid;
mi.popupPosition = frameid;
@@ -799,7 +799,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addse
mi.flags = CMIF_CHILDPOPUP;
mi.pszService = CLUIFRAMESMOVEUPDOWN;
mi.pszContactOwner = (char *)-1;
- CallService(addservice,0,(LPARAM)&mi);
+ pfnAdd(&mi);
return 0;
}
@@ -1433,7 +1433,7 @@ static int CLUIFramesLoadMainMenu()
mi.pszPopupName = LPGEN("Frames");
mi.pszName = LPGEN("New Menu System not Found...");
mi.pszService = "";
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
// create "show all frames" menu
mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_MIRANDA));
@@ -1442,7 +1442,7 @@ static int CLUIFramesLoadMainMenu()
mi.pszPopupName = LPGEN("Frames");
mi.pszName = LPGEN("Show All Frames");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES;
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_HELP));
mi.position = 10100001;
@@ -1450,7 +1450,7 @@ static int CLUIFramesLoadMainMenu()
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("Show All Titlebars");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB;
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
return 0;
}
@@ -1469,7 +1469,7 @@ static int CLUIFramesLoadMainMenu()
mi.pszPopupName = (char*)-1;
mi.pszName = LPGEN("Frames");
mi.pszService = 0;
- MainMIRoot = (HGENMENU)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ MainMIRoot = Menu_AddMainMenuItem(&mi);
// create frames menu
separator = 3000200000;
@@ -1480,8 +1480,8 @@ static int CLUIFramesLoadMainMenu()
mi.hParentMenu = MainMIRoot;
mi.ptszName = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name;
mi.pszService = 0;
- Frames[i].MenuHandles.MainMenuItem = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
- CLUIFramesCreateMenuForFrame(Frames[i].id,(int)Frames[i].MenuHandles.MainMenuItem,separator,MS_CLIST_ADDMAINMENUITEM);
+ Frames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi);
+ CLUIFramesCreateMenuForFrame(Frames[i].id,(int)Frames[i].MenuHandles.MainMenuItem,separator,Menu_AddMainMenuItem);
CLUIFramesModifyMainMenuItems(Frames[i].id,0);
//NotifyEventHooks(hPreBuildFrameMenuEvent,i,(LPARAM)Frames[i].MenuHandles.MainMenuItem);
CallService(MS_CLIST_FRAMEMENUNOTIFY,(WPARAM)Frames[i].id,(LPARAM)Frames[i].MenuHandles.MainMenuItem);
@@ -1497,7 +1497,7 @@ static int CLUIFramesLoadMainMenu()
mi.hParentMenu = MainMIRoot;
mi.pszName = LPGEN("Show All Frames");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES;
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
// create "show all titlebars" menu
mi.hIcon = NULL;
@@ -1506,7 +1506,7 @@ static int CLUIFramesLoadMainMenu()
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("Show All Titlebars");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB;
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
// create "hide all titlebars" menu
mi.hIcon = NULL;
@@ -1515,7 +1515,7 @@ static int CLUIFramesLoadMainMenu()
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("Hide All Titlebars");
mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB;
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
return 0;
}
@@ -2869,7 +2869,7 @@ static void CLUIRegisterFonts()
static int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam)
{
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1,-1,000010000,MS_CLIST_ADDCONTEXTFRAMEMENUITEM);
+ CLUIFramesCreateMenuForFrame(-1,-1,000010000,Menu_AddContextFrameMenuItem);
CLUIRegisterFonts();
return 0;
}