Re: Size of GtkListStore
- From: Tim Müller <zen18864 zen co uk>
- To: Dimitar Haralanov <mitko keyresearch com>, gtk-app-devel-list gnome org
- Subject: Re: Size of GtkListStore
- Date: Sat, 18 Oct 2003 07:15:38 +0100
On Saturday 18 October 2003 03:56, Dimitar Haralanov wrote:
Hi Dimitar,
Could someone help with a method for getting the size of GtkListStore?
If by 'size of GtkListStore' you mean the number of rows, then you could use
gtk_tree_model_iter_n_children(GTK_TREE_MODEL(liststore), NULL);
which will return the number of top-level nodes, which is the same as the
number of rows in a list store (the length field of the list store structure
is declared private in the header files, so you shouldn't use that).
Of course you could also keep track of the number of rows yourself by
increasing a counter whenever you insert a row and decreasing the counter
whenever you remove a row.
Cheers
-Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]