commit
d1c9169c14
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see (http://www.gnu.org/licenses/).
|
// along with this program. If not, see (http://www.gnu.org/licenses/).
|
||||||
|
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
using Gtk;
|
using Gtk;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
@ -55,6 +56,9 @@ namespace SparkleShare {
|
||||||
|
|
||||||
Controller.ShowWindowEvent += delegate {
|
Controller.ShowWindowEvent += delegate {
|
||||||
Application.Invoke (delegate {
|
Application.Invoke (delegate {
|
||||||
|
if (Child != null)
|
||||||
|
Remove (Child);
|
||||||
|
|
||||||
CreateNote ();
|
CreateNote ();
|
||||||
ShowAll ();
|
ShowAll ();
|
||||||
Present ();
|
Present ();
|
||||||
|
@ -64,14 +68,17 @@ namespace SparkleShare {
|
||||||
Controller.UpdateTitleEvent += delegate (string title) {
|
Controller.UpdateTitleEvent += delegate (string title) {
|
||||||
Application.Invoke (delegate { Title = title; });
|
Application.Invoke (delegate { Title = title; });
|
||||||
};
|
};
|
||||||
|
|
||||||
CreateNote ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void 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
|
/* TODO: Style the entry neatly, multiple lines, and add placeholder text
|
||||||
string balloon_image_path = new string [] { UserInterface.AssetsPath, "pixmaps", "text-balloon.png" }.Combine ();
|
string balloon_image_path = new string [] { UserInterface.AssetsPath, "pixmaps", "text-balloon.png" }.Combine ();
|
||||||
|
@ -96,8 +103,9 @@ namespace SparkleShare {
|
||||||
|
|
||||||
|
|
||||||
var cancel_button = new Button ("Cancel");
|
var cancel_button = new Button ("Cancel");
|
||||||
var sync_button = new Button ("Sync"); // TODO: Make default button
|
var sync_button = new Button ("Sync") { CanDefault = true };
|
||||||
sync_button.CanDefault = true;
|
|
||||||
|
sync_button.StyleContext.AddClass ("suggested-action");
|
||||||
|
|
||||||
cancel_button.Clicked += delegate { Controller.CancelClicked (); };
|
cancel_button.Clicked += delegate { Controller.CancelClicked (); };
|
||||||
sync_button.Clicked += delegate { Controller.SyncClicked (balloon.Buffer.Text); };
|
sync_button.Clicked += delegate { Controller.SyncClicked (balloon.Buffer.Text); };
|
||||||
|
|
|
@ -34,10 +34,9 @@ namespace Sparkles {
|
||||||
|
|
||||||
public string KnownHostsFilePath { get; private set; }
|
public string KnownHostsFilePath { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
readonly string Path;
|
readonly string Path;
|
||||||
|
|
||||||
// TODO: Store keys in the platform's secure key store
|
|
||||||
public SSHAuthenticationInfo ()
|
public SSHAuthenticationInfo ()
|
||||||
{
|
{
|
||||||
Path = IO.Path.Combine (Configuration.DefaultConfiguration.DirectoryPath, "ssh");
|
Path = IO.Path.Combine (Configuration.DefaultConfiguration.DirectoryPath, "ssh");
|
||||||
|
|
Loading…
Reference in a new issue