Commit b71116d9 authored by Michael Catanzaro's avatar Michael Catanzaro

Fix New Game, Help, and Quit accelerators

These broke in
50a5a071.

Fixes #10 and also fixes #11
parent 5caaee84
Pipeline #140767 failed with stage
in 1 minute and 7 seconds
......@@ -6,7 +6,6 @@
<item>
<attribute name="label" translatable="yes">_New Game</attribute>
<attribute name="action">app.new-game</attribute>
<attribute name="accel">&lt;Primary&gt;n</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Scores</attribute>
......@@ -21,7 +20,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 Robots</attribute>
......
......@@ -344,6 +344,9 @@ activate (GtkApplication *app, gpointer user_data)
GtkSizeGroup *size_group;
GtkStyleContext *style_context;
GamesScoresDirectoryImporter *importer;
const gchar *new_game_accels[] = { "<Primary>n", NULL };
const gchar *help_accels[] = { "F1", NULL };
const gchar *quit_accels[] = { "<Primary>q", NULL };
headerbar = gtk_header_bar_new ();
gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar), _("Robots"));
......@@ -368,6 +371,10 @@ activate (GtkApplication *app, gpointer user_data)
g_action_map_add_action_entries (G_ACTION_MAP (app), app_entries, G_N_ELEMENTS (app_entries), app);
g_action_map_add_action_entries (G_ACTION_MAP (window), win_entries, G_N_ELEMENTS (win_entries), app);
gtk_application_set_accels_for_action (app, "app.new-game", new_game_accels);
gtk_application_set_accels_for_action (app, "app.help", help_accels);
gtk_application_set_accels_for_action (app, "app.quit", quit_accels);
make_cursors ();
game_area = gtk_drawing_area_new ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment