1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-17 19:11:00 -05:00

Stop winutils.c from depending on the global HWND.

The GUI version of pgp_fingerprints() is now a differently named
function that takes a parent HWND as a parameter, and so does my
help-enabled wrapper around MessageBox.
This commit is contained in:
Simon Tatham
2020-02-02 10:00:42 +00:00
parent ad0c7c99f8
commit 46f60bb547
6 changed files with 34 additions and 27 deletions

View File

@ -657,7 +657,7 @@ void load_key_file(HWND hwnd, struct MainDlgState *state,
!import_possible(type)) {
char *msg = dupprintf("Couldn't load private key (%s)",
key_type_to_str(type));
message_box(msg, "PuTTYgen Error", MB_OK | MB_ICONERROR,
message_box(hwnd, msg, "PuTTYgen Error", MB_OK | MB_ICONERROR,
HELPCTXID(errors_cantloadkey));
sfree(msg);
return;
@ -720,7 +720,7 @@ void load_key_file(HWND hwnd, struct MainDlgState *state,
sfree(comment);
if (ret == 0) {
char *msg = dupprintf("Couldn't load private key (%s)", errmsg);
message_box(msg, "PuTTYgen Error", MB_OK | MB_ICONERROR,
message_box(hwnd, msg, "PuTTYgen Error", MB_OK | MB_ICONERROR,
HELPCTXID(errors_cantloadkey));
sfree(msg);
} else if (ret == 1) {
@ -1572,7 +1572,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
for (i = 0; i < argc; i++) {
if (!strcmp(argv[i], "-pgpfp")) {
pgp_fingerprints();
pgp_fingerprints_msgbox(NULL);
return 1;
} else if (!strcmp(argv[i], "-restrict-acl") ||
!strcmp(argv[i], "-restrict_acl") ||