summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/links.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-05 16:54:27 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-05 16:54:27 +0000
commitb665a90f50f09435aef5bc3b5b9da710e4558690 (patch)
tree3053606dcddc1b15f73e7af1fb2507afbf20f052 /protocols/Gadu-Gadu/src/links.cpp
parent6c01981a8452577f3751298c7cdbe59b3ae81d51 (diff)
various menu items quirks, simplifications & optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@4319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/links.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/links.cpp15
1 files changed, 5 insertions, 10 deletions
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);
}
}