From f94eff08062849e11c5686b5c4e885b85d94cb92 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Aug 2014 14:31:01 +0000 Subject: network log gets started only on the second Apply in Options/Network/Logging git-svn-id: http://svn.miranda-ng.org/main/trunk@10240 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/netlib/netliblog.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp index 0631bf917c..b05b0b3107 100644 --- a/src/modules/netlib/netliblog.cpp +++ b/src/modules/netlib/netliblog.cpp @@ -119,12 +119,10 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa if (szRun) SetDlgItemTextA(hwndDlg, IDC_RUNATSTART, szRun); - TVINSERTSTRUCT tvis = { 0 }; HWND hwndFilter = GetDlgItem(hwndDlg, IDC_FILTER); - SetWindowLongPtr(hwndFilter, GWL_STYLE, GetWindowLongPtr(hwndFilter, GWL_STYLE) | (TVS_NOHSCROLL | TVS_CHECKBOXES)); - tvis.hParent = NULL; + TVINSERTSTRUCT tvis = { 0 }; tvis.hInsertAfter = TVI_SORT; tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE; tvis.item.stateMask = TVIS_STATEIMAGEMASK; @@ -218,8 +216,6 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa GetWindowText(GetDlgItem(hwndDlg, IDC_PATH), str, MAX_PATH); logOptions.tszFile = rtrimt(str); - InitLog(); - db_set_b(NULL, "Netlib", "DumpRecv", logOptions.dumpRecv = IsDlgButtonChecked(hwndDlg, IDC_DUMPRECV)); db_set_b(NULL, "Netlib", "DumpSent", logOptions.dumpSent = IsDlgButtonChecked(hwndDlg, IDC_DUMPSENT)); db_set_b(NULL, "Netlib", "DumpProxy", logOptions.dumpProxy = IsDlgButtonChecked(hwndDlg, IDC_DUMPPROXY)); @@ -254,7 +250,8 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa tvi.hItem = TreeView_GetNextSibling(hwndFilter, tvi.hItem); } } - + InitLog(); + // fall through case IDCANCEL: DestroyWindow(hwndDlg); } -- cgit v1.2.3