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.
This commit is contained in:
Carlos Garnacho
2010-10-11 00:23:40 +02:00
parent c575733eda
commit 88b78953b6
6 changed files with 95 additions and 75 deletions

View File

@ -128,6 +128,21 @@ gtk_widget_path_prepend_type (GtkWidgetPath *path,
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_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);