From d0e36b7b19a8477d7715b729bb389972edc7de66 Mon Sep 17 00:00:00 2001 From: Xpl0itR Date: Sun, 20 Sep 2020 05:31:05 +0100 Subject: [PATCH] Move the open logs folder from setting into the File menu in the main window (#1550) --- Ryujinx/Ui/MainWindow.cs | 17 ++++++++++++++++- Ryujinx/Ui/MainWindow.glade | 10 ++++++++++ Ryujinx/Ui/SettingsWindow.cs | 15 --------------- Ryujinx/Ui/SettingsWindow.glade | 17 ----------------- 4 files changed, 26 insertions(+), 33 deletions(-) diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 86a11f072f..4e68951393 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -882,7 +882,7 @@ namespace Ryujinx.Ui private void Open_Ryu_Folder(object sender, EventArgs args) { - Process.Start(new ProcessStartInfo() + Process.Start(new ProcessStartInfo { FileName = AppDataManager.BaseDirPath, UseShellExecute = true, @@ -890,6 +890,21 @@ namespace Ryujinx.Ui }); } + private void OpenLogsFolder_Pressed(object sender, EventArgs args) + { + string logPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs"); + + DirectoryInfo directory = new DirectoryInfo(logPath); + directory.Create(); + + Process.Start(new ProcessStartInfo + { + FileName = logPath, + UseShellExecute = true, + Verb = "open" + }); + } + private void Exit_Pressed(object sender, EventArgs args) { End(_emulationContext); diff --git a/Ryujinx/Ui/MainWindow.glade b/Ryujinx/Ui/MainWindow.glade index cf8d9a223c..254d2bcd1b 100644 --- a/Ryujinx/Ui/MainWindow.glade +++ b/Ryujinx/Ui/MainWindow.glade @@ -64,6 +64,16 @@ + + + True + False + Opens the folder where logs are written to. + Open Logs Folder + True + + + True diff --git a/Ryujinx/Ui/SettingsWindow.cs b/Ryujinx/Ui/SettingsWindow.cs index 68634b3052..efaa06cd26 100644 --- a/Ryujinx/Ui/SettingsWindow.cs +++ b/Ryujinx/Ui/SettingsWindow.cs @@ -478,21 +478,6 @@ namespace Ryujinx.Ui _browseThemePath.SetStateFlags(0, true); } - private void OpenLogsFolder_Pressed(object sender, EventArgs args) - { - string logPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs"); - - DirectoryInfo directory = new DirectoryInfo(logPath); - directory.Create(); - - Process.Start(new ProcessStartInfo() - { - FileName = logPath, - UseShellExecute = true, - Verb = "open" - }); - } - private void ConfigureController_Pressed(object sender, EventArgs args, PlayerIndex playerIndex) { ((ToggleButton)sender).SetStateFlags(0, true); diff --git a/Ryujinx/Ui/SettingsWindow.glade b/Ryujinx/Ui/SettingsWindow.glade index a66bcd9509..505cc2387a 100644 --- a/Ryujinx/Ui/SettingsWindow.glade +++ b/Ryujinx/Ui/SettingsWindow.glade @@ -1977,23 +1977,6 @@ 0 - - - Open Logs Folder - True - True - True - Opens the folder where logs are written to. - start - 10 - - - - False - True - 1 - - Enable Stub Logs