On Mon, 19 Jan 2004 02:46:01 +0000 Tim MÃller <zen18864 zen co uk> wrote:
Check the return value of gtk_tree_model_get_iter(). If it is TRUE, the path was valid, if it is FALSE, the path doesn't exist.
That is what I was using but this does not work. The function always returns TRUE. May be, it has something to do with the fact that I am using a GtkTreeModelSort...
Or use iters from the start and then gtk_tree_model_iter_next() (with checking the return value).
Sure, I would prefer that but there is not function to go to the previous iter.
gtk_tree_path_next() and _prev() cannot check whether a tree path is valid, because they are not bound to a specific model. gtk_tree_path_prev() also doesn't check whether a row really exists (you can construct an arbitrary new tree path and then do _prev() and still get an invalid tree path), it just returns FALSE if it's at the first node at the current depth already.
That is what I am saying, but may be they should be bound. It would make sense... -- Mitko Haralanov voidtrance at comcast dot net http://voidtrance.home.comcast.net ========================================== /* Allow the packet buffer size to be overridden by know-it-alls. */ - comment from drivers/net/ne.c
Description: PGP signature