From b244cfc7b22919194dd253dc7b5531ea98057a55 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 26 Feb 2018 15:42:12 +0000 Subject: [PATCH 1/4] linux note: Make default button blue --- SparkleShare/Linux/Note.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Linux/Note.cs b/SparkleShare/Linux/Note.cs index e4ccd29c..ecbdbe16 100644 --- a/SparkleShare/Linux/Note.cs +++ b/SparkleShare/Linux/Note.cs @@ -96,8 +96,9 @@ namespace SparkleShare { var cancel_button = new Button ("Cancel"); - var sync_button = new Button ("Sync"); // TODO: Make default button - sync_button.CanDefault = true; + var sync_button = new Button ("Sync") { CanDefault = true }; + + sync_button.StyleContext.AddClass ("suggested-action"); cancel_button.Clicked += delegate { Controller.CancelClicked (); }; sync_button.Clicked += delegate { Controller.SyncClicked (balloon.Buffer.Text); }; From a32a8870eead4bedb592b7f455f14115b23a5f03 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 26 Feb 2018 16:14:59 +0000 Subject: [PATCH 2/4] linux note: Fix default avatar image --- SparkleShare/Linux/Note.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SparkleShare/Linux/Note.cs b/SparkleShare/Linux/Note.cs index ecbdbe16..8afb46fb 100644 --- a/SparkleShare/Linux/Note.cs +++ b/SparkleShare/Linux/Note.cs @@ -15,6 +15,7 @@ // along with this program. If not, see (http://www.gnu.org/licenses/). +using System.IO; using Gtk; namespace SparkleShare { @@ -64,14 +65,17 @@ namespace SparkleShare { Controller.UpdateTitleEvent += delegate (string title) { Application.Invoke (delegate { Title = title; }); }; - - CreateNote (); } private void CreateNote () { - var user_image = new Image (Controller.AvatarFilePath); + Image user_image; + + if (File.Exists (Controller.AvatarFilePath)) + user_image = new Image (Controller.AvatarFilePath); + else + user_image = UserInterfaceHelpers.GetImage ("user-icon-default.png"); /* TODO: Style the entry neatly, multiple lines, and add placeholder text string balloon_image_path = new string [] { UserInterface.AssetsPath, "pixmaps", "text-balloon.png" }.Combine (); From a905e9e1554dc2a4299a20bac2996d4ea4a7e795 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 26 Feb 2018 16:16:01 +0000 Subject: [PATCH 3/4] linux note: Fix crash/warnings due to packing logic --- SparkleShare/Linux/Note.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SparkleShare/Linux/Note.cs b/SparkleShare/Linux/Note.cs index 8afb46fb..6beb31fe 100644 --- a/SparkleShare/Linux/Note.cs +++ b/SparkleShare/Linux/Note.cs @@ -56,6 +56,9 @@ namespace SparkleShare { Controller.ShowWindowEvent += delegate { Application.Invoke (delegate { + if (Child != null) + Remove (Child); + CreateNote (); ShowAll (); Present (); From df48c86d98529fd9b347ef1861bab440a0bad4cd Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 26 Feb 2018 16:20:27 +0000 Subject: [PATCH 4/4] sparkles: Remove todo that's already a github issue --- Sparkles/SSHAuthenticationInfo.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sparkles/SSHAuthenticationInfo.cs b/Sparkles/SSHAuthenticationInfo.cs index 87487c3c..0724a241 100644 --- a/Sparkles/SSHAuthenticationInfo.cs +++ b/Sparkles/SSHAuthenticationInfo.cs @@ -34,10 +34,9 @@ namespace Sparkles { public string KnownHostsFilePath { get; private set; } - readonly string Path; - // TODO: Store keys in the platform's secure key store + public SSHAuthenticationInfo () { Path = IO.Path.Combine (Configuration.DefaultConfiguration.DirectoryPath, "ssh");