[tali] Fix accelerators for Help and New Game
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tali] Fix accelerators for Help and New Game
- Date: Mon, 10 Dec 2018 19:49:21 +0000 (UTC)
commit 3f5fd5d9f0d51f025762ba98e75e9c9a5d18a6b2
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Mon Dec 10 14:40:09 2018 -0500
Fix accelerators for Help and New Game
data/tali-menus.ui | 1 -
src/gyahtzee.c | 9 +++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/data/tali-menus.ui b/data/tali-menus.ui
index bf02785..85c1e05 100644
--- a/data/tali-menus.ui
+++ b/data/tali-menus.ui
@@ -24,7 +24,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 Tali</attribute>
diff --git a/src/gyahtzee.c b/src/gyahtzee.c
index 0485df4..a69a42b 100644
--- a/src/gyahtzee.c
+++ b/src/gyahtzee.c
@@ -742,10 +742,15 @@ GyahtzeeCreateMainWindow (GApplication *app, gpointer user_data)
G_CALLBACK (key_press), NULL);
g_action_map_add_action_entries (G_ACTION_MAP (application), app_entries, G_N_ELEMENTS (app_entries),
application);
- const gchar *vaccels_undo[] = {"<Primary>z", NULL};
- gtk_application_set_accels_for_action (application, "app.undo", vaccels_undo);
+ const gchar *vaccels_help[] = {"F1", NULL};
+ const gchar *vaccels_new[] = {"<Primary>n", NULL};
const gchar *vaccels_roll[] = {"<Primary>r", NULL};
+ const gchar *vaccels_undo[] = {"<Primary>z", NULL};
+
+ gtk_application_set_accels_for_action (application, "app.help", vaccels_help);
+ gtk_application_set_accels_for_action (application, "app.new-game", vaccels_new);
gtk_application_set_accels_for_action (application, "app.roll", vaccels_roll);
+ gtk_application_set_accels_for_action (application, "app.undo", vaccels_undo);
scores_action = g_action_map_lookup_action (G_ACTION_MAP (application), "scores");
undo_action = g_action_map_lookup_action (G_ACTION_MAP (application), "undo");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]