diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-18 09:09:00 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-18 09:09:00 +0000 |
commit | 4f8f5427687792492ee49e06cafb9bd50cfc53d4 (patch) | |
tree | a0f6f8691a60c2f462ee481c19f49035fe55d3c3 /plugins/Console/src/Console.cpp | |
parent | f1681003035365b57acbc48327efa10b5e4186ac (diff) |
better way (thx Awkward)
git-svn-id: http://svn.miranda-ng.org/main/trunk@1013 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Console/src/Console.cpp')
-rw-r--r-- | plugins/Console/src/Console.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 8db517cd42..05c0c35801 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -114,18 +114,6 @@ static int Openfile(TCHAR *outputFile, int selection); static HANDLE hTTBButt = 0;
-static INT_PTR HideConsoleButt(WPARAM wParam,LPARAM lParam)
-{
- ShowConsole(0);
- return 0;
-}
-
-static INT_PTR ShowConsoleButt(WPARAM wParam,LPARAM lParam)
-{
- ShowConsole(1);
- return 0;
-}
-
static int OnTTBLoaded(WPARAM wParam,LPARAM lParam)
{
if ( !IsWindow(hwndConsole))
@@ -133,9 +121,6 @@ static int OnTTBLoaded(WPARAM wParam,LPARAM lParam) int state = IsWindowVisible(hwndConsole);
- CreateServiceFunction("Console/Hide", HideConsoleButt);
- CreateServiceFunction("Console/Show", ShowConsoleButt);
-
TTBButton ttbb = {0};
ttbb.cbSize = sizeof(ttbb);
@@ -158,7 +143,7 @@ static int OnTTBLoaded(WPARAM wParam,LPARAM lParam) ttbb.hIconHandleDn = Skin_AddIcon(&sid);
ttbb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
- ttbb.pszService = (IsWindowVisible(hwndConsole)) ? "Console/Hide" : "Console/Show";
+ ttbb.pszService = MS_CONSOLE_SHOW_HIDE;
ttbb.name = LPGEN("Show/Hide Console");
ttbb.pszTooltipDn = LPGEN("Hide Console");
ttbb.pszTooltipUp = LPGEN("Show Console");
|