]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Rene Post's other patch: PuTTYgen was generating double file dialogs
authorSimon Tatham <anakin@pobox.com>
Wed, 14 May 2003 18:53:28 +0000 (18:53 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 14 May 2003 18:53:28 +0000 (18:53 +0000)
by mistake.

[originally from svn r3196]

puttygen.c

index e16b4f3da602032ac0e4655f88df28af78b73d05..8ce452a200586818c5eff2c647b7f46c38731428 100644 (file)
@@ -1107,6 +1107,8 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
          case IDC_SAVE:
           case IDC_EXPORT_OPENSSH:
           case IDC_EXPORT_SSHCOM:
+           if (HIWORD(wParam) != BN_CLICKED)
+               break;
            state =
                (struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA);
            if (state->key_exists) {
@@ -1200,6 +1202,8 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
            }
            break;
          case IDC_SAVEPUB:
+           if (HIWORD(wParam) != BN_CLICKED)
+               break;
            state =
                (struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA);
            if (state->key_exists) {
@@ -1233,6 +1237,8 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
            break;
          case IDC_LOAD:
          case IDC_IMPORT:
+           if (HIWORD(wParam) != BN_CLICKED)
+               break;
            state =
                (struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA);
            if (!state->generation_thread_exists) {