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 | |
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
-rw-r--r-- | plugins/WhoUsesMyFiles/res/resource.rc | 16 | ||||
-rw-r--r-- | plugins/WhoUsesMyFiles/src/wumfplug.cpp | 16 |
2 files changed, 18 insertions, 14 deletions
diff --git a/plugins/WhoUsesMyFiles/res/resource.rc b/plugins/WhoUsesMyFiles/res/resource.rc index 69da8a4e36..df0e02e69a 100644 --- a/plugins/WhoUsesMyFiles/res/resource.rc +++ b/plugins/WhoUsesMyFiles/res/resource.rc @@ -47,13 +47,13 @@ BEGIN CONTROL "",IDC_COLOR_TEXT,"ColourPicker",WS_TABSTOP,187,39,39,12
LTEXT "Text color",IDC_STATIC,231,42,76,8,SS_CENTERIMAGE | NOT WS_GROUP
PUSHBUTTON "Previe&w",IDC_PREVIEW,270,231,50,15
- CONTROL "Show infinitely",IDC_DELAY_INF,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,17,50,61,10
- CONTROL "Default Popup delay",IDC_DELAY_DEF,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,17,61,81,10
- CONTROL "Choose delay time",IDC_DELAY_SET,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,17,39,73,10
+ CONTROL "Show infinitely",IDC_DELAY_INF,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,17,50,137,10
+ CONTROL "Default Popup delay",IDC_DELAY_DEF,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,17,61,137,10
+ CONTROL "Choose delay time",IDC_DELAY_SET,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,17,39,137,10
GROUPBOX "Popup color settings",IDC_STATIC,167,9,153,93,WS_GROUP
- CONTROL "Use windows colors",IDC_COLOR_WIN,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,187,63,79,10
- CONTROL "Use default Popup colors",IDC_COLOR_DEF,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,187,74,97,10
- CONTROL "Choose colors",IDC_COLOR_SET,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,187,52,61,10
+ CONTROL "Use windows colors",IDC_COLOR_WIN,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,187,63,125,10
+ CONTROL "Use default Popup colors",IDC_COLOR_DEF,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,187,74,125,10
+ CONTROL "Choose colors",IDC_COLOR_SET,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,187,52,125,10
GROUPBOX "File access filter && logging settings",IDC_STATIC,9,106,311,101
EDITTEXT IDC_FILE,83,123,210,12,ES_AUTOHSCROLL,WS_EX_ACCEPTFILES
PUSHBUTTON "...",IDC_SEL_FILE,299,123,14,12
@@ -90,6 +90,10 @@ BEGIN IDD_OPTIONS, DIALOG
BEGIN
RIGHTMARGIN, 320
+ VERTGUIDE, 17
+ VERTGUIDE, 154
+ VERTGUIDE, 187
+ VERTGUIDE, 312
END
END
#endif // APSTUDIO_INVOKED
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);
}
}
|