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

winpgnt: remove Help button when help unavailable.

As we do in other similar situations. (The resulting passphrase dialog
is annoyingly unsymmetric, but probably less annoying than a Help
button which does nothing, and the situation shouldn't arise with our
standard builds.)
This commit is contained in:
Jacob Nevins 2021-04-22 21:52:19 +01:00
parent f5a962fb34
commit b6d98b4fc2

View File

@ -259,6 +259,11 @@ static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg,
burnstr(p->passphrase);
p->passphrase = dupstr("");
SetDlgItemText(hwnd, IDC_PASSPHRASE_EDITBOX, p->passphrase);
if (!p->help_topic || !has_help()) {
HWND item = GetDlgItem(hwnd, IDHELP);
if (item)
DestroyWindow(item);
}
return 0;
}
case WM_COMMAND: