diff options
author | George Hazan <george.hazan@gmail.com> | 2013-02-28 17:02:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-02-28 17:02:58 +0000 |
commit | ea922a1ddd0526d37c6a299ab6260729612a8dfa (patch) | |
tree | 56bc15af2b2b173b4368ef3c1a6a065267a23ccf /src/modules/netlib/netliblog.cpp | |
parent | 7b44e3c9879ed7cb1ab3f64b829e0c0b09c6ffae (diff) |
new template, VARST, to hold the result of calling Utils_ReplaceVarsT()
git-svn-id: http://svn.miranda-ng.org/main/trunk@3806 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib/netliblog.cpp')
-rw-r--r-- | src/modules/netlib/netliblog.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp index 4b2272932c..81ae80c604 100644 --- a/src/modules/netlib/netliblog.cpp +++ b/src/modules/netlib/netliblog.cpp @@ -138,18 +138,15 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa break;
*/
case IDC_FILENAME:
- if (HIWORD(wParam) != EN_CHANGE) break;
- if ((HWND)lParam == GetFocus())
- CheckDlgButton(hwndDlg, IDC_TOFILE, BST_CHECKED);
+ if (HIWORD(wParam) == EN_CHANGE) {
+ if ((HWND)lParam == GetFocus())
+ CheckDlgButton(hwndDlg, IDC_TOFILE, BST_CHECKED);
- {
TCHAR path[MAX_PATH];
GetWindowText((HWND)lParam, path, MAX_PATH);
- TCHAR *pszNewPath = Utils_ReplaceVarsT(path);
- PathToAbsoluteT(pszNewPath, path, NULL);
+ PathToAbsoluteT( VARST(path), path, NULL);
SetDlgItemText(hwndDlg, IDC_PATH, path);
- mir_free(pszNewPath);
}
break;
case IDC_FILENAMEBROWSE:
@@ -568,13 +565,11 @@ void NetlibLogInit(void) if ( !DBGetContactSettingTString(NULL, "Netlib", "File", &dbv)) {
logOptions.szUserFile = mir_tstrdup(dbv.ptszVal);
- TCHAR *pszNewPath = Utils_ReplaceVarsT(dbv.ptszVal);
TCHAR path[MAX_PATH];
- PathToAbsoluteT(pszNewPath, path, NULL);
+ PathToAbsoluteT( VARST(dbv.ptszVal), path, NULL);
logOptions.szFile = mir_tstrdup(path);
- mir_free(pszNewPath);
db_free(&dbv);
}
else {
|