Re: Moving GtkTreeStore Items



Brett Nash <nash nash nu> writes:
Hello,
        Is there is an easy way to move an item in a gtk tree store
to another point.

Basically I have:
Foo
  |- Blah
  \- Bloogle
Frob
  \- Zonk

And I want to move 'Blah' from beneath Foo, to beneath Frob.  

I can do it by manually making a new row, then copying all the data,
then removing the old row, but I would prefer not to.

That's what you have to do. If there were a gtk_tree_model_move() then
it would just do that for you (though it might be possible to avoid
the copy). You can also write a custom GtkTreeModel of course.

As a second question:
        Is there a equivelent of gtk_clist_freeze/thaw for Tree views?

No but you shouldn't need it. (Removing the model from the view,
changing the model, putting the model back would be fairly equivalent,
but is probably a bad idea.)

Havoc



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