diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-14 15:51:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-14 15:51:34 +0000 |
commit | e58823d961a630eb62e60d2ccb443761ba5f1704 (patch) | |
tree | 62d071be480d57af2a53f154a1468abe0b9449ff /plugins/Modernb | |
parent | 721aea0764451e985d575236205808bbef298244 (diff) |
- all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs.
- massive cleanup of the menu-related code
git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Modernb')
-rw-r--r-- | plugins/Modernb/hdr/modern_clc.h | 8 | ||||
-rw-r--r-- | plugins/Modernb/modern_clistmenus.cpp | 30 | ||||
-rw-r--r-- | plugins/Modernb/modern_clisttray.cpp | 26 | ||||
-rw-r--r-- | plugins/Modernb/modern_clui.cpp | 4 | ||||
-rw-r--r-- | plugins/Modernb/modern_cluiframes.cpp | 43 | ||||
-rw-r--r-- | plugins/Modernb/modern_framesmenu.cpp | 2 | ||||
-rw-r--r-- | plugins/Modernb/modern_groupmenu.cpp | 25 |
7 files changed, 59 insertions, 79 deletions
diff --git a/plugins/Modernb/hdr/modern_clc.h b/plugins/Modernb/hdr/modern_clc.h index 773d34fb32..56c7a8b4c0 100644 --- a/plugins/Modernb/hdr/modern_clc.h +++ b/plugins/Modernb/hdr/modern_clc.h @@ -31,9 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "modern_defsettings.h"
#include "modern_clist.h"
-
-
-
#define SETTING_TRAYICON_SINGLE 0
#define SETTING_TRAYICON_CYCLE 1
#define SETTING_TRAYICON_MULTI 2
@@ -173,11 +170,6 @@ struct ClcGroup; #define TEXT_TEXT_MAX_LENGTH 1024
-
-#define IsHContactGroup(h) (((UINT_PTR)(h)^HCONTACT_ISGROUP)<(HCONTACT_ISGROUP^HCONTACT_ISINFO))
-#define IsHContactInfo(h) (((UINT_PTR)(h)&HCONTACT_ISINFO)==HCONTACT_ISINFO)
-#define IsHContactContact(h) (((UINT_PTR)(h)&HCONTACT_ISGROUP)==0)
-
typedef struct tagClcContactTextPiece
{
int type;
diff --git a/plugins/Modernb/modern_clistmenus.cpp b/plugins/Modernb/modern_clistmenus.cpp index e69e08fe15..95e41c4d81 100644 --- a/plugins/Modernb/modern_clistmenus.cpp +++ b/plugins/Modernb/modern_clistmenus.cpp @@ -128,7 +128,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) //mi.pszService="ContactRate MenuItem NoService Fake";
mi.flags=CMIF_ROOTPOPUP|CMIF_TCHAR;
if (!hFavoriteContactMenu)
- hFavoriteContactMenu=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi);
+ hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
else
{
mi.flags|=CMIM_FLAGS|CMIM_ICON|CMIM_NAME;
@@ -164,26 +164,22 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.flags|=CMIM_FLAGS|CMIM_ICON;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hFavoriteContactMenuItems[i], (LPARAM)&mi);
}
- else
- hFavoriteContactMenuItems[i]=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi);
+ else hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
CallService(MS_SKIN2_RELEASEICON,(WPARAM)mi.hIcon,0);
if (mi.hIcon && NeedFree) DestroyIcon(mi.hIcon);
}
- {
- mi.hIcon=NULL;
- mi.ptszName=_T("Show even if offline");
- mi.flags=CMIF_CHILDPOPUP|CMIF_TCHAR|(ModernGetSettingByte((HANDLE)wParam,"CList","noOffline",0)?CMIF_CHECKED:0);
- mi.pszService=CLUI_FAVTOGGLESHOWOFFLINE;
- mi.popupPosition=i+100000000;
- mi.position=-100000000;
- if (bModifyMenu && hShowIfOflineItem)
- {
- mi.flags|=CMIM_FLAGS|CMIM_ICON;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hShowIfOflineItem, (LPARAM)&mi);
- }
- else
- hShowIfOflineItem=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi);
+
+ mi.hIcon=NULL;
+ mi.ptszName=_T("Show even if offline");
+ mi.flags=CMIF_CHILDPOPUP|CMIF_TCHAR|(ModernGetSettingByte((HANDLE)wParam,"CList","noOffline",0)?CMIF_CHECKED:0);
+ mi.pszService=CLUI_FAVTOGGLESHOWOFFLINE;
+ mi.popupPosition=i+100000000;
+ mi.position=-100000000;
+ if (bModifyMenu && hShowIfOflineItem) {
+ mi.flags|=CMIM_FLAGS|CMIM_ICON;
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hShowIfOflineItem, (LPARAM)&mi);
}
+ else hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
}
return 0;
}
diff --git a/plugins/Modernb/modern_clisttray.cpp b/plugins/Modernb/modern_clisttray.cpp index f94e25a668..521785066d 100644 --- a/plugins/Modernb/modern_clisttray.cpp +++ b/plugins/Modernb/modern_clisttray.cpp @@ -166,7 +166,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) if (!pcli->pfnGetProtocolVisibility(szChangedProto)) return;
- pcli->pfnLockTray();
+ pcli->pfnLockTray();
if ( pcli->cycleTimerId ) {
KillTimer( NULL, pcli->cycleTimerId);
pcli->cycleTimerId=0;
@@ -258,7 +258,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) pcli->cycleTimerId=0;
{
HICON hIcon;
- // 1 check if multi connecting icon
+ // 1 check if multi connecting icon
if (g_bMultiConnectionMode)
if (_strcmpi(szChangedProto,g_szConnectingProto))
{ pcli->pfnUnlockTray(); return; }
@@ -323,26 +323,26 @@ void cliTrayIconUpdateBase(const char *szChangedProto) break;
} }
}
- else if ( pcli->pfnGetProtocolVisibility( szChangedProto ))
+ else if ( pcli->pfnGetProtocolVisibility( szChangedProto ))
{
DBVARIANT dbv={DBVT_DELETED};
char *szProto;
int status=CallProtoService(szChangedProto,PS_GETSTATUS,0,0);
-
- if ((g_StatusBarData.connectingIcon==1)&&status>=ID_STATUS_CONNECTING&&status<=ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES)
+
+ if ((g_StatusBarData.connectingIcon==1)&&status>=ID_STATUS_CONNECTING&&status<=ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES)
{
HICON hIcon = ( HICON )CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);;
- if (hIcon)
+ if (hIcon)
changed=pcli->pfnTrayIconSetBaseInfo(hIcon,NULL);
}
- else if (status>=ID_STATUS_OFFLINE && status<=ID_STATUS_IDLE)
+ else if (status>=ID_STATUS_OFFLINE && status<=ID_STATUS_IDLE)
{
if(ModernGetSettingString(NULL,"CList","PrimaryStatus",&dbv))
szProto=NULL;
- else
+ else
szProto=dbv.pszVal;
changed=pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szProto,status),NULL);
- if (szProto)
+ if (szProto)
mir_free_and_nill(szProto);
}
}
@@ -370,7 +370,7 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd,UINT message,UINT_PTR idEve INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam)
{
- if (ModernGetSettingByte(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT))
+ if (ModernGetSettingByte(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT))
{
if (GetActiveWindow() != pcli->hwndContactList
&& GetWindow(GetParent(GetActiveWindow()),GW_OWNER) != pcli->hwndContactList)
@@ -420,7 +420,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) if(ModernGetSettingByte(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT)) {
if (LOWORD(msg->wParam)==WA_INACTIVE && h2!=h4)
autoHideTimerId=CLUI_SafeSetTimer(NULL,0,1000*ModernGetSettingWord(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),TrayIconAutoHideTimer);
- else {
+ else {
KillTimer(NULL,autoHideTimerId);
autoHideTimerId = 0;
}
@@ -628,10 +628,10 @@ void InitTrayMenus(void) CreateServiceFunction("CLISTMENUSTRAY/FreeOwnerDataTrayMenu",FreeOwnerDataTrayMenu);
CreateServiceFunction("CLISTMENUSTRAY/TrayMenuonAddService",TrayMenuonAddService);
- CreateServiceFunction(MS_CLIST_ADDTRAYMENUITEM,AddTrayMenuItem);
+ CreateServiceFunction("CList/AddTrayMenuItem",AddTrayMenuItem);
CreateServiceFunction(MS_CLIST_REMOVETRAYMENUITEM,RemoveTrayMenuItem);
CreateServiceFunction(MS_CLIST_MENUBUILDTRAY,BuildTrayMenu);
-
+
//Tray menu
memset(&tmp,0,sizeof(tmp));
diff --git a/plugins/Modernb/modern_clui.cpp b/plugins/Modernb/modern_clui.cpp index cf70313d70..8830f119d6 100644 --- a/plugins/Modernb/modern_clui.cpp +++ b/plugins/Modernb/modern_clui.cpp @@ -334,7 +334,7 @@ HRESULT CLUI::RegisterAvatarMenu() mi.hIcon=LoadSmallIcon(g_hInst,MAKEINTRESOURCE(IDI_SHOW_AVATAR));
mi.pszName=LPGEN("Show Contact &Avatar");
mi.pszService="CList/ShowContactAvatar";
- hShowAvatarMenuItem = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi);
+ hShowAvatarMenuItem = Menu_AddContactMenuItem(&mi);
DestroyIcon_protect(mi.hIcon);
CreateServiceFunction("CList/HideContactAvatar",CLUI::Service_Menu_HideContactAvatar);
@@ -342,7 +342,7 @@ HRESULT CLUI::RegisterAvatarMenu() mi.hIcon=LoadSmallIcon(g_hInst,MAKEINTRESOURCE(IDI_HIDE_AVATAR));
mi.pszName=LPGEN("Hide Contact &Avatar");
mi.pszService="CList/HideContactAvatar";
- hHideAvatarMenuItem = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi);
+ hHideAvatarMenuItem = Menu_AddContactMenuItem(&mi);
DestroyIcon_protect(mi.hIcon);
ModernHookEvent(ME_CLIST_PREBUILDCONTACTMENU, CLUI::OnEvent_ContactMenuPreBuild);
diff --git a/plugins/Modernb/modern_cluiframes.cpp b/plugins/Modernb/modern_cluiframes.cpp index 32f8635d4f..ee88e5a4de 100644 --- a/plugins/Modernb/modern_cluiframes.cpp +++ b/plugins/Modernb/modern_cluiframes.cpp @@ -832,7 +832,7 @@ static int CLUIFramesGetalClientFrame(void) return -1;
}
-static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char *addservice)
+static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGENMENU (*pfnAdd)(CLISTMENUITEM*))
{
//TMO_MenuItem tmi;
HGENMENU menuid;
@@ -851,7 +851,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszContactOwner=(char *)0;
mi.pszService=MS_CLIST_FRAMES_SHFRAME;
- menuid = (HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid = pfnAdd(&mi);
if(frameid==-1) _hmiVisible=menuid;
else g_pfwFrames[framepos].MenuHandles.MIVisible=menuid;
@@ -864,7 +864,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService=MS_CLIST_FRAMES_SHFRAMETITLEBAR;
mi.pszContactOwner=(char *)0;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiTBVisible=menuid;
else g_pfwFrames[framepos].MenuHandles.MITBVisible=menuid;
@@ -875,7 +875,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService=MS_CLIST_FRAMES_ULFRAME;
mi.pszContactOwner=(char *)0;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiLock=menuid;
else g_pfwFrames[framepos].MenuHandles.MILock=menuid;
@@ -886,7 +886,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService=MS_CLIST_FRAMES_UCOLLFRAME;
mi.pszContactOwner=(char *)0;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiColl=menuid;
else g_pfwFrames[framepos].MenuHandles.MIColl=menuid;
@@ -898,7 +898,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP;
mi.pszService="Set_Floating";
mi.pszContactOwner=(char *)0;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiFloating=menuid;
else g_pfwFrames[framepos].MenuHandles.MIFloating=menuid;
@@ -909,7 +909,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP|CMIF_CHECKED;
mi.pszService=MS_CLIST_FRAMES_SETUNBORDER;
mi.pszContactOwner=(char *)0;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiBorder=menuid;
else g_pfwFrames[framepos].MenuHandles.MIBorder=menuid;
@@ -924,7 +924,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP|CMIF_ROOTPOPUP;
mi.pszService="";
mi.pszContactOwner=(char *)0;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiAlignRoot=menuid;
else g_pfwFrames[framepos].MenuHandles.MIAlignRoot=menuid;
@@ -936,7 +936,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.pszName=LPGEN("&Top");
mi.pszService=CLUIFRAMESSETALIGNALTOP;
mi.pszContactOwner=(char *)alTop;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiAlignTop=menuid;
else g_pfwFrames[framepos].MenuHandles.MIAlignTop=menuid;
@@ -946,7 +946,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.pszName=LPGEN("&Client");
mi.pszService=CLUIFRAMESSETALIGNALCLIENT;
mi.pszContactOwner=(char *)alClient;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiAlignClient=menuid;
else g_pfwFrames[framepos].MenuHandles.MIAlignClient=menuid;
@@ -955,7 +955,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.pszName=LPGEN("&Bottom");
mi.pszService=CLUIFRAMESSETALIGNALBOTTOM;
mi.pszContactOwner=(char *)alBottom;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiAlignBottom=menuid;
else g_pfwFrames[framepos].MenuHandles.MIAlignBottom=menuid;
@@ -970,7 +970,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP|CMIF_ROOTPOPUP;
mi.pszService="";
mi.pszContactOwner=(char *)0;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiPosRoot=menuid;
else g_pfwFrames[framepos].MenuHandles.MIPosRoot=menuid;
//??????
@@ -981,7 +981,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP;
mi.pszService=CLUIFRAMESMOVEUP;
mi.pszContactOwner=(char *)1;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiPosUp=menuid;
else g_pfwFrames[framepos].MenuHandles.MIPosUp=menuid;
@@ -991,7 +991,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,char mi.flags=CMIF_CHILDPOPUP;
mi.pszService=CLUIFRAMESMOVEDOWN;
mi.pszContactOwner=(char *)-1;
- menuid=(HGENMENU)CallService(addservice,0,(LPARAM)&mi);
+ menuid=pfnAdd(&mi);
if(frameid==-1) _hmiPosDown=menuid;
else g_pfwFrames[framepos].MenuHandles.MIPosDown=menuid;
@@ -1824,7 +1824,7 @@ static int CLUIFramesLoadMainMenu() mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
mi.position = 3000090000;
mi.pszName = LPGEN("Frames");
- _hmiRoot = (HGENMENU)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ _hmiRoot = Menu_AddMainMenuItem(&mi);
DestroyIcon_protect(mi.hIcon);
// create frames menu
int separator=3000200000;
@@ -1835,8 +1835,8 @@ static int CLUIFramesLoadMainMenu() mi.hParentMenu = _hmiRoot;
mi.ptszName = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].Name;
mi.pszService = 0;
- g_pfwFrames[i].MenuHandles.MainMenuItem = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
- CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id,(int)g_pfwFrames[i].MenuHandles.MainMenuItem,separator,MS_CLIST_ADDMAINMENUITEM);
+ g_pfwFrames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi);
+ CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id,(int)g_pfwFrames[i].MenuHandles.MainMenuItem,separator,Menu_AddMainMenuItem);
CLUIFramesModifyMainMenuItems(g_pfwFrames[i].id,0);
CallService(MS_CLIST_FRAMEMENUNOTIFY,(WPARAM)g_pfwFrames[i].id,(LPARAM)g_pfwFrames[i].MenuHandles.MainMenuItem);
separator++;
@@ -1851,20 +1851,19 @@ static int CLUIFramesLoadMainMenu() mi.hParentMenu = _hmiRoot;
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.position = separator++;
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.position = separator++;
mi.pszName = LPGEN("Hide All Titlebars");
mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB;
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
-
+ Menu_AddMainMenuItem(&mi);
return 0;
}
@@ -4014,7 +4013,7 @@ int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam) {
/* HOOK */
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1,-1,000010000,MS_CLIST_ADDCONTEXTFRAMEMENUITEM);
+ CLUIFramesCreateMenuForFrame(-1,-1,000010000,Menu_AddContextFrameMenuItem);
return 0;
}
int CLUIFrameOnModulesUnload(WPARAM wParam,LPARAM lParam)
diff --git a/plugins/Modernb/modern_framesmenu.cpp b/plugins/Modernb/modern_framesmenu.cpp index 9e2aed8418..5a8552f0cb 100644 --- a/plugins/Modernb/modern_framesmenu.cpp +++ b/plugins/Modernb/modern_framesmenu.cpp @@ -197,7 +197,7 @@ int InitFramesMenus(void) CreateServiceFunction("FrameMenuCheckService",FrameMenuCheckService);
CreateServiceFunction(MS_CLIST_REMOVECONTEXTFRAMEMENUITEM,RemoveContextFrameMenuItem);
- CreateServiceFunction(MS_CLIST_ADDCONTEXTFRAMEMENUITEM,AddContextFrameMenuItem);
+ CreateServiceFunction("CList/AddContextFrameMenuItem",AddContextFrameMenuItem);
CreateServiceFunction(MS_CLIST_MENUBUILDFRAMECONTEXT,BuildContextFrameMenu);
CreateServiceFunction(MS_CLIST_FRAMEMENUNOTIFY,ContextFrameMenuNotify);
diff --git a/plugins/Modernb/modern_groupmenu.cpp b/plugins/Modernb/modern_groupmenu.cpp index e6ba5aba31..dcfa6db2a8 100644 --- a/plugins/Modernb/modern_groupmenu.cpp +++ b/plugins/Modernb/modern_groupmenu.cpp @@ -297,7 +297,7 @@ void GroupMenus_Init(void) CreateServiceFunction("CLISTMENUSGroup/HideOfflineRootHelper",HideOfflineRootHelper);
CreateServiceFunction("CLISTMENUSGroup/CreateGroupHelper",CreateGroupHelper);
- CreateServiceFunction(MS_CLIST_ADDGROUPMENUITEM,AddGroupMenuItem);
+ CreateServiceFunction("CList/AddGroupMenuItem",AddGroupMenuItem);
CreateServiceFunction(MS_CLIST_REMOVEGROUPMENUITEM,RemoveGroupMenuItem);
CreateServiceFunction(MS_CLIST_MENUBUILDGROUP,BuildGroupMenu);
@@ -689,24 +689,23 @@ void InitSubGroupMenus(void) {
TMenuParam tmp;
OptParam op;
-
+
CreateServiceFunction("CLISTMENUSSubGroup/ExecService",SubGroupMenuExecService);
CreateServiceFunction("CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu",FreeOwnerDataSubGroupMenu);
CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuonAddService",SubGroupMenuonAddService);
- CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuCheckService",SubGroupMenuCheckService);
+ CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuCheckService",SubGroupMenuCheckService);
CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy",GroupMenuExecProxy);
//CreateServiceFunction("CLISTMENUSSubGroup/HideSubGroupsHelper",HideSubGroupsHelper);
//CreateServiceFunction("CLISTMENUSSubGroup/UseSubGroupsHelper",UseSubGroupsHelper);
//CreateServiceFunction("CLISTMENUSSubGroup/HideOfflineRootHelper",HideOfflineRootHelper);
- CreateServiceFunction(MS_CLIST_ADDSUBGROUPMENUITEM,AddSubGroupMenuItem);
+ CreateServiceFunction("CList/AddSubGroupMenuItem",AddSubGroupMenuItem);
CreateServiceFunction(MS_CLIST_REMOVESUBGROUPMENUITEM,RemoveSubGroupMenuItem);
CreateServiceFunction(MS_CLIST_MENUBUILDSUBGROUP,BuildSubGroupMenu);
ModernHookEvent(ME_CLIST_PREBUILDSUBGROUPMENU,OnBuildSubGroupMenu);
-
//SubGroup menu
memset(&tmp,0,sizeof(tmp));
tmp.cbSize=sizeof(tmp);
@@ -714,13 +713,12 @@ void InitSubGroupMenus(void) tmp.ExecService="CLISTMENUSSubGroup/ExecService";
tmp.name=LPGEN("SubGroupMenu");
hSubGroupMenuObject=(HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
-
-
+
op.Handle=hSubGroupMenuObject;
op.Setting=OPT_USERDEFINEDITEMS;
op.Value=TRUE;
CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
-
+
op.Handle=hSubGroupMenuObject;
op.Setting=OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value=(INT_PTR)"CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu";
@@ -731,17 +729,15 @@ void InitSubGroupMenus(void) op.Value=(INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuonAddService";
CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
- op.Handle=hSubGroupMenuObject;
+ op.Handle=hSubGroupMenuObject;
op.Setting=OPT_MENUOBJECT_SET_CHECK_SERVICE;
op.Value=(INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuCheckService";
CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
-
- {
//add exit command to menu
CLISTMENUITEM mi;
GroupMenuParam gmp;
-
+
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
mi.position=1000;
@@ -782,7 +778,7 @@ void InitSubGroupMenus(void) gmp.lParam=0;gmp.wParam=POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
-
+
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
mi.position=900002;
@@ -793,9 +789,6 @@ void InitSubGroupMenus(void) gmp.lParam=0;gmp.wParam=POPUP_DELETEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
- //MS_CLIST_SubGroupCREATE
-
- };
}
//////////////////////////////END SubGroup MENU/////////////////////////
|