Malcolm Rowe's UI tweak patch for About/Licence: recognise `Esc' to close
[sgt/putty] / puttygen.c
index f810ba2..3f2be92 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * PuTTY key generation front end.
+ * PuTTY key generation front end (Windows).
  */
 
 #include <time.h>
@@ -253,6 +253,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
       case WM_COMMAND:
        switch (LOWORD(wParam)) {
          case IDOK:
+         case IDCANCEL:
            EndDialog(hwnd, 1);
            return 0;
        }
@@ -292,6 +293,7 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
       case WM_COMMAND:
        switch (LOWORD(wParam)) {
          case IDOK:
+         case IDCANCEL:
            EndDialog(hwnd, 1);
            return 0;
          case 101:
@@ -928,9 +930,9 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
                       IDC_BITSSTATIC, IDC_BITS, 20);
            endbox(&cp);
        }
-       CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA, IDC_KEYSSH1);
+       CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA, IDC_KEYSSH2RSA);
        CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1, IDC_KEYSSH2DSA,
-                          IDC_KEYSSH1, MF_BYCOMMAND);
+                          IDC_KEYSSH2RSA, MF_BYCOMMAND);
        SetDlgItemInt(hwnd, IDC_BITS, DEFAULT_KEYSIZE, FALSE);
 
        /*