diff options
Diffstat (limited to 'protocols')
25 files changed, 85 insertions, 107 deletions
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index d4ba6ebfea..a0c1398634 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -226,7 +226,7 @@ void CAimProto::InitMainMenus(void) }
else {
if (hMenuRoot) {
- CallService(MO_REMOVEMENUITEM, (WPARAM)hMenuRoot, 0);
+ Menu_RemoveItem(hMenuRoot);
hMenuRoot = NULL;
}
}
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 1d371c61c7..922c065db7 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -226,9 +226,10 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&miRoot);
}
else {
- if (m_hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
- m_hMenuRoot = NULL;
+ if (m_hMenuRoot) {
+ Menu_RemoveItem(m_hMenuRoot);
+ m_hMenuRoot = NULL;
+ }
}
mi.flags = CMIF_ROOTHANDLE | (this->isOnline() ? 0 : CMIF_GRAYED);
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);
}
}
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 89cb66953b..4b60263266 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -147,7 +147,7 @@ CIrcProto::~CIrcProto() Netlib_CloseHandle(hNetlibDCC); hNetlibDCC = NULL;
if (hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)hMenuRoot, 0);
+ Menu_RemoveItem(hMenuRoot);
mir_free(m_alias);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index c8a167d0d6..9f00d7f631 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -40,9 +40,10 @@ void CIrcProto::InitMainMenus(void) hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
- if (hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)hMenuRoot, 0);
- hMenuRoot = NULL;
+ if (hMenuRoot) {
+ Menu_RemoveItem(hMenuRoot);
+ hMenuRoot = NULL;
+ }
}
mi.flags = CMIF_ROOTHANDLE;
@@ -175,10 +176,10 @@ void InitContactMenus(void) void UninitContactMenus(void)
{
- CallService(MO_REMOVEMENUITEM, (WPARAM)hUMenuChanSettings, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hUMenuWhois, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hUMenuDisconnect, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hUMenuIgnore, 0);
+ Menu_RemoveItem(hUMenuChanSettings);
+ Menu_RemoveItem(hUMenuWhois);
+ Menu_RemoveItem(hUMenuDisconnect);
+ Menu_RemoveItem(hUMenuIgnore);
DestroyServiceFunction(hMenuChanSettings);
DestroyServiceFunction(hMenuWhois);
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index 94a0a3ca57..a075dc3cea 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -164,12 +164,12 @@ void g_MenuInit(void) void g_MenuUninit(void)
{
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_AUTH_REQUEST], 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_AUTH_GRANT], 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_AUTH_REVOKE], 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_ADD_TO_SERVLIST], 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_XSTATUS_DETAILS], 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_OPEN_PROFILE], 0);
+ Menu_RemoveItem(g_hContactMenuItems[ICMI_AUTH_REQUEST]);
+ Menu_RemoveItem(g_hContactMenuItems[ICMI_AUTH_GRANT]);
+ Menu_RemoveItem(g_hContactMenuItems[ICMI_AUTH_REVOKE]);
+ Menu_RemoveItem(g_hContactMenuItems[ICMI_ADD_TO_SERVLIST]);
+ Menu_RemoveItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS]);
+ Menu_RemoveItem(g_hContactMenuItems[ICMI_OPEN_PROFILE]);
}
INT_PTR CIcqProto::OpenWebProfile(WPARAM hContact, LPARAM)
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 42d1c744d5..999ace6c06 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -185,13 +185,13 @@ void g_MenuInit(void) CreateServiceFunction("Jabber/MenuChoose", JabberMenuChooseService);
- hChooserMenu = MO_CreateMenuObject("JabberAccountChooser", LPGEN("Jabber account chooser"), 0, "Jabber/MenuChoose");
+ hChooserMenu = Menu_AddObject("JabberAccountChooser", LPGEN("Jabber account chooser"), 0, "Jabber/MenuChoose");
TMO_MenuItem tmi = { sizeof(tmi) };
tmi.name.a = "Cancel";
tmi.position = 9999999;
tmi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- CallService(MO_ADDNEWMENUITEM, (WPARAM)hChooserMenu, (LPARAM)&tmi);
+ Menu_AddItem(hChooserMenu, &tmi);
//////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
@@ -330,14 +330,14 @@ void g_MenuUninit(void) {
DestroyHookableEvent(hStatusMenuInit);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuRequestAuth, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuGrantAuth, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuRevokeAuth, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuConvert, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuRosterAdd, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuLogin, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuRefresh, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuAddBookmark, 0);
+ Menu_RemoveItem(g_hMenuRequestAuth);
+ Menu_RemoveItem(g_hMenuGrantAuth);
+ Menu_RemoveItem(g_hMenuRevokeAuth);
+ Menu_RemoveItem(g_hMenuConvert);
+ Menu_RemoveItem(g_hMenuRosterAdd);
+ Menu_RemoveItem(g_hMenuLogin);
+ Menu_RemoveItem(g_hMenuRefresh);
+ Menu_RemoveItem(g_hMenuAddBookmark);
WindowList_Destroy(hDialogsList);
}
@@ -604,7 +604,7 @@ void CJabberProto::MenuInit() }
else {
if (m_hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
+ Menu_RemoveItem(m_hMenuRoot);
m_hMenuRoot = NULL;
}
@@ -800,7 +800,7 @@ void CJabberProto::GlobalMenuInit() tmi.ownerdata = this;
tmi.position = iChooserMenuPos++;
tmi.name.t = m_tszUserName;
- m_hChooseMenuItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hChooserMenu, (LPARAM)&tmi);
+ m_hChooseMenuItem = Menu_AddItem(hChooserMenu, &tmi);
//////////////////////////////////////////////////////////////////////////////////////
// Hotkeys
@@ -885,14 +885,14 @@ void CJabberProto::GlobalMenuUninit() {
if (m_phMenuResourceItems) {
for (int i = 0; i < m_nMenuResourceItems; i++)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_phMenuResourceItems[i], 0);
+ Menu_RemoveItem(m_phMenuResourceItems[i]);
mir_free(m_phMenuResourceItems);
m_phMenuResourceItems = NULL;
}
m_nMenuResourceItems = 0;
if (m_hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
+ Menu_RemoveItem(m_hMenuRoot);
m_hMenuRoot = NULL;
}
@@ -1141,20 +1141,17 @@ CJabberProto* JabberChooseInstance(bool bIsLink) }
if (nItems > 1) {
- ListParam param = { 0 };
- param.MenuObjectHandle = hChooserMenu;
- HMENU hMenu = CreatePopupMenu();
- CallService(MO_BUILDMENU, (WPARAM)hMenu, (LPARAM)¶m);
-
POINT pt;
GetCursorPos(&pt);
+ HMENU hMenu = CreatePopupMenu();
+ Menu_Build(hMenu, hChooserMenu);
int res = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
DestroyMenu(hMenu);
if (res) {
CJabberProto* pro = NULL;
- CallService(MO_PROCESSCOMMANDBYMENUIDENT, res, (LPARAM)&pro);
+ Menu_ProcessCommandById(res, (LPARAM)&pro);
return pro;
}
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index eb606a70e4..9bfeb7e63e 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2115,7 +2115,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) {
if (bDeleteOld)
for (int i = 0; i < m_hPrivacyMenuItems.getCount(); i++)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hPrivacyMenuItems[i], 0);
+ Menu_RemoveItem((HGENMENU)m_hPrivacyMenuItems[i]);
m_hPrivacyMenuItems.destroy();
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 52c56bebb0..33dd616058 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -335,7 +335,7 @@ void CMsnProto::MsnInitMainMenu(void) void CMsnProto::MsnRemoveMainMenus(void)
{
if (mainMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)mainMenuRoot, 0);
+ Menu_RemoveItem(mainMenuRoot);
}
void CMsnProto::MSN_EnableMenuItems(bool bEnable)
@@ -444,14 +444,14 @@ void MSN_InitContactMenu(void) void MSN_RemoveContactMenus(void)
{
- CallService(MO_REMOVEMENUITEM, (WPARAM)hBlockMenuItem, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hLiveSpaceMenuItem, 0);
+ Menu_RemoveItem(hBlockMenuItem);
+ Menu_RemoveItem(hLiveSpaceMenuItem);
#ifdef OBSOLETE
- CallService(MO_REMOVEMENUITEM, (WPARAM)hNetmeetingMenuItem, 0);
+ Menu_RemoveItem(hNetmeetingMenuItem);
DestroyServiceFunction(hNetMeeting);
#endif
- CallService(MO_REMOVEMENUITEM, (WPARAM)hChatInviteMenuItem, 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hOpenInboxMenuItem, 0);
+ Menu_RemoveItem(hChatInviteMenuItem);
+ Menu_RemoveItem(hOpenInboxMenuItem);
DestroyServiceFunction(hBlockCom);
DestroyServiceFunction(hSendHotMail);
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 2aaab309e0..27fbb51cf4 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -65,8 +65,6 @@ CSametimeProto::~CSametimeProto() {
debugLog(_T("CSametimeProto::~CSametimeProto() start"));
- DeinitSessionMenu();
-
DeinitAwayMsg();
UnregisterPopups();
diff --git a/protocols/Sametime/src/sametime_proto.h b/protocols/Sametime/src/sametime_proto.h index 4f3a249cf3..35082ecd23 100644 --- a/protocols/Sametime/src/sametime_proto.h +++ b/protocols/Sametime/src/sametime_proto.h @@ -111,7 +111,6 @@ struct CSametimeProto : public PROTO<CSametimeProto> void SessionStarted();
void SessionStopping();
void InitSessionMenu();
- void DeinitSessionMenu();
int LogIn(int status, HANDLE hNetlibUser);
int LogOut();
int SetSessionStatus(int status);
@@ -171,7 +170,6 @@ struct CSametimeProto : public PROTO<CSametimeProto> // sametime_session.cpp
bool first_online; // set our status after the first online status comes from the server
- HANDLE hSessionAnnounceMenuItem;
int login_status;
bool idle_status;
int idle_timerid;
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 551ab48a57..cea3d51431 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -571,11 +571,5 @@ void CSametimeProto::InitSessionMenu() mi.pszService = service;
mi.icolibItem = GetIconHandle(IDI_ICON_ANNOUNCE);
mi.pszContactOwner = m_szModuleName;
- hSessionAnnounceMenuItem = Menu_AddContactMenuItem(&mi);
-}
-
-void CSametimeProto::DeinitSessionMenu()
-{
- debugLog(_T("CSametimeProto::DeinitSessionMenu()"));
- CallService(MO_REMOVEMENUITEM, (WPARAM)hSessionAnnounceMenuItem, 0);
+ Menu_AddContactMenuItem(&mi);
}
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index 2f620ff0ff..8d24cb25f7 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -58,7 +58,7 @@ void CSkypeProto::InitMenus() {
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSkypeProto::PrebuildContactMenu);
- //hChooserMenu = MO_CreateMenuObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
+ //hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
@@ -129,7 +129,7 @@ int CSkypeProto::OnInitStatusMenu() /*else
{
if (m_hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
+ Menu_RemoveItem(m_hMenuRoot, 0);
m_hMenuRoot = NULL;
}*/
mi.hParentMenu = hStatusMunuRoot;
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index d997b29fc2..6b76a93220 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -104,8 +104,7 @@ void CSteamProto::OnInitStatusMenu() mi.pszService = text;
HGENMENU hSteamRoot = Menu_GetProtocolRoot(m_szModuleName);
- if (!hSteamRoot)
- {
+ if (!hSteamRoot) {
mi.ptszName = m_tszUserName;
mi.position = -1999901006;
mi.hParentMenu = HGENMENU_ROOT;
@@ -113,10 +112,8 @@ void CSteamProto::OnInitStatusMenu() //mi.icolibItem = NULL;
hSteamRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
- else
- {
- if (m_hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
+ else {
+ Menu_RemoveItem(m_hMenuRoot);
m_hMenuRoot = NULL;
}
@@ -134,7 +131,7 @@ void CSteamProto::OnInitStatusMenu() void CSteamProto::InitMenus()
{
- hChooserMenu = MO_CreateMenuObject("SteamAccountChooser", LPGEN("Steam menu chooser"), 0, "Steam/MenuChoose");
+ hChooserMenu = Menu_AddObject("SteamAccountChooser", LPGEN("Steam menu chooser"), 0, "Steam/MenuChoose");
//////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
@@ -170,8 +167,8 @@ void CSteamProto::InitMenus() void CSteamProto::UninitMenus()
{
- CallService(MO_REMOVEMENUITEM, (WPARAM)contactMenuItems[CMI_AUTH_REQUEST], 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)contactMenuItems[CMI_BLOCK], 0);
- CallService(MO_REMOVEMENUITEM, (WPARAM)contactMenuItems[CMI_JOIN_GAME], 0);
+ Menu_RemoveItem(contactMenuItems[CMI_AUTH_REQUEST]);
+ Menu_RemoveItem(contactMenuItems[CMI_BLOCK]);
+ Menu_RemoveItem(contactMenuItems[CMI_JOIN_GAME]);
}
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp index 7657f80bea..34f00da9ec 100644 --- a/protocols/Tox/src/tox_menus.cpp +++ b/protocols/Tox/src/tox_menus.cpp @@ -39,7 +39,7 @@ void CToxProto::InitMenus() {
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CToxProto::PrebuildContactMenu);
- //hChooserMenu = MO_CreateMenuObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
+ //hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
@@ -96,7 +96,7 @@ int CToxProto::OnInitStatusMenu() /*else
{
if (m_hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
+ Menu_RemoveItem(m_hMenuRoot, 0);
m_hMenuRoot = NULL;
}*/
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 2ffdc00f8b..5c97648203 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -107,7 +107,7 @@ void InitContactMenus() void UninitContactMenus()
{
for (size_t i = 0; i < _countof(g_hMenuItems); i++)
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hMenuItems[i], 0);
+ Menu_RemoveItem(g_hMenuItems[i]);
UnhookEvent(g_hMenuEvts[0]);
for (size_t i = 1; i < _countof(g_hMenuEvts); i++)
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 23ab2d7fd4..873badb076 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -375,13 +375,13 @@ void CVkProto::UnInitMenus() {
debugLogA("CVkProto::UnInitMenus");
for (int i = 0; i < PMI_COUNT; i++)
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hProtoMenuItems[i], 0);
+ Menu_RemoveItem(g_hProtoMenuItems[i]);
for (int i = 0; i < CHMI_COUNT; i++)
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactHistoryMenuItems[i], 0);
+ Menu_RemoveItem(g_hContactHistoryMenuItems[i]);
for (int i = 0; i < CMI_COUNT; i++)
- CallService(MO_REMOVEMENUITEM, (WPARAM)g_hContactMenuItems[i], 0);
+ Menu_RemoveItem(g_hContactMenuItems[i]);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index 5210749b76..9ced4f036d 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -64,9 +64,10 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
- if (m_hMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
- m_hMenuRoot = NULL;
+ if (m_hMenuRoot) {
+ Menu_RemoveItem(m_hMenuRoot);
+ m_hMenuRoot = NULL;
+ }
}
mi.flags = CMIF_ROOTHANDLE | (isOnline() ? 0 : CMIF_GRAYED);
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 02029be589..7d10b769c3 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -461,7 +461,7 @@ void Xfire_game::remoteMenuitem() {
if (menuhandle != NULL)
{
- CallService(MO_REMOVEMENUITEM, (WPARAM)menuhandle, 0);
+ Menu_RemoveItem(menuhandle);
menuhandle = NULL;
}
}
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 2bf698f078..a60e870548 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -254,7 +254,7 @@ void Xfire_gamelist::createDummyMenuItem() //entfernt dummymenueintrag
void Xfire_gamelist::removeDummyMenuItem()
{
- CallService(MO_REMOVEMENUITEM, (WPARAM)dummymenuitem, 0);
+ Menu_RemoveItem(dummymenuitem);
}
//säubert die datenbank spiel einträge udn trägt custom spiele vorher nach
diff --git a/protocols/Xfire/src/Xfire_gamelist.h b/protocols/Xfire/src/Xfire_gamelist.h index e6e86d93ee..83f087cd96 100644 --- a/protocols/Xfire/src/Xfire_gamelist.h +++ b/protocols/Xfire/src/Xfire_gamelist.h @@ -41,7 +41,7 @@ using namespace std; class Xfire_gamelist : public Xfire_base {
private:
vector<Xfire_game*> gamelist;
- HANDLE dummymenuitem;
+ HGENMENU dummymenuitem;
unsigned int nextgameid;
BOOL ingame;
mir_cs gamlistMutex;
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 658824f400..2ffd9f32d8 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -383,7 +383,7 @@ void CYahooProto::MenuMainInit(void) }
else {
if (mainMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)mainMenuRoot, 0);
+ Menu_RemoveItem(mainMenuRoot);
mainMenuRoot = NULL;
}
@@ -477,9 +477,9 @@ void CYahooProto::MenuContactInit(void) void CYahooProto::MenuUninit(void)
{
if (mainMenuRoot)
- CallService(MO_REMOVEMENUITEM, (WPARAM)mainMenuRoot, 0);
+ Menu_RemoveItem(mainMenuRoot);
- CallService(MO_REMOVEMENUITEM, (WPARAM)hShowProfileMenuItem, 0);
+ Menu_RemoveItem(hShowProfileMenuItem);
}
int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
|