From 72a809be0acba0c20df9be08fad9ed931203fcc1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 4 Oct 2014 11:53:14 -0400 Subject: [PATCH] inspector: Down the model tree Show nested tree models, inside filter or sort models. Without this, you can't get at the data. --- gtk/inspector/widget-tree.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gtk/inspector/widget-tree.c b/gtk/inspector/widget-tree.c index 290c9f6a5d..1f6357545e 100644 --- a/gtk/inspector/widget-tree.c +++ b/gtk/inspector/widget-tree.c @@ -41,6 +41,8 @@ #include "gtktextview.h" #include "gtktreeselection.h" #include "gtktreestore.h" +#include "gtktreemodelsort.h" +#include "gtktreemodelfilter.h" #include "gtkwidgetprivate.h" enum @@ -337,6 +339,20 @@ gtk_inspector_widget_tree_append_object (GtkInspectorWidgetTree *wt, g_free (address); + if (GTK_IS_TREE_MODEL_SORT (object)) + { + GObject *child = G_OBJECT (gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (object))); + if (child) + gtk_inspector_widget_tree_append_object (wt, child, &iter, "model"); + } + + if (GTK_IS_TREE_MODEL_FILTER (object)) + { + GObject *child = G_OBJECT (gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (object))); + if (child) + gtk_inspector_widget_tree_append_object (wt, child, &iter, "model"); + } + if (GTK_IS_CONTAINER (object)) { FindAllData data;