From af3572f36a17477d43c72e361db8ad7a49be1927 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sun, 3 Aug 2014 13:24:16 -0700 Subject: [PATCH] Replace deprecated gtk_application_add_accelerator With new gtk_application_set_accels_for_action. --- gtk/gtkapplication-quartz.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gtk/gtkapplication-quartz.c b/gtk/gtkapplication-quartz.c index 6a11783e28..9794d7b862 100644 --- a/gtk/gtkapplication-quartz.c +++ b/gtk/gtkapplication-quartz.c @@ -124,6 +124,10 @@ gtk_application_impl_quartz_startup (GtkApplicationImpl *impl, GtkApplicationImplQuartz *quartz = (GtkApplicationImplQuartz *) impl; GSimpleActionGroup *gtkinternal; GMenuModel *app_menu; + const gchar *pref_accel[] = {"comma", NULL}; + const gchar *hide_others_accel[] = {"h", NULL}; + const gchar *hide_accel[] = {"h", NULL}; + const gchar *quit_accel[] = {"q", NULL}; if (register_session) { @@ -135,10 +139,10 @@ gtk_application_impl_quartz_startup (GtkApplicationImpl *impl, gtk_action_muxer_set_parent (quartz->muxer, gtk_application_get_action_muxer (impl->application)); /* Add the default accels */ - gtk_application_add_accelerator (impl->application, "comma", "app.preferences", NULL); - gtk_application_add_accelerator (impl->application, "h", "gtkinternal.hide-others", NULL); - gtk_application_add_accelerator (impl->application, "h", "gtkinternal.hide", NULL); - gtk_application_add_accelerator (impl->application, "q", "app.quit", NULL); + gtk_application_set_accels_for_action (impl->application, "app.preferences", pref_accel); + gtk_application_set_accels_for_action (impl->application, "gtkinternal.hide-others", hide_others_accel); + gtk_application_set_accels_for_action (impl->application, "gtkinternal.hide", hide_accel); + gtk_application_set_accels_for_action (impl->application, "app.quit", quit_accel); /* and put code behind the 'special' accels */ gtkinternal = g_simple_action_group_new ();