Re: RFC: new features

On Wed, Jan 11, 2012 at 09:16:10PM -0800, Matthew Brush wrote:
> It would be great to have simple GtkTree and GtkList widget sitting 
> ontop of the extremely powerful GtkTreeView API for those many cases 
> where you just need a basic tree or list box. The new widgets would not 
> require a book[1] to explain how to use it. I saw a GtkTree in the API 
> docs but it's deprecated, presumably because it doesn't sit ontop of the 
> better tree view API.

I agree. Most of the time, only basic features of GtkTreeModel and 
GtkTreeView are needed.

But conversely, more advanced features are missing in GtkTreeStore, and 
are present in GNode. For example, unlink a subtree and relink it at 
another place. With GtkTreeModel, we have to delete the rows and then 
reinsert them one by one.

The access to the data of the tree is also easier with a GNode, if we 
want to traverse the tree to find the right place where to insert a new 
node for instance.

It's not difficult to implement a custom GtkTreeModel that uses 
internally a GNode, but it would be nice to have a GNode-like for 
GtkTreeView. But I don't know if a lot of applications need this and 
currently use a custom GtkTreeModel.

I've read some discussions (probably on this list) about moving the 
model of the TreeView in GLib/GIO. But in this case, will the new model 
be as flexible as the GNode?

Attachment: pgpTzm9uElp04.pgp
Description: PGP signature

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