[gnome-tetravex] Add Ctrl-P shortcut for pausing.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Add Ctrl-P shortcut for pausing.
- Date: Mon, 16 Sep 2019 23:39:28 +0000 (UTC)
commit cc3bce3d162f2027c4ee42d4fc566f0c8afea8a9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Sep 17 01:15:00 2019 +0200
Add Ctrl-P shortcut for pausing.
I think my keyboard does
not have a Pause button.
src/gnome-tetravex.vala | 18 ++++++++++--------
src/help-overlay.ui | 2 +-
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index 8efe229..b9657e8 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -88,14 +88,16 @@ private class Tetravex : Gtk.Application
Window.set_default_icon_name ("org.gnome.Tetravex");
add_action_entries (action_entries, this);
- set_accels_for_action ("app.new-game", {"<Primary>n"});
- set_accels_for_action ("app.pause", {"Pause"});
- set_accels_for_action ("app.help", {"F1"});
- set_accels_for_action ("app.quit", {"<Primary>q", "<Primary>w"});
- set_accels_for_action ("app.move-up", {"<Primary>Up"});
- set_accels_for_action ("app.move-down", {"<Primary>Down"});
- set_accels_for_action ("app.move-left", {"<Primary>Left"});
- set_accels_for_action ("app.move-right", {"<Primary>Right"});
+ set_accels_for_action ("app.new-game", {"<Primary>n" });
+ set_accels_for_action ("app.pause", {"<Primary>p",
+ "Pause" });
+ set_accels_for_action ("app.help", { "F1" });
+ set_accels_for_action ("app.quit", {"<Primary>q",
+ "<Primary>w" });
+ set_accels_for_action ("app.move-up", {"<Primary>Up" });
+ set_accels_for_action ("app.move-down", {"<Primary>Down" });
+ set_accels_for_action ("app.move-left", {"<Primary>Left" });
+ set_accels_for_action ("app.move-right", {"<Primary>Right" });
Builder builder = new Builder.from_resource ("/org/gnome/Tetravex/gnome-tetravex.ui");
diff --git a/src/help-overlay.ui b/src/help-overlay.ui
index a7186fe..ab7faf9 100644
--- a/src/help-overlay.ui
+++ b/src/help-overlay.ui
@@ -19,7 +19,7 @@
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
- <property name="accelerator">Pause</property>
+ <property name="accelerator"><Ctrl>P Pause</property>
<property name="title" translatable="yes" context="shortcut window">Pause the game</property>
</object>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]