From 29971b0cc9b5035235ffcc48c34fb99cbf396534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Wilmet?= Date: Sun, 10 Apr 2016 12:28:14 +0200 Subject: [PATCH] app: don't use deprecated function gtk_application_add_accelerator() is deprecated, but was still used inside IGNORE_DEPRECATIONS's. https://bugzilla.gnome.org/show_bug.cgi?id=764846 --- gtk/gtkapplication.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index 48a4a891cb..fa6e99e2ef 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -810,10 +810,15 @@ extract_accel_from_menu_item (GMenuModel *model, } g_object_unref (iter); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (accel && action) - gtk_application_add_accelerator (app, accel, action, target); - G_GNUC_END_IGNORE_DEPRECATIONS + { + const gchar *accels[2] = { accel, NULL }; + gchar *detailed_action_name; + + detailed_action_name = g_action_print_detailed_name (action, target); + gtk_application_set_accels_for_action (app, detailed_action_name, accels); + g_free (detailed_action_name); + } if (target) g_variant_unref (target);