-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The DataGridView with a binding source is super buggy in mono and crashes easily. But if you are really careful, you can sometimes avoid the crashes.
- Loading branch information
Showing
3 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
// Copyright (c) 2022 David Lechner <[email protected]> | ||
|
||
using System; | ||
|
@@ -14,6 +14,14 @@ public partial class HostKeysDialog : Form | |
public HostKeysDialog() | ||
{ | ||
InitializeComponent(); | ||
|
||
// fix up layout in Mono | ||
if (Type.GetType("Mono.Runtime") != null) { | ||
dataGridView1.Anchor = AnchorStyles.Top | AnchorStyles.Left; | ||
dataGridView1.Height -= 20; | ||
okButton.Top -= 20; | ||
cancelButton.Top -= 20; | ||
} | ||
} | ||
|
||
public void AddKeySpec(EntrySettings.DestinationConstraint.KeySpec spec) | ||
|
@@ -24,7 +32,7 @@ public void AddKeySpec(EntrySettings.DestinationConstraint.KeySpec spec) | |
public EntrySettings.DestinationConstraint.KeySpec[] GetKeySpecs() | ||
{ | ||
return keySpecBindingSource.Cast<EntrySettings.DestinationConstraint.KeySpec>() | ||
.Where(x => x.HostKey != null).Select(x => x.DeepCopy()).ToArray(); | ||
.Where(x => !string.IsNullOrWhiteSpace(x.HostKey)).Select(x => x.DeepCopy()).ToArray(); | ||
} | ||
|
||
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) | ||
|
Submodule SshAgentLib
updated
3 files
+1 −1 | SshAgentLibTests/PageantAgentTest.cs | |
+3 −20 | Ui/WinForms/KeyInfoView.cs | |
+5 −1 | Ui/WinForms/KeyPicker.cs |