summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-05-08 01:38:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-05-10 22:04:23 -0400
commitbf9d22f10fd13e6946fe4565a73f8624653c9a6d (patch)
tree285b229211f6932830398052cae66cd90b3d4635 /modules
parent4a68eb6250371046056122d53703b4d237c56b13 (diff)
downloadgtk+-bf9d22f10fd13e6946fe4565a73f8624653c9a6d.tar.gz
inspector: Add columns and cell renderers to the tree
These are interesting objects that are worth displaying in the tree.
Diffstat (limited to 'modules')
-rw-r--r--modules/inspector/widget-tree.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/inspector/widget-tree.c b/modules/inspector/widget-tree.c
index eda0c6eb60..84cbecdaf4 100644
--- a/modules/inspector/widget-tree.c
+++ b/modules/inspector/widget-tree.c
@@ -205,6 +205,33 @@ gtk_inspector_widget_tree_append_object (GtkInspectorWidgetTree *wt,
gtk_container_forall (GTK_CONTAINER (object), on_container_forall, &data);
}
+
+ if (GTK_IS_TREE_VIEW (object))
+ {
+ gint n_columns, i;
+ GObject *column;
+
+ n_columns = gtk_tree_view_get_n_columns (GTK_TREE_VIEW (object));
+ for (i = 0; i < n_columns; i++)
+ {
+ column = G_OBJECT (gtk_tree_view_get_column (GTK_TREE_VIEW (object), i));
+ gtk_inspector_widget_tree_append_object (wt, column, &iter, NULL);
+ }
+ }
+
+ if (GTK_IS_CELL_LAYOUT (object))
+ {
+ GList *cells, *l;
+ GObject *cell;
+
+ cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (object));
+ for (l = cells; l; l = l->next)
+ {
+ cell = l->data;
+ gtk_inspector_widget_tree_append_object (wt, cell, &iter, NULL);
+ }
+ g_list_free (cells);
+ }
}
void