summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_groupmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern/src/modern_groupmenu.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_groupmenu.cpp61
1 files changed, 31 insertions, 30 deletions
diff --git a/plugins/Clist_modern/src/modern_groupmenu.cpp b/plugins/Clist_modern/src/modern_groupmenu.cpp
index df63d36e8f..ab78f0f0b6 100644
--- a/plugins/Clist_modern/src/modern_groupmenu.cpp
+++ b/plugins/Clist_modern/src/modern_groupmenu.cpp
@@ -28,16 +28,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////Group MENU/////////////////////////
HANDLE hGroupMenuObject;
-HANDLE hGroupMainMenuItemProxy;
-HANDLE hHideShowMainMenuItem;
-HANDLE hGroupStatusMenuItemProxy;
+HGENMENU hGroupMainMenuItemProxy;
+HGENMENU hHideShowMainMenuItem;
+HGENMENU hGroupStatusMenuItemProxy;
-HANDLE hHideOfflineUsersMenuItem;
-HANDLE hHideOfflineUsersOutHereMenuItem;
-HANDLE hHideEmptyGroupsMenuItem;
-HANDLE hDisableGroupsMenuItem;
-HANDLE hNewGroupMenuItem;
-HANDLE hNewSubGroupMenuItem;
+HGENMENU hHideOfflineUsersMenuItem;
+HGENMENU hHideOfflineUsersOutHereMenuItem;
+HGENMENU hHideEmptyGroupsMenuItem;
+
+HGENMENU hDisableGroupsMenuItem;
+HGENMENU hNewGroupMenuItem;
+HGENMENU hNewSubGroupMenuItem;
int NewGroupIconidx;
@@ -209,16 +210,16 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | ( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hHideOfflineUsersMenuItem, &mi);
mi.flags = CMIM_FLAGS | (SendMessage(pcli->hwndContactTree,CLM_GETHIDEOFFLINEROOT, 0, 0)?CMIF_CHECKED:0);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersOutHereMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, &mi);
mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideEmptyGroupsMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hHideEmptyGroupsMenuItem, &mi);
mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hDisableGroupsMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hDisableGroupsMenuItem, &mi);
return 0;
}
@@ -235,8 +236,8 @@ int static OnIconLibIconChanged(WPARAM wParam,LPARAM lParam)
CLISTMENUITEM clmi = { sizeof(clmi) };
clmi.flags = CMIM_ICON;
clmi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
- CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hNewSubGroupMenuItem,(LPARAM)&clmi);
- CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hNewGroupMenuItem,(LPARAM)&clmi);
+ Menu_ModifyItem(hNewSubGroupMenuItem, &clmi);
+ Menu_ModifyItem(hNewGroupMenuItem, &clmi);
return 0;
}
@@ -302,7 +303,7 @@ void GroupMenus_Init(void)
mi.pszService = MS_CLIST_SHOWHIDE;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.pszName = LPGEN("&Hide/Show");
- hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi);
+ hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 200000;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
@@ -314,13 +315,13 @@ void GroupMenus_Init(void)
mi.pszService = "";
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszName = LPGEN("&Main Menu");
- hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi);
+ hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004
mi.pszName = LPGEN("&Status");
- hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi);
+ hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 400000;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
@@ -339,7 +340,7 @@ void GroupMenus_Init(void)
mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
mi.pszName = LPGEN("&New Group");
- hNewGroupMenuItem = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi);
+ hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
mi.position = 100001;
@@ -347,22 +348,22 @@ void GroupMenus_Init(void)
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
mi.pszName = LPGEN("&Hide Offline Users");
gmp.lParam = 0;gmp.wParam = -1;
- hHideOfflineUsersMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
+ hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100002;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
mi.pszName = LPGEN("Hide &Offline Users out here");
- hHideOfflineUsersOutHereMenuItem = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi);
+ hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100003;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
mi.pszName = LPGEN("Hide &Empty Groups");
- hHideEmptyGroupsMenuItem = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi);
+ hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100004;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
mi.pszName = LPGEN("Disable &Groups");
- hDisableGroupsMenuItem = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi);
+ hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
HookEvent(ME_SKIN2_ICONSCHANGED, OnIconLibIconChanged);
}
@@ -374,8 +375,8 @@ HANDLE hSubGroupMenuObject;
HANDLE hSubGroupMainMenuItemProxy;
HANDLE hSubGroupStatusMenuItemProxy;
-HANDLE hHideOfflineUsersHereMenuItem;
-HANDLE hShowOfflineUsersHereMenuItem;
+
+HGENMENU hHideOfflineUsersHereMenuItem, hShowOfflineUsersHereMenuItem;
//SubGroupmenu exec param(ownerdata)
typedef struct{
@@ -413,10 +414,10 @@ static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam)
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | ((group->hideOffline && !gray1)?CMIF_CHECKED:0)| (gray1?CMIF_GRAYED:0);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersHereMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hHideOfflineUsersHereMenuItem, &mi);
mi.flags = CMIM_FLAGS | ((showOfflineinGroup && !gray2) ? CMIF_CHECKED:0)| (gray2?CMIF_GRAYED:0);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hShowOfflineUsersHereMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hShowOfflineUsersHereMenuItem, &mi);
return 0;
}
@@ -586,7 +587,7 @@ void InitSubGroupMenus(void)
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&New SubGroup");
gmp.lParam = 0;gmp.wParam = POPUP_NEWSUBGROUP;
- hNewSubGroupMenuItem = (HANDLE)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
+ hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
mi.position = 1001;
@@ -595,7 +596,7 @@ void InitSubGroupMenus(void)
mi.pszName = LPGEN("&Hide Offline Users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPHIDEOFFLINE;
- hHideOfflineUsersHereMenuItem = (HANDLE)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
+ hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
mi.position = 1002;
mi.hIcon = NULL;
@@ -603,7 +604,7 @@ void InitSubGroupMenus(void)
mi.pszName = LPGEN("&Show Offline Users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPSHOWOFFLINE;
- hShowOfflineUsersHereMenuItem = (HANDLE)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
+ hShowOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);