[smuxi/stable] Frontend-GNOME: show only *.ppk files in SSH key file chooser on Windows



commit f15c93f4429dc26673b965cae9c3f893aa302406
Author: Mirco Bauer <meebey meebey net>
Date:   Sun Jul 10 12:56:16 2016 +0200

    Frontend-GNOME: show only *.ppk files in SSH key file chooser on Windows

 .../Views/Assistants/Engine/EngineAssistant.cs     |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs 
b/src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs
index 5f7e61f..d49c3b5 100644
--- a/src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs
+++ b/src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs
@@ -224,12 +224,18 @@ namespace Smuxi.Frontend.Gnome
             // OpenSSH doesn't support passing passwords via command line
             f_CredentialsWidget.SshPasswordVBox.Visible = IsPutty;
 
-            // Plink always requires a SSH username
             if (IsPutty) {
+                // Plink always requires a SSH username, thus
                 // remove the (optional) portion from the label
                 f_CredentialsWidget.SshUsernameLabel.Text = Regex.Replace(
                     f_CredentialsWidget.SshUsernameLabel.Text, @"\(.*?\)", ""
                 );
+
+                // PuTTY/Plink does not support OpenSSH key files but .ppk
+                var filter = new Gtk.FileFilter();
+                filter.Name = "PuTTY/Plink key files (*.ppk)";
+                filter.AddPattern("*.ppk");
+                f_CredentialsWidget.SshKeyfileChooserButton.AddFilter(filter);
             }
 
             if (f_EngineName != null) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]