diff options
-rw-r--r-- | plugins/TopToolBar/common.h | 2 | ||||
-rw-r--r-- | plugins/TopToolBar/toolbar.cpp | 2 | ||||
-rw-r--r-- | plugins/TopToolBar/ttbopt.cpp | 9 |
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:
|