linux note: Add template for Linux UI for adding a note

This commit is contained in:
Hylke Bons 2014-11-02 13:23:32 +00:00
parent 9a4373c834
commit 2600f8a43f
4 changed files with 76 additions and 1 deletions

View file

@ -7,6 +7,7 @@
- Update certificate for Gravatar
- Resizable "Recent Changes" window on Windows
- Several stability fixes
- Improvements to filesystem watcher and exclude list
1.4.0 for Linux, Mac and Windows (Sun Apr 20, 2014):

View file

@ -19,6 +19,7 @@ SOURCES = \
../SparkleExtensions.cs \
../SparkleInvite.cs \
../SparkleKeys.cs \
../SparkleNoteController.cs \
../SparklePlugin.cs \
../SparkleSetupController.cs \
../SparkleStatusIconController.cs \
@ -26,6 +27,7 @@ SOURCES = \
SparkleBubbles.cs \
SparkleController.cs \
SparkleEventLog.cs \
SparkleNote.cs \
SparkleSetup.cs \
SparkleSetupWindow.cs \
SparkleStatusIcon.cs \

View file

@ -0,0 +1,73 @@
// SparkleShare, a collaboration and sharing tool.
// Copyright (C) 2010 Hylke Bons (hylkebons@gmail.com)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see (http://www.gnu.org/licenses/).
using System;
using Gtk;
namespace SparkleShare {
public class SparkleAbout : Window {
public SparkleNoteController Controller = new SparkleNoteController ();
public SparkleAbout () : base ("Sync")
{
SetWmclass ("SparkleShare", "SparkleShare");
IconName = "sparkleshare";
Resizable = false;
WindowPosition = WindowPosition.Center;
SetSizeRequest (480, 240);
DeleteEvent += delegate (object o, DeleteEventArgs args) {
Controller.WindowClosed ();
args.RetVal = true;
};
KeyPressEvent += delegate (object o, KeyPressEventArgs args) {
if (args.Event.Key == Gdk.Key.Escape ||
(args.Event.State == Gdk.ModifierType.ControlMask && args.Event.Key == Gdk.Key.w)) {
Controller.WindowClosed ();
}
};
Controller.HideWindowEvent += delegate {
Application.Invoke (delegate { Hide (); });
};
Controller.ShowWindowEvent += delegate {
Application.Invoke (delegate {
CreateNote ();
ShowAll ();
Present ();
});
};
CreateNote ();
}
private void CreateNote ()
{
// TODO
}
}
}

View file

@ -17,7 +17,6 @@
using System;
using System.Drawing;
using System.IO;
using MonoMac.AppKit;
using MonoMac.Foundation;