[chronojump] chronopicRegister can be closed with Escape key
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] chronopicRegister can be closed with Escape key
- Date: Mon, 10 Oct 2016 22:54:59 +0000 (UTC)
commit 587ddc1e6b227e5540bef4b52034ff1034a3cdcf
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Oct 11 00:54:33 2016 +0200
chronopicRegister can be closed with Escape key
src/gui/chronopicRegister.cs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/gui/chronopicRegister.cs b/src/gui/chronopicRegister.cs
index 5335ab6..d75f0c1 100644
--- a/src/gui/chronopicRegister.cs
+++ b/src/gui/chronopicRegister.cs
@@ -280,6 +280,15 @@ public class ChronopicRegisterWindow
Gtk.Button button = new Gtk.Button("Close");
button.Clicked += new EventHandler(on_button_clicked);
+ //button can be called clicking Escape key
+ Gtk.AccelGroup ag = new Gtk.AccelGroup ();
+ chronopic_register_win.AddAccelGroup (ag);
+
+ button.AddAccelerator
+ ("activate", ag, new Gtk.AccelKey
+ (Gdk.Key.Escape, Gdk.ModifierType.None,
+ Gtk.AccelFlags.Visible));
+
Gtk.HButtonBox hbox = new Gtk.HButtonBox ();
hbox.Add(button);
@@ -288,7 +297,6 @@ public class ChronopicRegisterWindow
private void on_button_clicked(object o, EventArgs args)
{
- //TODO: be called with Escape (accelerator)
chronopic_register_win.Hide();
chronopic_register_win = null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]