[gnome-mahjongg] Add a keyboard shortcut.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mahjongg] Add a keyboard shortcut.
- Date: Fri, 18 Sep 2020 16:17:12 +0000 (UTC)
commit 666f4148699f0ab1f683eef8a04b86af16b9d587
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Sep 18 18:14:44 2020 +0200
Add a keyboard shortcut.
data/help-overlay.ui | 2 +-
src/gnome-mahjongg.vala | 16 +++++++++-------
2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/data/help-overlay.ui b/data/help-overlay.ui
index a986caa..1ca3e54 100644
--- a/data/help-overlay.ui
+++ b/data/help-overlay.ui
@@ -20,7 +20,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>
diff --git a/src/gnome-mahjongg.vala b/src/gnome-mahjongg.vala
index a125c55..e91273f 100644
--- a/src/gnome-mahjongg.vala
+++ b/src/gnome-mahjongg.vala
@@ -62,13 +62,15 @@ public class Mahjongg : Gtk.Application
base.startup ();
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.hint", {"<Primary>h"});
- set_accels_for_action ("app.undo", {"<Primary>z"});
- set_accels_for_action ("app.redo", {"<Primary><Shift>z"});
- set_accels_for_action ("app.help", {"F1"});
- set_accels_for_action ("app.quit", {"<Primary>q", "<Primary>w"});
+ set_accels_for_action ("app.new-game", { "<Primary>n" });
+ set_accels_for_action ("app.pause", { "<Primary>p",
+ "Pause" });
+ set_accels_for_action ("app.hint", { "<Primary>h" });
+ set_accels_for_action ("app.undo", { "<Primary>z" });
+ set_accels_for_action ("app.redo", { "<Shift><Primary>z" });
+ set_accels_for_action ("app.help", { "F1" });
+ set_accels_for_action ("app.quit", { "<Primary>q",
+ "<Primary>w" });
settings = new Settings ("org.gnome.Mahjongg");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]