mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 03:53:01 -05:00
Jacob's fixes for the Event Log
[originally from svn r963]
This commit is contained in:
parent
cc9d7ba87e
commit
b6255788ca
6
windlg.c
6
windlg.c
@ -50,7 +50,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg,
|
|||||||
switch (msg) {
|
switch (msg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
static const int tabs[4] = {78, 108};
|
static int tabs[4] = {78, 108};
|
||||||
SendDlgItemMessage (hwnd, IDN_LIST, LB_SETTABSTOPS, 2,
|
SendDlgItemMessage (hwnd, IDN_LIST, LB_SETTABSTOPS, 2,
|
||||||
(LPARAM) tabs);
|
(LPARAM) tabs);
|
||||||
}
|
}
|
||||||
@ -2058,14 +2058,14 @@ void logevent (char *string) {
|
|||||||
events[nevents] = smalloc(strlen(timebuf)+strlen(string)+1);
|
events[nevents] = smalloc(strlen(timebuf)+strlen(string)+1);
|
||||||
strcpy(events[nevents], timebuf);
|
strcpy(events[nevents], timebuf);
|
||||||
strcat(events[nevents], string);
|
strcat(events[nevents], string);
|
||||||
nevents++;
|
|
||||||
if (logbox) {
|
if (logbox) {
|
||||||
int count;
|
int count;
|
||||||
SendDlgItemMessage (logbox, IDN_LIST, LB_ADDSTRING,
|
SendDlgItemMessage (logbox, IDN_LIST, LB_ADDSTRING,
|
||||||
0, (LPARAM)string);
|
0, (LPARAM)events[nevents]);
|
||||||
count = SendDlgItemMessage (logbox, IDN_LIST, LB_GETCOUNT, 0, 0);
|
count = SendDlgItemMessage (logbox, IDN_LIST, LB_GETCOUNT, 0, 0);
|
||||||
SendDlgItemMessage (logbox, IDN_LIST, LB_SETTOPINDEX, count-1, 0);
|
SendDlgItemMessage (logbox, IDN_LIST, LB_SETTOPINDEX, count-1, 0);
|
||||||
}
|
}
|
||||||
|
nevents++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void showeventlog (HWND hwnd) {
|
void showeventlog (HWND hwnd) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user