[gnome-klotski] Readd some shortcut.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-klotski] Readd some shortcut.
- Date: Sat, 4 Jan 2020 11:15:47 +0000 (UTC)
commit 90d1e0b1db07dd56d7101572702db45d184dc5c0
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Jan 4 12:12:34 2020 +0100
Readd some shortcut.
Fixes #11.
data/klotski.ui | 1 -
src/gnome-klotski.vala | 21 ++++++++++++++-------
2 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/data/klotski.ui b/data/klotski.ui
index 38aab2d..b51bc10 100644
--- a/data/klotski.ui
+++ b/data/klotski.ui
@@ -28,7 +28,6 @@
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">app.help</attribute>
- <attribute name="accel">F1</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Klotski</attribute>
diff --git a/src/gnome-klotski.vala b/src/gnome-klotski.vala
index 1b8f204..ff0e54d 100644
--- a/src/gnome-klotski.vala
+++ b/src/gnome-klotski.vala
@@ -79,13 +79,20 @@ public class Klotski : Gtk.Application
add_window (new KlotskiWindow ());
- // set_accels_for_action ("win.start-game", {"<Primary>n"}); /* or <Primary>r ? or both ? */
- set_accels_for_action ("win.prev-puzzle", {"Up"}); // TODO
- set_accels_for_action ("win.next-puzzle", {"Down"}); // TODO a weird behaviour exists when you
first change puzzle pack, then go to
- set_accels_for_action ("win.prev-pack", {"Page_Up"}); // TODO the first/last one, click on a
puzzle, and immediatly hit Up or Down arrows.
- set_accels_for_action ("win.next-pack", {"Page_Down"}); // TODO that makes these keybindings
sometimes act strangely, but they’re good.
-
- set_accels_for_action ("app.quit", {"<Primary>q"});
+ set_accels_for_action ("win.prev-puzzle", {"Up"}); // TODO
+ set_accels_for_action ("win.next-puzzle", {"Down"}); // TODO a weird behaviour exists when
you first change puzzle pack, then go to
+ set_accels_for_action ("win.prev-pack", {"Page_Up"}); // TODO the first/last one, click on a
puzzle, and immediatly hit Up or Down arrows.
+ set_accels_for_action ("win.next-pack", {"Page_Down"}); // TODO that makes these keybindings
sometimes act strangely, but they’re good.
+
+ set_accels_for_action ("win.start-game", { "<Shift><Primary>n",
+ "<Shift><Primary>r" }); // TODO just <Primary>n/r?
+
+ set_accels_for_action ("app.scores", { "<Primary>s", // TODO that's a weird
shortcut
+ "<Shift><Primary>s" });
+ set_accels_for_action ("app.help", { "F1" });
+ set_accels_for_action ("app.about", { "<Shift>F1" });
+ set_accels_for_action ("app.quit", { "<Primary>q",
+ "<Shift><Primary>q" });
}
protected override void activate ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]