[gtk+] inspector: Down the model tree



commit 72a809be0acba0c20df9be08fad9ed931203fcc1
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 4 11:53:14 2014 -0400

    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 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/widget-tree.c b/gtk/inspector/widget-tree.c
index 290c9f6..1f63575 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]