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 /plugins/ListeningTo | |
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 'plugins/ListeningTo')
-rw-r--r-- | plugins/ListeningTo/src/listeningto.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 9b62cb0633..8ca0d1aead 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -159,8 +159,8 @@ void UpdateGlobalStatusMenus() {
BOOL enabled = ListeningToEnabled(NULL, TRUE);
- int flags = (enabled ? CMIF_CHECKED : 0) + (opts.enable_sending ? 0 : CMIF_GRAYED);
- Menu_ModifyItem(proto_items[0].hMenu, NULL, INVALID_HANDLE_VALUE, flags);
+ Menu_SetChecked(proto_items[0].hMenu, enabled);
+ Menu_EnableItem(proto_items[0].hMenu, opts.enable_sending);
if (hTTB != NULL)
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM) hTTB, (LPARAM) (enabled ? TTBST_PUSHED : 0));
@@ -708,8 +708,8 @@ INT_PTR EnableListeningTo(char *proto,BOOL enabled) ProtocolInfo *info = GetProtoInfo(proto);
if (info != NULL)
{
- int flags = (enabled ? CMIF_CHECKED : 0) | (opts.enable_sending ? 0 : CMIF_GRAYED);
- Menu_ModifyItem(info->hMenu, NULL, INVALID_HANDLE_VALUE, flags);
+ Menu_EnableItem(info->hMenu, opts.enable_sending);
+ Menu_SetChecked(info->hMenu, enabled);
SetListeningInfo(proto,(opts.enable_sending && enabled) ? GetListeningInfo() : NULL);
}
|