diff options
author | Eugene Lishnevsky <elishnevsky@gmail.com> | 2012-07-25 16:03:07 +0000 |
---|---|---|
committer | Eugene Lishnevsky <elishnevsky@gmail.com> | 2012-07-25 16:03:07 +0000 |
commit | ce02a20de5427a55e7ac1947ab646002b5f782f3 (patch) | |
tree | f0be0e20c78ab6a89fb85d4e9523f73ae945bea9 /plugins/NewXstatusNotify | |
parent | 3b783aa74fcddb928bcbe156699c698ff0bca984 (diff) |
Fixed status notification toggle button's pushed/released state.
git-svn-id: http://svn.miranda-ng.org/main/trunk@1180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 82370f15f5..076b49966f 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1233,7 +1233,7 @@ INT_PTR EnableDisableMenuCommand(WPARAM wParam, LPARAM lParam) }
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hEnableDisableMenu, (LPARAM)&mi);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton, opt.TempDisabled ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton, opt.TempDisabled ? TTBST_RELEASED : TTBST_PUSHED);
return 0;
}
@@ -1303,13 +1303,17 @@ int InitTopToolbar(WPARAM, LPARAM) TTBButton tbb = {0};
tbb.cbSize = sizeof(TTBButton);
tbb.pszService = MS_STATUSCHANGE_MENUCOMMAND;
+ tbb.lParamUp = 1;
+ tbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ASPUSHBUTTON;
+ if (!opt.TempDisabled)
+ tbb.dwFlags |= TTBBF_PUSHED;
tbb.name = LPGEN("Toggle status notification");
- tbb.pszTooltipUp = LPGEN("Status notification enabled");
- tbb.pszTooltipDn = LPGEN("Status notification disabled");
- tbb.hIconHandleUp = GetIconHandle(ICO_NOTIFICATION_ON);
- tbb.hIconHandleDn = GetIconHandle(ICO_NOTIFICATION_OFF);
- tbb.dwFlags = (opt.TempDisabled ? TTBBF_PUSHED : 0);
+ tbb.hIconHandleUp = GetIconHandle(ICO_NOTIFICATION_OFF);
+ tbb.hIconHandleDn = GetIconHandle(ICO_NOTIFICATION_ON);
+ tbb.pszTooltipUp = LPGEN("Enable status notification");
+ tbb.pszTooltipDn = LPGEN("Disable status notification");
hToolbarButton = TopToolbar_AddButton(&tbb);
+
return 0;
}
|