[atomix] Fixed keyboard shortcuts
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atomix] Fixed keyboard shortcuts
- Date: Mon, 11 Mar 2019 19:40:47 +0000 (UTC)
commit c83439e5de4446a0cb1d9e28abd3aafc84c34f81
Author: Robert Roth <robert roth bee-tf ro>
Date: Mon Mar 11 21:40:21 2019 +0200
Fixed keyboard shortcuts
src/main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/main.c b/src/main.c
index e9ac822..6866144 100644
--- a/src/main.c
+++ b/src/main.c
@@ -632,6 +632,16 @@ static AtomixApp *create_gui (GApplication *app_instance)
headerbar = GTK_WIDGET (gtk_builder_get_object(builder, "headerbar"));
gtk_application_add_window (GTK_APPLICATION (app->app_instance), GTK_WINDOW (app->mainwin));
+
+ const char *new_game_accels[] = {"<Primary>N", NULL};
+ gtk_application_set_accels_for_action (GTK_APPLICATION (app->app_instance), "win.GameNew",
new_game_accels);
+ const char *pause_game_accels[] = {"<Primary>P", NULL};
+ gtk_application_set_accels_for_action (GTK_APPLICATION (app->app_instance), "win.GamePause",
pause_game_accels);
+ const char *skip_level_accels[] = {"<Primary>S", NULL};
+ gtk_application_set_accels_for_action (GTK_APPLICATION (app->app_instance), "win.LevelSkip",
skip_level_accels);
+ const char *undo_move_accels[] = {"<Primary>Z", NULL};
+ gtk_application_set_accels_for_action (GTK_APPLICATION (app->app_instance), "win.GameUndo",
undo_move_accels);
+
gtk_window_set_titlebar (GTK_WINDOW (app->mainwin), headerbar);
GMenu * menu = G_MENU (gtk_builder_get_object (builder, "primary-menu"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]