linux about: fix window close keyboard shortcuts
This commit is contained in:
parent
4dfafdb2a7
commit
94f2d744fe
|
@ -32,11 +32,6 @@ namespace SparkleShare {
|
|||
|
||||
public SparkleAbout () : base ("")
|
||||
{
|
||||
DeleteEvent += delegate (object o, DeleteEventArgs args) {
|
||||
Controller.WindowClosed ();
|
||||
args.RetVal = true;
|
||||
};
|
||||
|
||||
DefaultSize = new Gdk.Size (600, 260);
|
||||
Resizable = false;
|
||||
BorderWidth = 0;
|
||||
|
@ -56,6 +51,19 @@ namespace SparkleShare {
|
|||
CreateAbout ();
|
||||
|
||||
|
||||
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 {
|
||||
HideAll ();
|
||||
|
|
|
@ -64,8 +64,7 @@ namespace SparkleShare {
|
|||
|
||||
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) {
|
||||
(args.Event.State == Gdk.ModifierType.ControlMask && args.Event.Key == Gdk.Key.w)) {
|
||||
|
||||
Controller.WindowClosed ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue