Re: Trouble with GtkTreeModel & co.
- From: Havoc Pennington <hp redhat com>
- To: Andrej Prsa <andrej prsa guest arnes si>
- Cc: gtk-list gnome org
- Subject: Re: Trouble with GtkTreeModel & co.
- Date: Fri, 4 Jul 2003 19:03:28 -0400
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]