summaryrefslogtreecommitdiff
path: root/gtk/gtkwidgetpath.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2010-10-11 00:23:40 +0200
committerCarlos Garnacho <carlosg@gnome.org>2010-12-04 15:38:19 +0100
commit88b78953b68b01d9ac2f46b088322e4188fb9f38 (patch)
tree11e147b8e6d3ed606e822ad4cce0640ffe6c2b93 /gtk/gtkwidgetpath.c
parentc575733edab533c7e36062e06a4a8a9e2382685b (diff)
downloadgtk+-88b78953b68b01d9ac2f46b088322e4188fb9f38.tar.gz
GtkContainer: Add method to get the GtkWidgetPath for a child.
This is now used throughout in order to have the full path for a given widget, including intermediate named regions, the default implementation just returns the GtkContainer's path copy, no intermediate regions between.
Diffstat (limited to 'gtk/gtkwidgetpath.c')
-rw-r--r--gtk/gtkwidgetpath.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index 933a2dc0c7..c6cfbb5c81 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -129,6 +129,21 @@ gtk_widget_path_prepend_type (GtkWidgetPath *path,
g_return_val_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET), 0);
new.type = type;
+ g_array_prepend_val (path->elems, new);
+
+ return 0;
+}
+
+guint
+gtk_widget_path_append_type (GtkWidgetPath *path,
+ GType type)
+{
+ GtkPathElement new = { 0 };
+
+ g_return_val_if_fail (path != NULL, 0);
+ g_return_val_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET), 0);
+
+ new.type = type;
g_array_append_val (path->elems, new);
return path->elems->len - 1;