inspector: Add columns to the object tree
Add columnview columns in the object tree. We do the same for treeview columns.
This commit is contained in:
@@ -351,6 +351,29 @@ object_tree_tree_view_get_children (GObject *object)
|
||||
return G_LIST_MODEL (result);
|
||||
}
|
||||
|
||||
static GListModel *
|
||||
object_tree_column_view_get_children (GObject *object)
|
||||
{
|
||||
GtkColumnView *view = GTK_COLUMN_VIEW (object);
|
||||
GListStore *result_list;
|
||||
GtkFlattenListModel *result;
|
||||
GListModel *columns, *sublist;
|
||||
|
||||
result_list = g_list_store_new (G_TYPE_LIST_MODEL);
|
||||
|
||||
columns = gtk_column_view_get_columns (view);
|
||||
g_list_store_append (result_list, columns);
|
||||
|
||||
sublist = object_tree_widget_get_children (object);
|
||||
g_list_store_append (result_list, sublist);
|
||||
g_object_unref (sublist);
|
||||
|
||||
result = gtk_flatten_list_model_new (G_TYPE_OBJECT, G_LIST_MODEL (result_list));
|
||||
g_object_unref (result_list);
|
||||
|
||||
return G_LIST_MODEL (result);
|
||||
}
|
||||
|
||||
static GListModel *
|
||||
object_tree_icon_view_get_children (GObject *object)
|
||||
{
|
||||
@@ -529,6 +552,11 @@ static const ObjectTreeClassFuncs object_tree_class_funcs[] = {
|
||||
object_tree_menu_get_parent,
|
||||
object_tree_widget_get_children
|
||||
},
|
||||
{
|
||||
gtk_column_view_get_type,
|
||||
object_tree_widget_get_parent,
|
||||
object_tree_column_view_get_children
|
||||
},
|
||||
{
|
||||
gtk_widget_get_type,
|
||||
object_tree_widget_get_parent,
|
||||
|
||||
Reference in New Issue
Block a user