From 9b873e37cc52b7ba4d1d240d04e42b5426976da8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 13 Jun 2012 16:21:09 +0000 Subject: - fix for the Apply button behavior; - unneeded variable removed git-svn-id: http://svn.miranda-ng.org/main/trunk@395 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/ttbopt.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/TopToolBar/ttbopt.cpp') diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp index a3d0e98a67..267f05eb27 100644 --- a/plugins/TopToolBar/ttbopt.cpp +++ b/plugins/TopToolBar/ttbopt.cpp @@ -10,7 +10,6 @@ extern int nButtonsCount; extern SortData arrangedbuts[MAX_BUTTONS]; -bool OptionsOpened = false; HWND OptionshWnd = 0; struct OrderData @@ -64,7 +63,7 @@ int BuildTree(HWND hwndDlg) //call this when options opened and buttons added/removed int OptionsPageRebuild() { - if (OptionsOpened) + if (OptionshWnd) BuildTree(OptionshWnd); return 0; @@ -125,17 +124,15 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR CheckDlgButton(hwndDlg, IDC_USEFLAT, DBGetContactSettingByte(0, TTB_OPTDIR, "UseFlatButton", 1)); BuildTree(hwndDlg); - OptionsOpened = true; EnableWindow(GetDlgItem(hwndDlg, IDC_ENAME), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_EPATH), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_DELLBUTTON), FALSE); - SendMessage(hwndDlg, WM_COMMAND, 0, 0); OptionshWnd = hwndDlg; return TRUE; case WM_COMMAND: - if (HIWORD(wParam) == EN_CHANGE ) { + if (HIWORD(wParam) == EN_CHANGE && OptionshWnd) { SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; } @@ -346,7 +343,7 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ImageList_Destroy(dat->himlButtonIcons); free(dat); } - OptionsOpened = false; + OptionshWnd = NULL; return 0; case WM_LBUTTONUP: -- cgit v1.2.3