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:
parent
89da2ddf56
commit
64d283702b
@ -968,14 +968,11 @@ 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,
|
||||||
LOWORD(wParam), MF_BYCOMMAND);
|
IDC_KEYSSH1, IDC_KEYSSH2ED25519,
|
||||||
CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2ECDSA,
|
|
||||||
LOWORD(wParam));
|
|
||||||
CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1,
|
|
||||||
IDC_KEYSSH2ECDSA,
|
|
||||||
LOWORD(wParam), MF_BYCOMMAND);
|
LOWORD(wParam), MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user