inspector: Down the model tree

Show nested tree models, inside filter or sort models. Without
this, you can't get at the data.
This commit is contained in:
Matthias Clasen 2014-10-04 11:53:14 -04:00
parent 051eedcea1
commit 72a809be0a

View File

@ -41,6 +41,8 @@
#include "gtktextview.h" #include "gtktextview.h"
#include "gtktreeselection.h" #include "gtktreeselection.h"
#include "gtktreestore.h" #include "gtktreestore.h"
#include "gtktreemodelsort.h"
#include "gtktreemodelfilter.h"
#include "gtkwidgetprivate.h" #include "gtkwidgetprivate.h"
enum enum
@ -337,6 +339,20 @@ gtk_inspector_widget_tree_append_object (GtkInspectorWidgetTree *wt,
g_free (address); 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)) if (GTK_IS_CONTAINER (object))
{ {
FindAllData data; FindAllData data;