[gtk+] Deprecate gtk_application_add_accelerator



commit 7d5bb09b886a88a15eba082fa150e39eb888c5ea
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 6 02:13:06 2014 -0400

    Deprecate gtk_application_add_accelerator
    
    The new gtk_application_set_accels_for_action api is more flexible
    and better.

 gtk/gtkapplication.c |    6 ++++++
 gtk/gtkapplication.h |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 1022037..a074e9e 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -668,8 +668,10 @@ 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 (target)
     g_variant_unref (target);
@@ -1075,6 +1077,8 @@ gtk_application_update_accels (GtkApplication *application)
  * than calling this function for each accelerator.
  *
  * Since: 3.4
+ *
+ * Deprecated: 3.14: Use gtk_application_set_accels_for_action() instead
  */
 void
 gtk_application_add_accelerator (GtkApplication *application,
@@ -1107,6 +1111,8 @@ gtk_application_add_accelerator (GtkApplication *application,
  * with gtk_application_add_accelerator().
  *
  * Since: 3.4
+ *
+ * Deprecated: 3.14: Use gtk_application_set_accels_for_action() instead
  */
 void
 gtk_application_remove_accelerator (GtkApplication *application,
diff --git a/gtk/gtkapplication.h b/gtk/gtkapplication.h
index c08f2dc..7ff13ad 100644
--- a/gtk/gtkapplication.h
+++ b/gtk/gtkapplication.h
@@ -101,12 +101,13 @@ GDK_AVAILABLE_IN_3_4
 void             gtk_application_set_menubar   (GtkApplication    *application,
                                                 GMenuModel        *menubar);
 
-GDK_AVAILABLE_IN_3_4
+GDK_DEPRECATED_IN_3_14_FOR(gtk_application_set_accels_for_action)
 void             gtk_application_add_accelerator    (GtkApplication  *application,
                                                      const gchar     *accelerator,
                                                      const gchar     *action_name,
                                                      GVariant        *parameter);
-GDK_AVAILABLE_IN_3_4
+
+GDK_DEPRECATED_IN_3_14_FOR(gtk_application_set_accels_for_action)
 void             gtk_application_remove_accelerator (GtkApplication *application,
                                                      const gchar    *action_name,
                                                      GVariant       *parameter);


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