views:

101

answers:

1

Hi!

I have a TreeStore with objects that I view and manipulate through a GTK TreeView/TreeModel setup.

I also have a TreeView showing a treeModelSort of the treeStore, which I use for sorting on columns like name and date.

The problem is, that the sort mechanism only sorts the rootnodes, even if a underlaying childnode has e.g. a date that is later/sooner than the rootnodes' dates.

So, the question is if there is any way to show the obejcts as a "list", not a tree, but keeping the references to the paths in the other treeView?

+1  A: 

I would suggest a TreeModelFilter that filters out any rows that are child rows (ie, depth > 1). You can filter your sorted model, and display just the root nodes.

anthony