summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/theme.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 /protocols/FacebookRM/src/theme.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 'protocols/FacebookRM/src/theme.cpp')
-rw-r--r--protocols/FacebookRM/src/theme.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index 5d7c002398..021e8a6fcc 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -200,8 +200,7 @@ void UninitContactMenus()
void EnableMenuItem(HANDLE hMenuItem, bool enable)
{
- CLISTMENUITEM clmi = {0};
- clmi.cbSize = sizeof(CLISTMENUITEM);
+ CLISTMENUITEM clmi = { sizeof(clmi) };
clmi.flags = CMIM_FLAGS;
if (!enable)
clmi.flags |= CMIF_HIDDEN;
@@ -236,13 +235,11 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam)
strcpy(text,m_szModuleName);
char *tDest = text+strlen(text);
- HGENMENU hRoot;
CLISTMENUITEM mi = {sizeof(mi)};
mi.pszService = text;
- hRoot = MO_GetProtoRootMenu(m_szModuleName);
- if (hRoot == NULL)
- {
+ HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
+ if (hRoot == NULL) {
mi.popupPosition = 500085000;
mi.hParentMenu = HGENMENU_ROOT;
mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | ( this->isOnline() ? 0 : CMIF_GRAYED );
@@ -311,8 +308,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam)
void FacebookProto::ToggleStatusMenuItems( BOOL bEnable )
{
- CLISTMENUITEM clmi = { 0 };
- clmi.cbSize = sizeof( CLISTMENUITEM );
+ CLISTMENUITEM clmi = {sizeof(clmi)};
clmi.flags = CMIM_FLAGS | (( bEnable ) ? 0 : CMIF_GRAYED);
CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )m_hMenuRoot, ( LPARAM )&clmi );