X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/475eebf93799a91094532644799a2cdde46a14cf..098ecd174ccf3473f2345a7f1e205dd199cc0100:/windlg.c diff --git a/windlg.c b/windlg.c index 18d1abae..f814cf4b 100644 --- a/windlg.c +++ b/windlg.c @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include "ssh.h" #include "putty.h" @@ -47,6 +49,11 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg, switch (msg) { case WM_INITDIALOG: + { + static const int tabs[4] = {78, 108}; + SendDlgItemMessage (hwnd, IDN_LIST, LB_SETTABSTOPS, 2, + (LPARAM) tabs); + } for (i=0; i= negsize) { negsize += 64; events = srealloc (events, negsize * sizeof(*events)); } - events[nevents] = smalloc(1+strlen(string)); - strcpy (events[nevents], string); + + time(&t); + strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S\t", localtime(&t)); + + events[nevents] = smalloc(strlen(timebuf)+strlen(string)+1); + strcpy(events[nevents], timebuf); + strcat(events[nevents], string); nevents++; if (logbox) { int count; @@ -1991,6 +2074,7 @@ void showeventlog (HWND hwnd) { hwnd, LogProc); ShowWindow (logbox, SW_SHOWNORMAL); } + SetActiveWindow(logbox); } void showabout (HWND hwnd) {