[gtk+/wip/baedert/box: 89/108] gtkapplication: Remove deprecated API



commit bf1bca6c809ad69db063e6739844e1ca8c160cd0
Author: Timm Bäder <mail baedert org>
Date:   Fri Oct 14 22:07:36 2016 +0200

    gtkapplication: Remove deprecated API

 docs/reference/gtk/gtk4-sections.txt |    3 -
 gtk/gtkapplication.c                 |   77 ----------------------------------
 gtk/gtkapplication.h                 |   11 -----
 3 files changed, 0 insertions(+), 91 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 356391e..aa726c7 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -6820,9 +6820,6 @@ gtk_application_get_menubar
 gtk_application_set_menubar
 gtk_application_get_menu_by_id
 
-gtk_application_add_accelerator
-gtk_application_remove_accelerator
-
 gtk_application_list_action_descriptions
 gtk_application_get_accels_for_action
 gtk_application_set_accels_for_action
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index d18ff2b..ea3eba3 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -884,83 +884,6 @@ gtk_application_update_accels (GtkApplication *application)
 }
 
 /**
- * gtk_application_add_accelerator:
- * @application: a #GtkApplication
- * @accelerator: accelerator string
- * @action_name: the name of the action to activate
- * @parameter: (allow-none): parameter to pass when activating the action,
- *   or %NULL if the action does not accept an activation parameter
- *
- * Installs an accelerator that will cause the named action
- * to be activated when the key combination specificed by @accelerator
- * is pressed.
- *
- * @accelerator must be a string that can be parsed by gtk_accelerator_parse(),
- * e.g. "<Primary>q" or “<Control><Alt>p”.
- *
- * @action_name must be the name of an action as it would be used
- * in the app menu, i.e. actions that have been added to the application
- * are referred to with an “app.” prefix, and window-specific actions
- * with a “win.” prefix.
- *
- * GtkApplication also extracts accelerators out of “accel” attributes
- * in the #GMenuModels passed to gtk_application_set_app_menu() and
- * gtk_application_set_menubar(), which is usually more convenient
- * 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,
-                                 const gchar    *accelerator,
-                                 const gchar    *action_name,
-                                 GVariant       *parameter)
-{
-  const gchar *accelerators[2] = { accelerator, NULL };
-  gchar *detailed_action_name;
-
-  g_return_if_fail (GTK_IS_APPLICATION (application));
-  g_return_if_fail (accelerator != NULL);
-  g_return_if_fail (action_name != NULL);
-
-  detailed_action_name = g_action_print_detailed_name (action_name, parameter);
-  gtk_application_set_accels_for_action (application, detailed_action_name, accelerators);
-  g_free (detailed_action_name);
-}
-
-/**
- * gtk_application_remove_accelerator:
- * @application: a #GtkApplication
- * @action_name: the name of the action to activate
- * @parameter: (allow-none): parameter to pass when activating the action,
- *   or %NULL if the action does not accept an activation parameter
- *
- * Removes an accelerator that has been previously added
- * 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,
-                                    const gchar    *action_name,
-                                    GVariant       *parameter)
-{
-  const gchar *accelerators[1] = { NULL };
-  gchar *detailed_action_name;
-
-  g_return_if_fail (GTK_IS_APPLICATION (application));
-  g_return_if_fail (action_name != NULL);
-
-  detailed_action_name = g_action_print_detailed_name (action_name, parameter);
-  gtk_application_set_accels_for_action (application, detailed_action_name, accelerators);
-  g_free (detailed_action_name);
-}
-
-/**
  * gtk_application_prefers_app_menu:
  * @application: a #GtkApplication
  *
diff --git a/gtk/gtkapplication.h b/gtk/gtkapplication.h
index ad6ac06..3b7cb1a 100644
--- a/gtk/gtkapplication.h
+++ b/gtk/gtkapplication.h
@@ -101,17 +101,6 @@ GDK_AVAILABLE_IN_3_4
 void             gtk_application_set_menubar   (GtkApplication    *application,
                                                 GMenuModel        *menubar);
 
-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_DEPRECATED_IN_3_14_FOR(gtk_application_set_accels_for_action)
-void             gtk_application_remove_accelerator (GtkApplication *application,
-                                                     const gchar    *action_name,
-                                                     GVariant       *parameter);
-
 typedef enum
 {
   GTK_APPLICATION_INHIBIT_LOGOUT  = (1 << 0),


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