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
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
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
* @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
**/
}
+/**
+ * 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
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);