diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-24 14:06:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-24 14:06:12 +0000 |
commit | 943543342edbc6e66630810ec4486e1a579abc2f (patch) | |
tree | c483dd235408e92b473de3a44c7bb64915397f69 | |
parent | 862116c0d40a7304c458f68c4c725e8a95960588 (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
-rw-r--r-- | plugins/NewAwaySysMod/src/AwaySys.cpp | 7 |
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;
|