diff options
author | CartBlanche <savagesoftware@gmail.com> | 2019-10-11 14:22:26 +0300 |
---|---|---|
committer | CartBlanche <savagesoftware@gmail.com> | 2019-10-11 21:35:39 +0300 |
commit | 1eeb8b32dd5a8d25be32435849d2aa386d648d80 (patch) | |
tree | 23fdcbb9240010fdb8d48d37b25e47f9b4a25d27 /Xamarin.PropertyEditing.Mac | |
parent | 38105d0dcc46082d5d249de92ab188d829ea4dc1 (diff) |
[Mac] Fix crash on Catalina by using NSOpenPanel.OpenPanel static method.
Diffstat (limited to 'Xamarin.PropertyEditing.Mac')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/BasePathEditorControl.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BasePathEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BasePathEditorControl.cs index ddf4a2c..461512e 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BasePathEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BasePathEditorControl.cs @@ -38,15 +38,9 @@ namespace Xamarin.PropertyEditing.Mac StringValue = string.Empty
}; - this.currentTextField.AddButton (this.revealPathButton);
-
- this.panel = new NSOpenPanel {
- AllowsMultipleSelection = false,
- CanCreateDirectories = true,
- ShowsHiddenFiles = false,
- ShowsResizeIndicator = true,
- TreatsFilePackagesAsDirectories = true,
- }; + this.currentTextField.AddButton (this.revealPathButton); + + this.panel = NSOpenPanel.OpenPanel; // update the value on keypress this.revealPathButton.Activated += OnRevealPathButtonActivated; @@ -92,7 +86,13 @@ namespace Xamarin.PropertyEditing.Mac private void BrowsePathButton_Activated (object sender, EventArgs e) {
Window.MakeFirstResponder (this.currentTextField);
- this.panel.BeginSheet (this.Window, HandleAction);
+
+ this.panel.AllowsMultipleSelection = false; + this.panel.CanCreateDirectories = true; + this.panel.ShowsHiddenFiles = false; + this.panel.ShowsResizeIndicator = true; + this.panel.TreatsFilePackagesAsDirectories = true;
+ this.panel.BeginSheet (Window, HandleAction);
}
protected abstract void OnRevealPathButtonActivated (object sender, EventArgs e); |