Normalize the position so we don't create paths with off-list indices.

Sun Aug 22 13:32:33 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkliststore.c (gtk_list_store_insert): Normalize the
	position so we don't create paths with off-list
	indices. (#150320).
This commit is contained in:
Soeren Sandmann 2004-08-22 12:03:46 +00:00 committed by Søren Sandmann Pedersen
parent 6b4ef37ccc
commit 9c34ec2ee4
5 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Sun Aug 22 13:32:33 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_insert): Normalize the
position so we don't create paths with off-list
indices. (#150320).
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the

View File

@ -1,3 +1,9 @@
Sun Aug 22 13:32:33 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_insert): Normalize the
position so we don't create paths with off-list
indices. (#150320).
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the

View File

@ -1,3 +1,9 @@
Sun Aug 22 13:32:33 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_insert): Normalize the
position so we don't create paths with off-list
indices. (#150320).
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the

View File

@ -1,3 +1,9 @@
Sun Aug 22 13:32:33 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_insert): Normalize the
position so we don't create paths with off-list
indices. (#150320).
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the

View File

@ -970,6 +970,7 @@ gtk_list_store_insert (GtkListStore *list_store,
GtkTreePath *path;
GtkSequence *seq;
GtkSequencePtr ptr;
gint length;
g_return_if_fail (GTK_IS_LIST_STORE (list_store));
g_return_if_fail (iter != NULL);
@ -979,6 +980,10 @@ gtk_list_store_insert (GtkListStore *list_store,
seq = list_store->seq;
length = _gtk_sequence_get_length (seq);
if (position > length)
position = length;
ptr = _gtk_sequence_get_ptr_at_pos (seq, position);
ptr = _gtk_sequence_insert (ptr, NULL);