summaryrefslogtreecommitdiff
path: root/plugins/Console/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-11 21:53:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-11 21:53:08 +0000
commit2b982f8a1f23ae29136f62fb3819df50c281e19f (patch)
tree2bcd75424aa5187212a888fa57f1ff63a6baa8ae /plugins/Console/src
parentc25eab397cf1ab92b1d6fa5933a6981ba0409bd7 (diff)
rest of minor TopToolbar_AddButton issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@3981 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Console/src')
-rw-r--r--plugins/Console/src/Console.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index b3096178e6..89e2190778 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -126,19 +126,15 @@ static int OnTTBLoaded(WPARAM wParam,LPARAM lParam)
Icon_Register(hInst, "Console", iconList, SIZEOF(iconList));
- TTBButton ttbb = { 0 };
- ttbb.cbSize = sizeof(ttbb);
- ttbb.hIconHandleUp = iconList[0].hIcolib;
- ttbb.hIconHandleDn = iconList[1].hIcolib;
- ttbb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
- ttbb.pszService = MS_CONSOLE_SHOW_HIDE;
- ttbb.name = LPGEN("Show/Hide Console");
- ttbb.pszTooltipDn = LPGEN("Hide Console");
- ttbb.pszTooltipUp = LPGEN("Show Console");
- hTTBButt = TopToolbar_AddButton(&ttbb);
- if (hTTBButt)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButt, (LPARAM)(state?TTBST_PUSHED:TTBST_RELEASED));
-
+ TTBButton ttb = { sizeof(ttb) };
+ ttb.hIconHandleUp = iconList[0].hIcolib;
+ ttb.hIconHandleDn = iconList[1].hIcolib;
+ ttb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
+ ttb.pszService = MS_CONSOLE_SHOW_HIDE;
+ ttb.name = LPGEN("Show/Hide Console");
+ ttb.pszTooltipDn = LPGEN("Hide Console");
+ ttb.pszTooltipUp = LPGEN("Show Console");
+ hTTBButt = TopToolbar_AddButton(&ttb);
return 0;
}