mirror of
https://github.com/henrypp/simplewall.git
synced 2026-10-22 02:52:54 -05:00
correct log viewer file path
This commit is contained in:
2 files changed
+20
-9
No files matched your search
@@ -115,10 +115,21 @@ PR_STRING _app_getlogpath ()
|
||||
_Ret_maybenull_
|
||||
PR_STRING _app_getlogviewer ()
|
||||
{
|
||||
R_STRINGREF sr;
|
||||
PR_STRING path;
|
||||
|
||||
path = _r_config_getstringexpand (L"LogViewer", LOG_VIEWER_DEFAULT);
|
||||
|
||||
if (!path || !_r_fs_exists (&path->sr))
|
||||
{
|
||||
if (path)
|
||||
_r_obj_dereference (path);
|
||||
|
||||
_r_obj_initializestringref (&sr, LOG_VIEWER_DEFAULT);
|
||||
|
||||
_r_str_environmentexpandstring (NULL, &sr, &path);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -732,26 +732,26 @@ INT_PTR CALLBACK SettingsProc (
|
||||
|
||||
case IDD_SETTINGS_LOGGING:
|
||||
{
|
||||
PR_STRING string;
|
||||
PR_STRING path;
|
||||
|
||||
_r_ctrl_checkbutton (hwnd, IDC_ENABLELOG_CHK, _r_config_getboolean (L"IsLogEnabled", FALSE));
|
||||
|
||||
string = _app_getlogpath ();
|
||||
path = _app_getlogpath ();
|
||||
|
||||
if (string)
|
||||
if (path)
|
||||
{
|
||||
_r_ctrl_setstring (hwnd, IDC_LOGPATH, string->buffer);
|
||||
_r_ctrl_setstring (hwnd, IDC_LOGPATH, path->buffer);
|
||||
|
||||
_r_obj_dereference (string);
|
||||
_r_obj_dereference (path);
|
||||
}
|
||||
|
||||
string = _app_getlogviewer ();
|
||||
path = _r_config_getstringexpand (L"LogViewer", LOG_VIEWER_DEFAULT);
|
||||
|
||||
if (string)
|
||||
if (path)
|
||||
{
|
||||
_r_ctrl_setstring (hwnd, IDC_LOGVIEWER, string->buffer);
|
||||
_r_ctrl_setstring (hwnd, IDC_LOGVIEWER, path->buffer);
|
||||
|
||||
_r_obj_dereference (string);
|
||||
_r_obj_dereference (path);
|
||||
}
|
||||
|
||||
_r_ctrl_setacceleration (hwnd, IDC_LOGSIZELIMIT, 64); // set step to 64kb
|
||||
|
||||
Reference in new issue
Block a user