Re: Trouble with GtkTreeModel & co.
- From: Andrej Prsa <andrej prsa guest arnes si>
- To: gtk-list gnome org
- Subject: Re: Trouble with GtkTreeModel & co.
- Date: Sat, 5 Jul 2003 11:09:06 +0200
Hi!
> > 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.
Yep, works like a charm! Thanks! :)
Andrej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]