Re: Trouble with GtkTreeModel & co.



On Fri, Jul 04, 2003 at 09:42:28PM +0200, Andrej Prsa wrote:
 
> Yep, I did something similar:
> 
> sprintf (path_str, "%d", count);
> while (gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path_str) == TRUE)
>   {
>   count++;
>   sprintf (path_str, "%d", count);
>   }
> 
> But it's just so DAMN ugly! ;(
> 

Well, you could at least use gtk_tree_model_iter_nth_child() instead
of the sprintf! ;-)

I think gtk_tree_model_iter_n_children() does what you want though, 
it allows NULL if you want the number of children at the root of the 
model.

Havoc





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