From d736352da2958574c9c7f4e95ac81b242ecbea8f Mon Sep 17 00:00:00 2001 From: Xpl0itR Date: Mon, 17 Feb 2020 21:35:03 +0000 Subject: [PATCH] Add button in settings to open logs folder (#947) --- Ryujinx/Ui/SwitchSettings.cs | 14 +++++++-- Ryujinx/Ui/SwitchSettings.glade | 52 ++++++++++++--------------------- 2 files changed, 30 insertions(+), 36 deletions(-) diff --git a/Ryujinx/Ui/SwitchSettings.cs b/Ryujinx/Ui/SwitchSettings.cs index 72ac49604..da2d4a74e 100644 --- a/Ryujinx/Ui/SwitchSettings.cs +++ b/Ryujinx/Ui/SwitchSettings.cs @@ -4,6 +4,7 @@ using Ryujinx.Configuration.Hid; using Ryujinx.Configuration.System; using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; @@ -47,7 +48,6 @@ namespace Ryujinx.Ui [GUI] ToggleButton _addDir; [GUI] ToggleButton _browseDir; [GUI] ToggleButton _removeDir; - [GUI] Entry _logPath; [GUI] Entry _graphicsShadersDumpPath; [GUI] Image _controller1Image; @@ -244,8 +244,6 @@ namespace Ryujinx.Ui _browseThemePath.Sensitive = false; } - _logPath.Buffer.Text = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ryujinx.log"); - _listeningForKeypress = false; } @@ -366,6 +364,16 @@ namespace Ryujinx.Ui _browseThemePath.SetStateFlags(0, true); } + private void OpenLogsFolder_Pressed(object sender, EventArgs args) + { + Process.Start(new ProcessStartInfo() + { + FileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs"), + UseShellExecute = true, + Verb = "open" + }); + } + private void SaveToggle_Activated(object sender, EventArgs args) { List gameDirs = new List(); diff --git a/Ryujinx/Ui/SwitchSettings.glade b/Ryujinx/Ui/SwitchSettings.glade index cd00625c4..6128a3ce4 100644 --- a/Ryujinx/Ui/SwitchSettings.glade +++ b/Ryujinx/Ui/SwitchSettings.glade @@ -1437,55 +1437,42 @@ 10 10 vertical - - - Enable Logging to File - True - True - False - Enables or disables logging to a file on disk - start - 5 - 5 - True - - - False - True - 0 - - True False - 5 - 10 - + + Enable Logging to File True - False - Location of the log file - Log File Location: + True + False + Enables or disables logging to a file on disk + start + 5 + 5 + True False True - 5 0 - + + Open Logs Folder True True - Location of the log file - center - False - False + True + Opens the folder where logs are written to. + 5 + 5 + 5 + - True + False True 1 @@ -1494,8 +1481,7 @@ False True - 5 - 1 + 0