1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Windows PuTTYgen: fix mis-setting of radio buttons.

The menu options and radio buttons for key type were not consistently
setting each other when selected: in particular, selecting from the
menu did not cause the ED25519 radio button to be either set or unset
when that would have been appropriate.

Looks as if I failed to catch in code review the fact that we should
have _one_ call to each of CheckRadioButton and CheckMenuRadioItem,
and they should both have the right 'first' and 'last' parameters
This commit is contained in:
Simon Tatham 2015-05-15 13:01:33 +01:00
parent 89da2ddf56
commit 64d283702b

View File

@ -968,15 +968,12 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
state = (struct MainDlgState *) state = (struct MainDlgState *)
GetWindowLongPtr(hwnd, GWLP_USERDATA); GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (!IsDlgButtonChecked(hwnd, LOWORD(wParam))) if (!IsDlgButtonChecked(hwnd, LOWORD(wParam)))
CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA, CheckRadioButton(hwnd,
IDC_KEYSSH1, IDC_KEYSSH2ED25519,
LOWORD(wParam)); LOWORD(wParam));
CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1, IDC_KEYSSH2DSA, CheckMenuRadioItem(state->keymenu,
IDC_KEYSSH1, IDC_KEYSSH2ED25519,
LOWORD(wParam), MF_BYCOMMAND); LOWORD(wParam), MF_BYCOMMAND);
CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2ECDSA,
LOWORD(wParam));
CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1,
IDC_KEYSSH2ECDSA,
LOWORD(wParam), MF_BYCOMMAND);
} }
break; break;
case IDC_QUIT: case IDC_QUIT: