[frogr] Replaced deprecated code from extract_accel_from_menu_item



commit 7ebaf132f82bb2208e45bd00e25bc90981facb77
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Wed Dec 24 10:46:43 2014 +0000

    Replaced deprecated code from extract_accel_from_menu_item

 src/frogr-main-view.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index a85d34c..04d0646 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -580,10 +580,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
+    {
+#if GTK_CHECK_VERSION (3, 12, 0)
+      const gchar *accels[2] = { accel, NULL };
+      gtk_application_set_accels_for_action (app, action, accels);
+#else
+      gtk_application_add_accelerator (app, accel, action, target);
+#endif
+    }
 
   if (target)
     g_variant_unref (target);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]