From 77a729f2db0ed98a35d60b5ae05d7897e15b98c9 Mon Sep 17 00:00:00 2001 From: avikpl1911 Date: Thu, 8 Feb 2024 10:04:17 +0530 Subject: [PATCH] implementation complete naming covention left --- src/Ryujinx/Ui/Windows/SettingsWindow.cs | 45 +++++++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/src/Ryujinx/Ui/Windows/SettingsWindow.cs b/src/Ryujinx/Ui/Windows/SettingsWindow.cs index 9bebc3680..b77f67942 100644 --- a/src/Ryujinx/Ui/Windows/SettingsWindow.cs +++ b/src/Ryujinx/Ui/Windows/SettingsWindow.cs @@ -859,23 +859,58 @@ namespace Ryujinx.Ui.Windows } else if (_includeorexlude == IncludeorExclude.Include) { + TreeSelection selection = _gameDirsBox1.Selection; + if (selection.GetSelected(out TreeIter treeIter1)) + { + var model = _gameDirsBox1.Model; + _gameDirsBoxStore.AppendValues(model.GetValue(treeIter1, 0)); + Console.WriteLine(model.GetValue(treeIter1, 0)); + _directoryChanged = true; + + _gameDirsBoxStore1.Remove(ref treeIter1); + } + + ((ToggleButton)sender).SetStateFlags(StateFlags.Normal, true); } } private void RemoveDir_Pressed(object sender, EventArgs args) { - TreeSelection selection = _gameDirsBox.Selection; - if (selection.GetSelected(out TreeIter treeIter)) + if (_includeorexlude == IncludeorExclude.Exclude) { - _gameDirsBoxStore.Remove(ref treeIter); - _directoryChanged = true; - } + TreeSelection selection = _gameDirsBox.Selection; + + if (selection.GetSelected(out TreeIter treeIter)) + { + _gameDirsBoxStore.Remove(ref treeIter); + + _directoryChanged = true; + } ((ToggleButton)sender).SetStateFlags(StateFlags.Normal, true); + } + else if (_includeorexlude == IncludeorExclude.Include) + { + TreeSelection selection = _gameDirsBox1.Selection; + + + + if (selection.GetSelected(out TreeIter treeIter)) + { + _gameDirsBoxStore1.Remove(ref treeIter); + + _directoryChanged = true; + } + + ((ToggleButton)sender).SetStateFlags(StateFlags.Normal, true); + } + + + } private void CustThemeToggle_Activated(object sender, EventArgs args)