summaryrefslogtreecommitdiff
path: root/plugins/ListeningTo
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 /plugins/ListeningTo
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 'plugins/ListeningTo')
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 95ccdbc1d3..f8bcb8f8b6 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -159,11 +159,8 @@ void UpdateGlobalStatusMenus()
{
BOOL enabled = ListeningToEnabled(NULL, TRUE);
- CLISTMENUITEM clmi = { 0 };
- clmi.flags = CMIM_FLAGS
- | (enabled ? CMIF_CHECKED : 0)
- | (opts.enable_sending ? 0 : CMIF_GRAYED);
- Menu_ModifyItem(proto_items[0].hMenu, &clmi);
+ int flags = (enabled ? CMIF_CHECKED : 0) + (opts.enable_sending ? 0 : CMIF_GRAYED);
+ Menu_ModifyItem(proto_items[0].hMenu, NULL, INVALID_HANDLE_VALUE, flags);
if (hTTB != NULL)
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM) hTTB, (LPARAM) (enabled ? TTBST_PUSHED : 0));
@@ -244,11 +241,7 @@ int AccListChanged(WPARAM wParam, LPARAM lParam)
TCHAR text[512];
mir_sntprintf(text, TranslateT("Send to %s"), info->account);
-
- CLISTMENUITEM clmi = { 0 };
- clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- clmi.ptszName = text;
- Menu_ModifyItem(info->hMenu, &clmi);
+ Menu_ModifyItem(info->hMenu, text);
}
else if (wParam == PRAC_REMOVED || (wParam == PRAC_CHECKED && !proto->bIsEnabled))
{
@@ -715,11 +708,8 @@ INT_PTR EnableListeningTo(char *proto,BOOL enabled)
ProtocolInfo *info = GetProtoInfo(proto);
if (info != NULL)
{
- CLISTMENUITEM clmi = { 0 };
- clmi.flags = CMIM_FLAGS
- | (enabled ? CMIF_CHECKED : 0)
- | (opts.enable_sending ? 0 : CMIF_GRAYED);
- Menu_ModifyItem(info->hMenu, &clmi);
+ int flags = (enabled ? CMIF_CHECKED : 0) | (opts.enable_sending ? 0 : CMIF_GRAYED);
+ Menu_ModifyItem(info->hMenu, NULL, INVALID_HANDLE_VALUE, flags);
SetListeningInfo(proto,(opts.enable_sending && enabled) ? GetListeningInfo() : NULL);
}