diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 23:13:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 23:13:56 +0000 |
commit | 4810d4b1b7a47701b8e6c45490fb2643ea425123 (patch) | |
tree | fb94dd5889fdd0558605ffe738f0b2d6d2f08ca2 /plugins/Clist_modern/src/modern_clistmenus.cpp | |
parent | 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (diff) |
rest of menu cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4325 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clistmenus.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmenus.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 444fc233b3..42a1d0b016 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -67,9 +67,10 @@ void UninitCustomMenus(void) #define CLUI_FAVSETRATE "CLUI/SetContactRate" //LParam is rate, Wparam is contact handle
#define CLUI_FAVTOGGLESHOWOFFLINE "CLUI/ToggleContactShowOffline"
-static HGENMENU hFavoriteContactMenu = NULL;
-static HANDLE *hFavoriteContactMenuItems = NULL;
-static HANDLE hShowIfOflineItem = NULL;
+static HGENMENU hFavoriteContactMenu = NULL;
+static HGENMENU *hFavoriteContactMenuItems = NULL;
+
+static HGENMENU hShowIfOflineItem = NULL;
static HANDLE hOnContactMenuBuild_FAV = NULL;
static TCHAR * FAVMENUROOTNAME = LPGENT("&Contact rate");
@@ -114,7 +115,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
else {
mi.flags |= CMIM_FLAGS | CMIM_NAME;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hFavoriteContactMenu, (LPARAM)&mi);
+ Menu_ModifyItem(hFavoriteContactMenu, &mi);
bModifyMenu = TRUE;
}
@@ -126,7 +127,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.hParentMenu = hFavoriteContactMenu;
if ( !hFavoriteContactMenuItems) {
- hFavoriteContactMenuItems = (HANDLE*)malloc(sizeof(HANDLE)*SIZEOF(rates));
+ hFavoriteContactMenuItems = (HGENMENU*)malloc(sizeof(HANDLE)*SIZEOF(rates));
memset(hFavoriteContactMenuItems, 0, sizeof(HANDLE)*SIZEOF(rates));
}
@@ -139,7 +140,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.popupPosition = i;
if (bModifyMenu && hFavoriteContactMenuItems[i]) {
mi.flags |= CMIM_FLAGS | CMIM_ICON;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hFavoriteContactMenuItems[i], (LPARAM)&mi);
+ Menu_ModifyItem(hFavoriteContactMenuItems[i], &mi);
}
else hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
}
@@ -152,7 +153,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.position = -100000000;
if (bModifyMenu && hShowIfOflineItem) {
mi.flags |= CMIM_FLAGS | CMIM_ICON;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hShowIfOflineItem, (LPARAM)&mi);
+ Menu_ModifyItem(hShowIfOflineItem, &mi);
}
else hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
|