summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
commit88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch)
treeb3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /protocols/WhatsApp
parent9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff)
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/proto.h3
-rw-r--r--protocols/WhatsApp/src/theme.cpp8
2 files changed, 4 insertions, 7 deletions
diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h
index 2c7cf2e97e..cc6d787b7f 100644
--- a/protocols/WhatsApp/src/proto.h
+++ b/protocols/WhatsApp/src/proto.h
@@ -141,8 +141,7 @@ private:
// Private data //////////////////////////////////////////////////////////////////////
- HGENMENU m_hMenuRoot;
- HANDLE m_hMenuCreateGroup;
+ HGENMENU m_hMenuRoot, m_hMenuCreateGroup;
HANDLE update_loop_lock_;
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp
index 913d7b5aab..ac5f6ff3ff 100644
--- a/protocols/WhatsApp/src/theme.cpp
+++ b/protocols/WhatsApp/src/theme.cpp
@@ -84,9 +84,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam)
void WhatsAppProto::ToggleStatusMenuItems(BOOL bEnable)
{
- CLISTMENUITEM clmi = { 0 };
- clmi.flags = CMIM_FLAGS | ((bEnable) ? 0 : CMIF_GRAYED);
-
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)m_hMenuRoot, (LPARAM)&clmi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)m_hMenuCreateGroup, (LPARAM)&clmi);
+ int flags = (bEnable) ? 0 : CMIF_GRAYED;
+ Menu_ModifyItem(m_hMenuRoot, NULL, INVALID_HANDLE_VALUE, flags);
+ Menu_ModifyItem(m_hMenuCreateGroup, NULL, INVALID_HANDLE_VALUE, flags);
}