[gnome-2048/app-menu] Fix broken shortcuts.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048/app-menu] Fix broken shortcuts.
- Date: Tue, 8 Jan 2019 14:47:24 +0000 (UTC)
commit 8faeac2061d80ea180f1d89ffab9a8eae686fd18
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Jan 8 15:28:53 2019 +0100
Fix broken shortcuts.
data/mainwindow.ui | 3 ---
src/application.vala | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/data/mainwindow.ui b/data/mainwindow.ui
index e3afd5a..4e07785 100644
--- a/data/mainwindow.ui
+++ b/data/mainwindow.ui
@@ -120,7 +120,6 @@
<item>
<attribute name="label" translatable="yes">New Game</attribute>
<attribute name="action">app.new-game</attribute>
- <attribute name="accel"><Primary>n</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Scores</attribute>
@@ -135,12 +134,10 @@
<!-- 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 2048</attribute>
<attribute name="action">app.about</attribute>
- <attribute name="accel"><Primary><Shift>F1</attribute>
</item>
</section>
</menu>
diff --git a/src/application.vala b/src/application.vala
index 5bc651c..9d3838c 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -133,6 +133,9 @@ public class Application : Gtk.Application
_create_scores ();
+ set_accels_for_action ("app.new-game", { "<Primary>n" });
+ set_accels_for_action ("app.about", { "<Shift><Primary>F1" });
+
_window.show_all ();
_game_restored = _game.restore_game ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]