1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-18 03:28:07 -05:00

Roman Pompejus's fix for the TAB-not-working-in-Event-Log bug

[originally from svn r891]
This commit is contained in:
Simon Tatham 2001-01-23 17:37:52 +00:00
parent d58d2cc2bb
commit bde2f9ac8a
3 changed files with 13 additions and 12 deletions

View File

@ -84,6 +84,12 @@ GLOBAL int session_closed;
#define LGTYP_DEBUG 2 /* logmode: all chars of taffic */ #define LGTYP_DEBUG 2 /* logmode: all chars of taffic */
GLOBAL char *logfile; GLOBAL char *logfile;
/*
* Window handles for the dialog boxes that can be running during a
* PuTTY session.
*/
GLOBAL HWND logbox;
/* /*
* I've just looked in the windows standard headr files for WM_USER, there * I've just looked in the windows standard headr files for WM_USER, there
* are hundreds of flags defined using the form WM_USER+123 so I've * are hundreds of flags defined using the form WM_USER+123 so I've

View File

@ -13,8 +13,6 @@
static char **events = NULL; static char **events = NULL;
static int nevents = 0, negsize = 0; static int nevents = 0, negsize = 0;
static HWND logbox = NULL, abtbox = NULL;
static int readytogo; static int readytogo;
void force_normal(HWND hwnd) void force_normal(HWND hwnd)
@ -56,6 +54,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg,
case WM_COMMAND: case WM_COMMAND:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case IDOK: case IDOK:
case IDCANCEL:
logbox = NULL; logbox = NULL;
DestroyWindow (hwnd); DestroyWindow (hwnd);
return 0; return 0;
@ -145,8 +144,8 @@ static int CALLBACK AboutProc (HWND hwnd, UINT msg,
case WM_COMMAND: case WM_COMMAND:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case IDOK: case IDOK:
abtbox = NULL; case IDCANCEL:
DestroyWindow (hwnd); EndDialog(hwnd, TRUE);
return 0; return 0;
case IDA_LICENCE: case IDA_LICENCE:
EnableWindow(hwnd, 0); EnableWindow(hwnd, 0);
@ -158,8 +157,7 @@ static int CALLBACK AboutProc (HWND hwnd, UINT msg,
} }
return 0; return 0;
case WM_CLOSE: case WM_CLOSE:
abtbox = NULL; EndDialog(hwnd, TRUE);
DestroyWindow (hwnd);
return 0; return 0;
} }
return 0; return 0;
@ -1996,11 +1994,7 @@ void showeventlog (HWND hwnd) {
} }
void showabout (HWND hwnd) { void showabout (HWND hwnd) {
if (!abtbox) { DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),hwnd, AboutProc);
abtbox = CreateDialog (hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
hwnd, AboutProc);
ShowWindow (abtbox, SW_SHOWNORMAL);
}
} }
void verify_ssh_host_key(char *host, int port, char *keytype, void verify_ssh_host_key(char *host, int port, char *keytype,

View File

@ -564,7 +564,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
} }
if(!timer_id) if(!timer_id)
timer_id = SetTimer(hwnd, 1, 20, NULL); timer_id = SetTimer(hwnd, 1, 20, NULL);
DispatchMessage (&msg); if (!(IsWindow(logbox) && IsDialogMessage(logbox, &msg)))
DispatchMessage (&msg);
/* Make sure we blink everything that needs it. */ /* Make sure we blink everything that needs it. */
term_blink(0); term_blink(0);