diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2013-10-11 16:44:42 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2013-10-11 16:44:42 +0000 |
commit | bbbecb94d2572634efd9d63916070aa7d7950c9b (patch) | |
tree | 39372a951118323cf41cec4551d59f58306301f5 /plugins/WhoUsesMyFiles/src/wumfplug.cpp | |
parent | dd11a3930b9c02a0a4c0b79574806a6d57ad0554 (diff) |
- fixed log file creation
- minor layout fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@6443 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhoUsesMyFiles/src/wumfplug.cpp')
-rw-r--r-- | plugins/WhoUsesMyFiles/src/wumfplug.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 36801522fc..517afbe13c 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -26,7 +26,7 @@ void LoadOptions() DBVARIANT dbv = { 0 };
dbv.type = DBVT_TCHAR;
ZeroMemory(&WumfOptions, sizeof(WumfOptions));
- if (db_get(NULL, MODULENAME, OPT_FILE, &dbv) == 0)
+ if (db_get_ts(NULL, MODULENAME, OPT_FILE, &dbv) == 0)
{
_tcsncpy(WumfOptions.LogFile, dbv.ptszVal, 255);
db_free(&dbv);
@@ -271,11 +271,11 @@ void ChooseFile(HWND hDlg) ofn.nFilterIndex = 2;
ofn.Flags = OFN_CREATEPROMPT;
// Display the Open dialog box.
- if (GetSaveFileName(&ofn) == TRUE) {
- HANDLE hf = CreateFile(ofn.lpstrFile,GENERIC_WRITE,0,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL, NULL);
+ if (GetSaveFileName(&ofn)) {
+ HANDLE hf = CreateFile(szFile,GENERIC_WRITE,0,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL, NULL);
if (hf != INVALID_HANDLE_VALUE) {
- SetDlgItemText(hDlg,IDC_FILE,ofn.lpstrFile);
- lstrcpyn(WumfOptions.LogFile, ofn.lpstrFile, 255);
+ SetDlgItemText(hDlg,IDC_FILE,szFile);
+ lstrcpyn(WumfOptions.LogFile, szFile, MAX_PATH);
CloseHandle(hf);
}
}
@@ -389,7 +389,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara ShowThePreview();
break;
case IDC_CONN:
- CallService(MS_WUMF_CONNECTIONSSHOW, (WPARAM)0, (LPARAM)0);
+ CallService(MS_WUMF_CONNECTIONSSHOW, 0, 0);
break;
}
break;
@@ -413,7 +413,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_FILE:
- GetDlgItemText(hwndDlg,IDC_FILE,WumfOptions.LogFile, sizeof(WumfOptions.LogFile));
+ GetDlgItemText(hwndDlg,IDC_FILE,WumfOptions.LogFile, SIZEOF(WumfOptions.LogFile));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
@@ -453,7 +453,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara db_set_b(NULL, MODULENAME, ALERT_UNC, (BYTE)WumfOptions.AlertUNC);
db_set_b(NULL, MODULENAME, LOG_COMP, (BYTE)WumfOptions.LogComp);
db_set_b(NULL, MODULENAME, ALERT_COMP, (BYTE)WumfOptions.AlertComp);
- GetDlgItemText(hwndDlg, IDC_FILE, WumfOptions.LogFile, 255);
+ GetDlgItemText(hwndDlg, IDC_FILE, WumfOptions.LogFile, SIZEOF(WumfOptions.LogFile));
db_set_ts(NULL, MODULENAME, OPT_FILE, WumfOptions.LogFile);
}
}
|