mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
gtkapplication: Remove deprecated API
This commit is contained in:
parent
700300eb81
commit
e0d50233f6
@ -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
|
||||
|
@ -883,83 +883,6 @@ gtk_application_update_accels (GtkApplication *application)
|
||||
_gtk_window_notify_keys_changed (l->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user