linux note: Add template for Linux UI for adding a note
This commit is contained in:
parent
9a4373c834
commit
2600f8a43f
1
News.txt
1
News.txt
|
@ -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):
|
||||
|
|
|
@ -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 \
|
||||
|
|
73
SparkleShare/Linux/SparkleNote.cs
Executable file
73
SparkleShare/Linux/SparkleNote.cs
Executable 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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
|
||||
using MonoMac.AppKit;
|
||||
using MonoMac.Foundation;
|
||||
|
|
Loading…
Reference in a new issue