diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-25 23:34:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-25 23:34:47 +0000 |
commit | be489c4e6f4c1ab4b4d7f84e35a73e34e1b0b331 (patch) | |
tree | 233968040ec6bff10b0726de4e7a69313bb78266 /protocols/JabberG/src/jabber_menu.cpp | |
parent | c055d21f01423462fa8d468f7c33bde55e595773 (diff) |
- Menu_EnableItem & Menu_SetChecked - more suitable helpers to set flags;
- fix for checks in frame menus;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14389 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_menu.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 999ace6c06..53414f2e6c 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -904,19 +904,18 @@ void CJabberProto::EnableMenuItems(BOOL bEnable) void CJabberProto::CheckMenuItems()
{
- int flags = (m_menuItemsStatus) ? 0 : CMIF_GRAYED;
-
- Menu_ModifyItem(m_hMenuChangePassword, NULL, INVALID_HANDLE_VALUE, flags);
- Menu_ModifyItem(m_hMenuGroupchat, NULL, INVALID_HANDLE_VALUE, flags);
-
- Menu_ModifyItem(m_hMenuPrivacyLists, NULL, INVALID_HANDLE_VALUE, flags);
- Menu_ModifyItem(m_hMenuRosterControl, NULL, INVALID_HANDLE_VALUE, flags);
- Menu_ModifyItem(m_hMenuServiceDiscovery, NULL, INVALID_HANDLE_VALUE, flags);
- Menu_ModifyItem(m_hMenuSDMyTransports, NULL, INVALID_HANDLE_VALUE, flags);
- Menu_ModifyItem(m_hMenuSDTransports, NULL, INVALID_HANDLE_VALUE, flags);
- Menu_ModifyItem(m_hMenuSDConferences, NULL, INVALID_HANDLE_VALUE, flags);
-
- bool bEnabled = m_ThreadInfo && (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE);
+ bool bEnabled = (m_menuItemsStatus != 0);
+ Menu_EnableItem(m_hMenuChangePassword, bEnabled);
+ Menu_EnableItem(m_hMenuGroupchat, bEnabled);
+
+ Menu_EnableItem(m_hMenuPrivacyLists, bEnabled);
+ Menu_EnableItem(m_hMenuRosterControl, bEnabled);
+ Menu_EnableItem(m_hMenuServiceDiscovery, bEnabled);
+ Menu_EnableItem(m_hMenuSDMyTransports, bEnabled);
+ Menu_EnableItem(m_hMenuSDTransports, bEnabled);
+ Menu_EnableItem(m_hMenuSDConferences, bEnabled);
+
+ bEnabled = m_ThreadInfo && (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE);
Menu_ShowItem(m_hMenuNotes, bEnabled);
Menu_ShowItem(m_hMenuBookmarks, bEnabled);
|