mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-12 13:49:12 +00:00
adding includeor exclude enum to settingswindow.glade
This commit is contained in:
parent
1df084a635
commit
cfba977275
2 changed files with 37 additions and 0 deletions
|
@ -27,6 +27,9 @@ namespace Ryujinx.Ui.Windows
|
||||||
{
|
{
|
||||||
public class SettingsWindow : Window
|
public class SettingsWindow : Window
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private readonly MainWindow _parent;
|
private readonly MainWindow _parent;
|
||||||
private readonly ListStore _gameDirsBoxStore;
|
private readonly ListStore _gameDirsBoxStore;
|
||||||
private readonly ListStore _gameDirsBoxStore1;
|
private readonly ListStore _gameDirsBoxStore1;
|
||||||
|
@ -38,6 +41,12 @@ namespace Ryujinx.Ui.Windows
|
||||||
private float _previousVolumeLevel;
|
private float _previousVolumeLevel;
|
||||||
private bool _directoryChanged = false;
|
private bool _directoryChanged = false;
|
||||||
|
|
||||||
|
private enum IncludeorExclude { Include, Exclude }
|
||||||
|
|
||||||
|
|
||||||
|
private IncludeorExclude _includeorexlude = IncludeorExclude.Include;
|
||||||
|
|
||||||
|
|
||||||
#pragma warning disable CS0649, IDE0044 // Field is never assigned to, Add readonly modifier
|
#pragma warning disable CS0649, IDE0044 // Field is never assigned to, Add readonly modifier
|
||||||
[GUI] CheckButton _traceLogToggle;
|
[GUI] CheckButton _traceLogToggle;
|
||||||
[GUI] CheckButton _errorLogToggle;
|
[GUI] CheckButton _errorLogToggle;
|
||||||
|
@ -766,12 +775,14 @@ namespace Ryujinx.Ui.Windows
|
||||||
{
|
{
|
||||||
Console.WriteLine("here");
|
Console.WriteLine("here");
|
||||||
_include_exclude_dir.Label = "exclude";
|
_include_exclude_dir.Label = "exclude";
|
||||||
|
_includeorexlude = IncludeorExclude.Exclude;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onRowActivated1(object sender, ButtonReleaseEventArgs args)
|
private void onRowActivated1(object sender, ButtonReleaseEventArgs args)
|
||||||
{
|
{
|
||||||
Console.WriteLine("here");
|
Console.WriteLine("here");
|
||||||
_include_exclude_dir.Label = "include";
|
_include_exclude_dir.Label = "include";
|
||||||
|
_includeorexlude = IncludeorExclude.Include;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -824,6 +835,31 @@ namespace Ryujinx.Ui.Windows
|
||||||
((ToggleButton)sender).SetStateFlags(StateFlags.Normal, true);
|
((ToggleButton)sender).SetStateFlags(StateFlags.Normal, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Include_exclude_Pressed(object sender,EventArgs args)
|
||||||
|
{
|
||||||
|
if (_includeorexlude==IncludeorExclude.Exclude)
|
||||||
|
{
|
||||||
|
|
||||||
|
TreeSelection selection = _gameDirsBox.Selection;
|
||||||
|
|
||||||
|
if (selection.GetSelected(out TreeIter treeIter))
|
||||||
|
{
|
||||||
|
var model = _gameDirsBox.Model;
|
||||||
|
Console.WriteLine(model.GetValue(treeIter,0));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
((ToggleButton)sender).SetStateFlags(StateFlags.Normal, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (_includeorexlude == IncludeorExclude.Include)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void RemoveDir_Pressed(object sender, EventArgs args)
|
private void RemoveDir_Pressed(object sender, EventArgs args)
|
||||||
{
|
{
|
||||||
TreeSelection selection = _gameDirsBox.Selection;
|
TreeSelection selection = _gameDirsBox.Selection;
|
||||||
|
|
|
@ -429,6 +429,7 @@
|
||||||
<property name="can-focus">True</property>
|
<property name="can-focus">True</property>
|
||||||
<property name="receives-default">True</property>
|
<property name="receives-default">True</property>
|
||||||
<property name="tooltip-text" translatable="yes"> Add a game tyu directory to the list</property>
|
<property name="tooltip-text" translatable="yes"> Add a game tyu directory to the list</property>
|
||||||
|
<signal name="toggled" handler="Include_exclude_Pressed" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
|
Loading…
Reference in a new issue