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
This commit is contained in:
anders_k 2010-01-30 18:16:25 +00:00
parent a17b600d8e
commit e2a4c90c12

View file

@ -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;