diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
commit | 30707c980d1560b358dbf2671a4d2a26a1e8173c (patch) | |
tree | 74aee5adaaac976e1398274ca64c5461a60f1feb /protocols/Gadu-Gadu/src/links.cpp | |
parent | 335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff) |
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/links.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/links.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index 50a8a6ac54..7cc0c37215 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -44,7 +44,6 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) list_t l = g_Instances;
GGPROTO *gg = NULL;
uin_t uin;
- CLISTMENUITEM mi = {0};
int items = 0;
if (list_count(l) == 0)
@@ -64,20 +63,18 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) if (!uin)
return 1;
- for (mi.cbSize = sizeof(mi); l; l = l->next)
- {
+ for (; l; l = l->next) {
GGPROTO *gginst = (GGPROTO*)l->data;
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS;
- if (gginst->m_iStatus > ID_STATUS_OFFLINE)
- {
+ if (gginst->m_iStatus > ID_STATUS_OFFLINE) {
++items;
gg = (GGPROTO*)l->data;
mi.flags |= CMIM_ICON;
mi.hIcon = LoadSkinnedProtoIcon(gg->m_szModuleName, gg->m_iStatus);
}
- else
- {
+ else {
mi.flags |= CMIF_HIDDEN;
mi.hIcon = NULL;
}
@@ -87,8 +84,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) Skin_ReleaseIcon(mi.hIcon);
}
- if (items > 1)
- {
+ if (items > 1) {
ListParam param = {0};
HMENU hMenu = CreatePopupMenu();
POINT pt;
|