From ce02a20de5427a55e7ac1947ab646002b5f782f3 Mon Sep 17 00:00:00 2001 From: Eugene Lishnevsky Date: Wed, 25 Jul 2012 16:03:07 +0000 Subject: 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 --- plugins/NewXstatusNotify/src/main.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'plugins/NewXstatusNotify/src/main.cpp') 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; } -- cgit v1.2.3