GNOME Bugzilla – Bug 85813
gtk_list_store_insert doesn't do what it says on the box
Last modified: 2004-12-22 21:47:04 UTC
from the API docs: void gtk_list_store_insert (GtkListStore *list_store, GtkTreeIter *iter, gint position); Creates a new row at position. iter will be changed to point to this new row. If position is larger than the number of rows on the list, then the new row will be appended to the list. The row will be empty before this function is called. To fill in values, you need to call gtk_list_store_set() or gtk_list_store_set_value(). when I do this with a value greater than the number of rows, I get: (nnMedia:10511): Gtk-WARNING **: gtkliststore.c:1073:gtk_list_store_insert(): position 40 is off the end of the list and gtk_list_store_set (list, &iter, NAME_STRING, gtk_entry_get_text(GTK_ENTRY(Name)) , FREQUENCY_INT, atoi(gtk_entry_get_text(GTK_ENTRY(Frequency))), GROUP_STRING, gtk_entry_get_text(GTK_ENTRY(Group)), INDEX_INT, atoi(gtk_entry_get_text(GTK_ENTRY(Position))), -1); doesn't do anything. It works properly if the position is within the list.
fixed in CVS.