From c1182debd02f1386af99f2ea09ad557642e0a1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Thu, 8 Oct 2009 17:44:21 +0200 Subject: [PATCH] Remove deprecated GtkAction functions --- gtk/gtk.symbols | 15 ------ gtk/gtkaction.c | 134 ------------------------------------------------ gtk/gtkaction.h | 12 ----- 3 files changed, 161 deletions(-) diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index 21f13bd407..8b94cbf3f7 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -142,21 +142,12 @@ gtk_accessible_get_widget #if IN_FILE(__GTK_ACTION_C__) gtk_action_activate gtk_action_block_activate -#ifndef GTK_DISABLE_DEPRECATED -gtk_action_block_activate_from -#endif gtk_action_connect_accelerator -#ifndef GTK_DISABLE_DEPRECATED -gtk_action_connect_proxy -#endif gtk_action_create_icon gtk_action_create_menu_item gtk_action_create_tool_item gtk_action_create_menu gtk_action_disconnect_accelerator -#ifndef GTK_DISABLE_DEPRECATED -gtk_action_disconnect_proxy -#endif gtk_action_get_always_show_image gtk_action_get_accel_closure gtk_action_get_accel_path @@ -164,9 +155,6 @@ gtk_action_get_gicon gtk_action_get_label gtk_action_get_name gtk_action_get_proxies -#ifndef GTK_DISABLE_DEPRECATED -gtk_widget_get_action -#endif gtk_action_get_icon_name gtk_action_get_is_important gtk_action_get_sensitive @@ -195,9 +183,6 @@ gtk_action_set_visible gtk_action_set_visible_horizontal gtk_action_set_visible_vertical gtk_action_unblock_activate -#ifndef GTK_DISABLE_DEPRECATED -gtk_action_unblock_activate_from -#endif #endif #endif diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 1cb1cecaae..062bc456ec 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -959,58 +959,6 @@ _gtk_action_remove_from_proxy_list (GtkAction *action, GTK_ACTION_GET_CLASS (action)->disconnect_proxy (action, proxy); } -/** - * gtk_action_connect_proxy: - * @action: the action object - * @proxy: the proxy widget - * - * Connects a widget to an action object as a proxy. Synchronises - * various properties of the action with the widget (such as label - * text, icon, tooltip, etc), and attaches a callback so that the - * action gets activated when the proxy widget does. - * - * If the widget is already connected to an action, it is disconnected - * first. - * - * Since: 2.4 - * - * Deprecated: 2.16: Use gtk_activatable_set_related_action() instead. - */ -void -gtk_action_connect_proxy (GtkAction *action, - GtkWidget *proxy) -{ - g_return_if_fail (GTK_IS_ACTION (action)); - g_return_if_fail (GTK_IS_WIDGET (proxy)); - g_return_if_fail (GTK_IS_ACTIVATABLE (proxy)); - - gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (proxy), TRUE); - - gtk_activatable_set_related_action (GTK_ACTIVATABLE (proxy), action); -} - -/** - * gtk_action_disconnect_proxy: - * @action: the action object - * @proxy: the proxy widget - * - * Disconnects a proxy widget from an action. - * Does not destroy the widget, however. - * - * Since: 2.4 - * - * Deprecated: 2.16: Use gtk_activatable_set_related_action() instead. - */ -void -gtk_action_disconnect_proxy (GtkAction *action, - GtkWidget *proxy) -{ - g_return_if_fail (GTK_IS_ACTION (action)); - g_return_if_fail (GTK_IS_WIDGET (proxy)); - - gtk_activatable_set_related_action (GTK_ACTIVATABLE (proxy), NULL); -} - /** * gtk_action_get_proxies: * @action: the action object @@ -1031,32 +979,6 @@ gtk_action_get_proxies (GtkAction *action) return action->private_data->proxies; } - -/** - * gtk_widget_get_action: - * @widget: a #GtkWidget - * - * Returns the #GtkAction that @widget is a proxy for. - * See also gtk_action_get_proxies(). - * - * Returns: the action that a widget is a proxy for, or - * %NULL, if it is not attached to an action. - * - * Since: 2.10 - * - * Deprecated: 2.16: Use gtk_activatable_get_related_action() instead. - */ -GtkAction* -gtk_widget_get_action (GtkWidget *widget) -{ - g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); - - if (GTK_IS_ACTIVATABLE (widget)) - return gtk_activatable_get_related_action (GTK_ACTIVATABLE (widget)); - - return NULL; -} - /** * gtk_action_get_name: * @action: the action object @@ -1695,62 +1617,6 @@ gtk_action_get_gicon (GtkAction *action) return action->private_data->gicon; } -/** - * gtk_action_block_activate_from: - * @action: the action object - * @proxy: a proxy widget - * - * Disables calls to the gtk_action_activate() - * function by signals on the given proxy widget. This is used to - * break notification loops for things like check or radio actions. - * - * This function is intended for use by action implementations. - * - * Since: 2.4 - * - * Deprecated: 2.16: activatables are now responsible for activating the - * action directly so this doesnt apply anymore. - */ -void -gtk_action_block_activate_from (GtkAction *action, - GtkWidget *proxy) -{ - g_return_if_fail (GTK_IS_ACTION (action)); - - g_signal_handlers_block_by_func (proxy, G_CALLBACK (gtk_action_activate), - action); - - gtk_action_block_activate (action); -} - -/** - * gtk_action_unblock_activate_from: - * @action: the action object - * @proxy: a proxy widget - * - * Re-enables calls to the gtk_action_activate() - * function by signals on the given proxy widget. This undoes the - * blocking done by gtk_action_block_activate_from(). - * - * This function is intended for use by action implementations. - * - * Since: 2.4 - * - * Deprecated: 2.16: activatables are now responsible for activating the - * action directly so this doesnt apply anymore. - */ -void -gtk_action_unblock_activate_from (GtkAction *action, - GtkWidget *proxy) -{ - g_return_if_fail (GTK_IS_ACTION (action)); - - g_signal_handlers_unblock_by_func (proxy, G_CALLBACK (gtk_action_activate), - action); - - gtk_action_unblock_activate (action); -} - static void closure_accel_activate (GClosure *closure, GValue *return_value, diff --git a/gtk/gtkaction.h b/gtk/gtkaction.h index 08e051af93..92ba1fed2b 100644 --- a/gtk/gtkaction.h +++ b/gtk/gtkaction.h @@ -110,18 +110,6 @@ void gtk_action_connect_accelerator (GtkAction *action); void gtk_action_disconnect_accelerator (GtkAction *action); G_CONST_RETURN gchar *gtk_action_get_accel_path (GtkAction *action); GClosure *gtk_action_get_accel_closure (GtkAction *action); - -#ifndef GTK_DISABLE_DEPRECATED -GtkAction *gtk_widget_get_action (GtkWidget *widget); -void gtk_action_connect_proxy (GtkAction *action, - GtkWidget *proxy); -void gtk_action_disconnect_proxy (GtkAction *action, - GtkWidget *proxy); -void gtk_action_block_activate_from (GtkAction *action, - GtkWidget *proxy); -void gtk_action_unblock_activate_from (GtkAction *action, - GtkWidget *proxy); -#endif /* GTK_DISABLE_DEPRECATED */ void gtk_action_block_activate (GtkAction *action); void gtk_action_unblock_activate (GtkAction *action);