mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
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:
parent
051eedcea1
commit
72a809be0a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user