instead of forwarding the X button to the Next button when the Cancel button is disabled on the last page, simply disable the X button when the Cancel button is disabled (part of bug #1267491)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5067 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
bebb041789
commit
bcf3899e68
1 changed files with 5 additions and 8 deletions
|
@ -543,6 +543,11 @@ nextPage:
|
|||
EnableNext(pflags & PF_NEXT_ENABLE);
|
||||
EnableWindow(m_hwndCancel, pflags & PF_CANCEL_ENABLE);
|
||||
|
||||
if (pflags & PF_CANCEL_ENABLE)
|
||||
EnableMenuItem(GetSystemMenu(hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
|
||||
else
|
||||
EnableMenuItem(GetSystemMenu(hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
|
||||
|
||||
SendMessage(hwndtmp, BM_SETSTYLE, BS_PUSHBUTTON, TRUE);
|
||||
|
||||
if (g_exec_flags.abort)
|
||||
|
@ -636,14 +641,6 @@ skipPage:
|
|||
SetWindowLong(hwndDlg, DWL_MSGRESULT, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
if (uMsg == WM_CLOSE && m_page == g_blocks[NB_PAGES].num - 1)
|
||||
{
|
||||
if (!IsWindowEnabled(m_hwndCancel))
|
||||
{
|
||||
uMsg = WM_COMMAND;
|
||||
wParam = IDOK;
|
||||
}
|
||||
}
|
||||
if (uMsg == WM_COMMAND)
|
||||
{
|
||||
int id = LOWORD(wParam);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue