From b665a90f50f09435aef5bc3b5b9da710e4558690 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 16:54:27 +0000 Subject: various menu items quirks, simplifications & optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@4319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Gadu-Gadu/src/links.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'protocols/Gadu-Gadu/src/links.cpp') diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index 7cc0c37215..0da199062d 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -74,12 +74,9 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) mi.flags |= CMIM_ICON; mi.hIcon = LoadSkinnedProtoIcon(gg->m_szModuleName, gg->m_iStatus); } - else { - mi.flags |= CMIF_HIDDEN; - mi.hIcon = NULL; - } + else mi.flags |= CMIF_HIDDEN; - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)gginst->hInstanceMenuItem, (LPARAM)&mi); + Menu_ModifyItem(gginst->hInstanceMenuItem, &mi); if (mi.hIcon) Skin_ReleaseIcon(mi.hIcon); } @@ -156,14 +153,12 @@ void gg_links_destroy() void GGPROTO::links_instance_init() { - if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) - { - TMO_MenuItem tmi = {0}; - tmi.cbSize = sizeof(tmi); + if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) { + TMO_MenuItem tmi = { sizeof(tmi) }; tmi.flags = CMIF_TCHAR; tmi.ownerdata = this; tmi.position = list_count(g_Instances); tmi.ptszName = m_tszUserName; - hInstanceMenuItem = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hInstanceMenu, (LPARAM)&tmi); + hInstanceMenuItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hInstanceMenu, (LPARAM)&tmi); } } -- cgit v1.2.3