From d949a7ed17fd90bfc1ee5d85c83812b974037531 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 15 Nov 2012 21:04:26 +0000 Subject: - fix for the Online/Offline button in clist_mw - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@2320 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/src/InternalButtons.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins/TopToolBar/src/InternalButtons.cpp') diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 7fcdc1cef8..0662c540bf 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -87,10 +87,9 @@ int InitInternalButtons(WPARAM, LPARAM) CreateServiceFunction(TTBI_SOUNDSONOFF, TTBInternalSoundsOnOff); CreateServiceFunction(TTBI_MAINMENUBUTT, TTBInternalMainMenuButt); - TTBButton ttb = { 0 }; - ttb.cbSize = sizeof(ttb); - for (int i=0; i < SIZEOF(stdButtons); i++) { + TTBButton ttb = { 0 }; + ttb.cbSize = sizeof(ttb); ttb.name = stdButtons[i].name; ttb.pszService = stdButtons[i].pszService; ttb.dwFlags = TTBBF_VISIBLE | TTBBF_INTERNAL; @@ -104,6 +103,9 @@ int InitInternalButtons(WPARAM, LPARAM) } else ttb.hIconDn = NULL; + if (i == 0) + ttb.wParamUp = 1; + stdButtons[i].hButton = (HANDLE)TTBAddButton((WPARAM)&ttb, 0); } -- cgit v1.2.3