Okay, that's better. I didn't see the special case.
----- Original Message ---- From: [EMAIL PROTECTED] To: Lance Dillon <[EMAIL PROTECTED]> Cc: gtk-app-devel-list@gnome.org Sent: Tuesday, September 19, 2006 11:45:06 AM Subject: Re: number of entries in GtkCombobox -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Sep 19, 2006 at 08:34:56AM -0700, Lance Dillon wrote: > I'm not sure I like this answer, it seems to be way to much for this question, > but it looks like the best way to do it is to get a GtkTreeIter with > gtk_tree_model_get_iter_first(), then walk the list with > gtk_tree_model_iter_next(), > counting up the number of rows: There is gtk_tree_model_iter_n_children (): | gint gtk_tree_model_iter_n_children(GtkTreeModel *tree_model, | GtkTreeIter *iter); | | Returns the number of children that iter has. As a special case, if iter | is NULL, then the number of toplevel nodes is returned. HTH - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFEBCCBcgs9XrR2kYRAnKoAJ9udyMXFULPZfDhdVt50d5H62MrFACeKB4s pHwsM5/sWoBj4AkdwhbS5A0= =ME1l -----END PGP SIGNATURE----- _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list