From e2a4c90c1288db9a29c5eded2a4967a54ecc9850 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sat, 30 Jan 2010 18:16:25 +0000 Subject: [PATCH] Fixed bug #2939230 - Enable NextBtn with skip create checked and empty name git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6024 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/StartMenu/StartMenu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Contrib/StartMenu/StartMenu.c b/Contrib/StartMenu/StartMenu.c index 6722c07e..11290adf 100644 --- a/Contrib/StartMenu/StartMenu.c +++ b/Contrib/StartMenu/StartMenu.c @@ -382,11 +382,17 @@ BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) BOOL bEnable = IsDlgButtonChecked(hwndDlg, IDC_CHECK) != BST_CHECKED; EnableWindow(hwDirList, bEnable); EnableWindow(hwLocation, bEnable); + if (bEnable) + goto ValidateLocation; + *buf = '!'; //This only needs to be != 0, actual value does not matter + goto SetOkBtn; } else if (LOWORD(wParam) == IDC_LOCATION && HIWORD(wParam) == EN_CHANGE) { + ValidateLocation: GetWindowText(hwLocation, buf, MAX_PATH); validate_filename(buf); + SetOkBtn: EnableWindow(GetDlgItem(hwParent, IDOK), *buf != '\0'); } break;