From cd441faefd073cfd368d815f4237d7b4996a1063 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 24 Jul 2012 09:21:56 +0000 Subject: fix for the apply button git-svn-id: http://svn.miranda-ng.org/main/trunk@1158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/DbEditorPP/src/options.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'plugins/DbEditorPP/src/options.cpp') diff --git a/plugins/DbEditorPP/src/options.cpp b/plugins/DbEditorPP/src/options.cpp index 0630fa353c..f7cfe921b2 100644 --- a/plugins/DbEditorPP/src/options.cpp +++ b/plugins/DbEditorPP/src/options.cpp @@ -2,10 +2,12 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { + static bool bInitDone = true; switch(msg) { case WM_INITDIALOG: { + bInitDone = false; DBVARIANT dbv; CheckDlgButton(hwnd,IDC_EXPANDSETTINGS,DBGetContactSettingByte(NULL,modname,"ExpandSettingsOnOpen",0)); CheckDlgButton(hwnd,IDC_RESTORESETTINGS,DBGetContactSettingByte(NULL,modname,"RestoreOnOpen",1)); @@ -19,6 +21,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SetDlgItemInt(hwnd,IDC_POPUPTIMEOUT,DBGetContactSettingWord(NULL,modname,"PopupDelay",4),0); SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_SETCOLOUR, 0, (LPARAM)DBGetContactSettingDword(NULL,modname,"PopupColour",RGB(255,0,0))); TranslateDialogDefault(hwnd); + bInitDone = true; } return TRUE; case WM_COMMAND: @@ -27,14 +30,17 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case IDC_RESTORESETTINGS: case IDC_EXPANDSETTINGS: case IDC_USEKNOWNMODS: - case IDC_MODULES: case IDC_MENU: case IDC_POPUPS: case IDC_WARNONDEL: case IDC_COLOUR: - case IDC_POPUPTIMEOUT: SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); - break; + break; + case IDC_POPUPTIMEOUT: + case IDC_MODULES: + if(bInitDone && (HIWORD(wParam) == EN_CHANGE)) + SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); + break; } break; case WM_NOTIFY: -- cgit v1.2.3