summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/svc_homepage.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
commit30707c980d1560b358dbf2671a4d2a26a1e8173c (patch)
tree74aee5adaaac976e1398274ca64c5461a60f1feb /plugins/UserInfoEx/src/svc_homepage.cpp
parent335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff)
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/svc_homepage.cpp')
-rw-r--r--plugins/UserInfoEx/src/svc_homepage.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp
index 7364653d56..456ef87711 100644
--- a/plugins/UserInfoEx/src/svc_homepage.cpp
+++ b/plugins/UserInfoEx/src/svc_homepage.cpp
@@ -142,11 +142,9 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw
**/
static INT OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
- CLISTMENUITEM mi;
LPSTR val;
- ZeroMemory(&mi, sizeof(mi));
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS;
val = Get((HANDLE)wParam);
@@ -154,10 +152,8 @@ static INT OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
MIR_FREE(val);
}
- else
- {
- mi.flags = CMIM_FLAGS | CMIF_HIDDEN;
- }
+ else mi.flags = CMIM_FLAGS | CMIF_HIDDEN;
+
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)ghMenuItem, (LPARAM)&mi);
return 0;
}
@@ -181,9 +177,7 @@ VOID SvcHomepageRebuildMenu()
if (!ghMenuItem) {
// insert contact menuitem
- CLISTMENUITEM mi = { 0 };
- ZeroMemory(&mi, sizeof(mi));
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000010000;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
mi.pszName = "&Homepage";