summaryrefslogtreecommitdiff
path: root/plugins/ListeningTo
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
commite58823d961a630eb62e60d2ccb443761ba5f1704 (patch)
tree62d071be480d57af2a53f154a1468abe0b9449ff /plugins/ListeningTo
parent721aea0764451e985d575236205808bbef298244 (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/ListeningTo')
-rw-r--r--plugins/ListeningTo/listeningto.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp
index f5fbfd6d20..0dfb23d68b 100644
--- a/plugins/ListeningTo/listeningto.cpp
+++ b/plugins/ListeningTo/listeningto.cpp
@@ -60,7 +60,7 @@ static std::vector<HANDLE> hHooks;
static std::vector<HANDLE> hServices;
static HANDLE hEnableStateChangedEvent;
HANDLE hExtraIcon, hIcon1, hIcon2;
-static HANDLE hMainMenuGroup = NULL;
+static HGENMENU hMainMenuGroup = NULL;
static HANDLE hListeningInfoChangedEvent = NULL;
static HANDLE hTTB = NULL;
@@ -237,7 +237,7 @@ void RebuildMenu()
| (ListeningToEnabled(info->proto, TRUE) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
- info->hMenu = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi);
+ info->hMenu = Menu_AddMainMenuItem(&mi);
}
UpdateGlobalStatusMenus();
@@ -367,12 +367,11 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
mi.pszName = "Listening to";
mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB;
mi.icolibItem = hIcon1;
-
- hMainMenuGroup = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM) &mi);
+ hMainMenuGroup = Menu_AddMainMenuItem(&mi);
IcoLib_ReleaseIcon(mi.hIcon);
- mi.pszPopupName = (char *) hMainMenuGroup;
+ mi.hParentMenu = hMainMenuGroup;
mi.popupPosition = 500080000;
mi.position = 0;
mi.pszService = MS_LISTENINGTO_MAINMENU;
@@ -384,7 +383,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
| (ListeningToEnabled(NULL, TRUE) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
proto_itens.resize(1);
- proto_itens[0].hMenu = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi);
+ proto_itens[0].hMenu = Menu_AddMainMenuItem(&mi);
proto_itens[0].proto[0] = 0;
proto_itens[0].account[0] = 0;
proto_itens[0].old_xstatus = 0;