Commit f23bdf7a authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

New function to get the action for a proxy. (#326288)

2006-01-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkaction.h:
	* gtk/gtkaction.c (gtk_widget_get_action): New function to
	get the action for a proxy.  (#326288)
parent eb590e84
2006-01-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_widget_get_action): New function to
get the action for a proxy. (#326288)
* gtk/gtkaction.c: Go back to the old key for attaching the
action to the proxy. (#326288, Diego González)
......
2006-01-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_widget_get_action): New function to
get the action for a proxy. (#326288)
* gtk/gtkaction.c: Go back to the old key for attaching the
action to the proxy. (#326288, Diego González)
......
2006-01-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add gtk_widget_get_action
2005-12-30 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Add gdk_cairo_set_source_pixmap
......
......@@ -4728,6 +4728,7 @@ gtk_widget_get_no_show_all
gtk_widget_list_mnemonic_labels
gtk_widget_add_mnemonic_label
gtk_widget_remove_mnemonic_label
gtk_widget_get_action
<SUBSECTION>
gtk_requisition_copy
gtk_requisition_free
......
......@@ -146,6 +146,7 @@ gtk_action_get_accel_closure
gtk_action_get_accel_path
gtk_action_get_name
gtk_action_get_proxies
gtk_widget_get_action
gtk_action_get_sensitive
gtk_action_get_type G_GNUC_CONST
gtk_action_get_visible
......
......@@ -980,9 +980,10 @@ gtk_action_disconnect_proxy (GtkAction *action,
* @action: the action object
*
* Returns the proxy widgets for an action.
* See also gtk_widget_get_action().
*
* Return value: a #GSList of proxy widgets. The list is owned by the action and
* must not be modified.
* Return value: a #GSList of proxy widgets. The list is owned by GTK+
* and must not be modified.
*
* Since: 2.4
**/
......@@ -995,6 +996,27 @@ gtk_action_get_proxies (GtkAction *action)
}
/**
* 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
*/
GtkAction*
gtk_widget_get_action (GtkWidget *widget)
{
g_return_val_if_fail (GTK_IS_WIDGET (action), NULL);
return g_object_get_qdata (G_OBJECT (widget), quark_gtk_action_proxy);
}
/**
* gtk_action_get_name:
* @action: the action object
......
......@@ -104,6 +104,7 @@ void gtk_action_connect_proxy (GtkAction *action,
void gtk_action_disconnect_proxy (GtkAction *action,
GtkWidget *proxy);
GSList* gtk_action_get_proxies (GtkAction *action);
GtkAction *gtk_widget_get_action (GtkWidget *widget);
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment