remove unused dialog

This commit is contained in:
Matt Parker
2025-09-30 22:07:23 +10:00
parent ed640b9698
commit ee06bd8497
4 changed files with 2 additions and 20 deletions

View File

@@ -21,11 +21,7 @@ public partial class SlnPicker : Control
_openSlnButton = GetNode<Button>("%OpenSlnButton");
_openSlnButton.Pressed += () => _fileDialog.PopupCentered();
var windowParent = GetParentOrNull<Window>();
_fileDialog.FileSelected += path =>
{
windowParent?.Hide();
_tcs.SetResult(path);
};
_fileDialog.FileSelected += path => _tcs.SetResult(path);
windowParent?.CloseRequested += () => _tcs.SetResult(null);
}

View File

@@ -74,6 +74,7 @@ layout_mode = 2
unique_name_in_owner = true
oversampling_override = 1.0
title = "Open a File"
dialog_hide_on_ok = true
file_mode = 0
access = 2
filters = PackedStringArray("*.sln,*.slnx;Solution Files")

View File

@@ -19,7 +19,6 @@ public partial class IdeRoot : Control
public IdeWindow IdeWindow { get; set; } = null!;
private Button _openSlnButton = null!;
private Button _buildSlnButton = null!;
private FileDialog _fileDialog = null!;
private SearchWindow _searchWindow = null!;
private CodeEditorPanel _codeEditorPanel = null!;
private SolutionExplorerPanel _solutionExplorerPanel = null!;
@@ -45,7 +44,6 @@ public partial class IdeRoot : Control
_runMenuPopup = GetNode<Popup>("%RunMenuPopup");
_runMenuButton = GetNode<Button>("%RunMenuButton");
_codeEditorPanel = GetNode<CodeEditorPanel>("%CodeEditorPanel");
_fileDialog = GetNode<FileDialog>("%OpenSolutionDialog");
_searchWindow = GetNode<SearchWindow>("%SearchWindow");
_solutionExplorerPanel = GetNode<SolutionExplorerPanel>("%SolutionExplorerPanel");
_runPanel = GetNode<RunPanel>("%RunPanel");
@@ -54,12 +52,10 @@ public partial class IdeRoot : Control
_runMenuButton.Pressed += OnRunMenuButtonPressed;
GodotGlobalEvents.Instance.FileSelected += OnSolutionExplorerPanelOnFileSelected;
_fileDialog.FileSelected += SetSlnFilePath;
_openSlnButton.Pressed += () => IdeWindow.PickSolution();
_buildSlnButton.Pressed += OnBuildSlnButtonPressed;
GodotGlobalEvents.Instance.BottomPanelVisibilityChangeRequested += async show => await this.InvokeAsync(() => _invertedVSplitContainer.InvertedSetCollapsed(!show));
_nodeReadyTcs.SetResult();
//OnSlnFileSelected(@"C:\Users\Matthew\Documents\Git\BlazorCodeBreaker\BlazorCodeBreaker.slnx");
}
private void OnRunMenuButtonPressed()

View File

@@ -162,17 +162,6 @@ unique_name_in_owner = true
visible = false
layout_mode = 1
[node name="OpenSolutionDialog" type="FileDialog" parent="."]
unique_name_in_owner = true
title = "Open a File"
position = Vector2i(0, 36)
ok_button_text = "Open"
dialog_hide_on_ok = true
file_mode = 0
access = 2
filters = PackedStringArray("*.sln", "*.slnx")
use_native_dialog = true
[node name="SearchWindow" parent="." instance=ExtResource("13_7ptyn")]
unique_name_in_owner = true
visible = false