summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/ttbopt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-13 16:21:09 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-13 16:21:09 +0000
commit9b873e37cc52b7ba4d1d240d04e42b5426976da8 (patch)
tree70afd381ab2595fbd47ff6c81f532ec36aec7b51 /plugins/TopToolBar/ttbopt.cpp
parent30d2e707d653c7f31461587198dd57ff2e69af08 (diff)
- 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
Diffstat (limited to 'plugins/TopToolBar/ttbopt.cpp')
-rw-r--r--plugins/TopToolBar/ttbopt.cpp9
1 files changed, 3 insertions, 6 deletions
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: