correct log viewer file path

This commit is contained in:
henrypp committed 2025-02-08 15:58:02 +05:00
1 parent 04856afa61
commit c8fabfa2eb
2 files changed
+20 -9

No files matched your search

+11
View File
@@ -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
View File
@@ -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