summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-08-19 14:31:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-08-19 14:31:01 +0000
commitf94eff08062849e11c5686b5c4e885b85d94cb92 (patch)
tree43caa3487664503d94819bd43b3a5d1714e1db46 /src
parenta90ab57a96767245709237d9e18357d2b1d31a90 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/netlib/netliblog.cpp9
1 files 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);
}