summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-24 14:06:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-24 14:06:12 +0000
commit943543342edbc6e66630810ec4486e1a579abc2f (patch)
treec483dd235408e92b473de3a44c7bb64915397f69 /plugins/NewAwaySysMod
parent862116c0d40a7304c458f68c4c725e8a95960588 (diff)
toolbar button to be synced with a main menu item
git-svn-id: http://svn.miranda-ng.org/main/trunk@8256 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewAwaySysMod')
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index d4ffdca3f1..d9bca61bb8 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -411,9 +411,11 @@ INT_PTR ToggleSendOnEvent(WPARAM hContact, LPARAM)
CContactSettings(g_ProtoStates[hContact ? GetContactProto(hContact) : NULL].Status, hContact).Autoreply.Toggle();
if (hContact == NULL) {
+ int SendOnEvent = CContactSettings(g_ProtoStates[(LPSTR)NULL].Status).Autoreply;
+
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
- if (CContactSettings(g_ProtoStates[(LPSTR)NULL].Status).Autoreply) {
+ if (SendOnEvent) {
mi.ptszName = ENABLE_SOE_COMMAND;
mi.icolibItem = iconList[1].hIcolib;
}
@@ -422,6 +424,9 @@ INT_PTR ToggleSendOnEvent(WPARAM hContact, LPARAM)
mi.icolibItem = iconList[0].hIcolib;
}
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hToggleSOEMenuItem, (LPARAM)&mi);
+
+ if (g_hTopToolbarbutton)
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)g_hTopToolbarbutton, SendOnEvent ? TTBST_PUSHED : TTBST_RELEASED);
}
return 0;