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:
parent
a17b600d8e
commit
e2a4c90c12
1 changed files with 6 additions and 0 deletions
|
@ -382,11 +382,17 @@ BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
BOOL bEnable = IsDlgButtonChecked(hwndDlg, IDC_CHECK) != BST_CHECKED;
|
BOOL bEnable = IsDlgButtonChecked(hwndDlg, IDC_CHECK) != BST_CHECKED;
|
||||||
EnableWindow(hwDirList, bEnable);
|
EnableWindow(hwDirList, bEnable);
|
||||||
EnableWindow(hwLocation, 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)
|
else if (LOWORD(wParam) == IDC_LOCATION && HIWORD(wParam) == EN_CHANGE)
|
||||||
{
|
{
|
||||||
|
ValidateLocation:
|
||||||
GetWindowText(hwLocation, buf, MAX_PATH);
|
GetWindowText(hwLocation, buf, MAX_PATH);
|
||||||
validate_filename(buf);
|
validate_filename(buf);
|
||||||
|
SetOkBtn:
|
||||||
EnableWindow(GetDlgItem(hwParent, IDOK), *buf != '\0');
|
EnableWindow(GetDlgItem(hwParent, IDOK), *buf != '\0');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue