summaryrefslogtreecommitdiff
path: root/plugins
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
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')
-rw-r--r--plugins/TopToolBar/common.h2
-rw-r--r--plugins/TopToolBar/toolbar.cpp2
-rw-r--r--plugins/TopToolBar/ttbopt.cpp9
3 files changed, 4 insertions, 9 deletions
diff --git a/plugins/TopToolBar/common.h b/plugins/TopToolBar/common.h
index 93c219e200..52658e5b9a 100644
--- a/plugins/TopToolBar/common.h
+++ b/plugins/TopToolBar/common.h
@@ -84,7 +84,7 @@ struct SortData
//#define BUTTHEIGHT 16
#define SEPWIDTH 3
-extern bool OptionsOpened, StopArrange;
+extern bool StopArrange;
extern HWND OptionshWnd;
extern HANDLE hHookTTBModuleLoaded;
extern HINSTANCE hInst;
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index 6e48408bd6..93a9f5ee17 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -909,8 +909,6 @@ int OnModulesLoad(WPARAM wParam, LPARAM lParam)
hwndContactList = (HWND)CallService(MS_CLUI_GETHWND, 0, 0);
- OptionsOpened = false;
-
hFrameTopWindow = addTopToolBarWindow(hwndContactList);
LoadInternalButtons(( HWND )CallService(MS_CLUI_GETHWNDTREE, 0, 0));
SaveAllButtonsOptions();
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: