[tali] Use gtk_application_set_accels_for_action ().
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tali] Use gtk_application_set_accels_for_action ().
- Date: Sun, 22 Feb 2015 20:30:06 +0000 (UTC)
commit 7ac72ff9fabc87d31c4fa6389f79de76cb2763d3
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sun Feb 22 21:19:08 2015 +0100
Use gtk_application_set_accels_for_action ().
src/gyahtzee.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gyahtzee.c b/src/gyahtzee.c
index 76621f2..450e4d8 100644
--- a/src/gyahtzee.c
+++ b/src/gyahtzee.c
@@ -738,8 +738,10 @@ 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);
- gtk_application_add_accelerator (application, "<Primary>z", "app.undo", NULL);
- gtk_application_add_accelerator (application, "<Primary>r", "app.roll", NULL);
+ const gchar *vaccels_undo[] = {"<Primary>z", NULL};
+ gtk_application_set_accels_for_action (application, "app.undo", vaccels_undo);
+ const gchar *vaccels_roll[] = {"<Primary>r", NULL};
+ gtk_application_set_accels_for_action (application, "app.roll", vaccels_roll);
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]