diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-25 12:23:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-25 12:23:28 +0000 |
commit | adca17ccaecda72c8dd1234f1a7b91a0d5aff564 (patch) | |
tree | f0eaacc2570951ed615afd310f7f7ab144b612a9 /protocols/Gadu-Gadu/src | |
parent | 12d7476bd6e91fd3020a83b9249b63bafe68cd1d (diff) |
another portion of dead genmenu services
git-svn-id: http://svn.miranda-ng.org/main/trunk@14377 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.cpp | 4 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/image.cpp | 3 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/links.cpp | 30 |
4 files changed, 15 insertions, 24 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 0712ed4784..b6b75db861 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -256,7 +256,7 @@ void GGPROTO::block_init() void GGPROTO::block_uninit()
{
- CallService(MO_REMOVEMENUITEM, (WPARAM)hBlockMenuItem, 0);
+ Menu_RemoveItem(hBlockMenuItem);
}
//////////////////////////////////////////////////////////
@@ -289,7 +289,7 @@ void GGPROTO::menus_init() hCLRoot = Menu_AddProtoMenuItem(&mi);
if (hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)hMenuRoot, 0);
+ Menu_RemoveItem(hMenuRoot);
hMenuRoot = NULL;
}
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 99f7c478e6..a3c8ba8141 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -95,7 +95,7 @@ GGPROTO::~GGPROTO() Popup_UnregisterClass(hPopupNotify);
if (hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)hMenuRoot, 0);
+ Menu_RemoveItem(hMenuRoot);
// Close handles
Netlib_CloseHandle(m_hNetlibUser);
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 3fbda53b9d..9ec67477e1 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -127,8 +127,7 @@ int GGPROTO::img_destroy() // Destroy list
list_destroy(imagedlgs, 1);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hImageMenuItem, 0);
-
+ Menu_RemoveItem(hImageMenuItem);
return FALSE;
}
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index a915416a63..15a1da12a8 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -71,45 +71,37 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) }
if (items > 1) {
- ListParam param = {0};
- HMENU hMenu = CreatePopupMenu();
POINT pt;
- int cmd = 0;
-
- param.MenuObjectHandle = hInstanceMenu;
- CallService(MO_BUILDMENU, (WPARAM)hMenu, (LPARAM)¶m);
-
GetCursorPos(&pt);
- cmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
+
+ HMENU hMenu = CreatePopupMenu();
+ Menu_Build(hMenu, hInstanceMenu);
+ int cmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
DestroyMenu(hMenu);
if (cmd)
- CallService(MO_PROCESSCOMMANDBYMENUIDENT, cmd, (LPARAM)&gg);
+ Menu_ProcessCommandById(cmd, (LPARAM)&gg);
}
if (gg == NULL)
return 0;
- if (ServiceExists(MS_MSG_SENDMESSAGE))
- {
- MCONTACT hContact = gg->getcontact(uin, 1, 0, NULL);
- if (hContact != NULL)
- CallService(MS_MSG_SENDMESSAGE, hContact, 0);
- }
-
+ MCONTACT hContact = gg->getcontact(uin, 1, 0, NULL);
+ if (hContact != NULL)
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return 0;
}
void gg_links_instancemenu_init()
{
CreateServiceFunction(GGS_MENUCHOOSE, gg_menuchoose);
- hInstanceMenu = MO_CreateMenuObject("GGAccountChooser", LPGEN("Gadu-Gadu account chooser"), 0, GGS_MENUCHOOSE);
+ hInstanceMenu = Menu_AddObject("GGAccountChooser", LPGEN("Gadu-Gadu account chooser"), 0, GGS_MENUCHOOSE);
TMO_MenuItem mi = {0};
mi.name.a = "Cancel";
mi.position = 9999999;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- CallService(MO_ADDNEWMENUITEM, (WPARAM)hInstanceMenu, (LPARAM)&mi);
+ Menu_AddItem(hInstanceMenu, &mi);
}
void gg_links_init()
@@ -128,6 +120,6 @@ void GGPROTO::links_instance_init() mi.ownerdata = this;
mi.position = g_Instances.getCount();
mi.name.t = m_tszUserName;
- hInstanceMenuItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hInstanceMenu, (LPARAM)&mi);
+ hInstanceMenuItem = Menu_AddItem(hInstanceMenu, &mi);
}
}
|