mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
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:
parent
6b4ef37ccc
commit
9c34ec2ee4
@ -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>
|
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
||||||
|
@ -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>
|
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
||||||
|
@ -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>
|
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
||||||
|
@ -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>
|
Sun Aug 22 12:04:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
* gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): Use the
|
||||||
|
@ -970,6 +970,7 @@ gtk_list_store_insert (GtkListStore *list_store,
|
|||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
GtkSequence *seq;
|
GtkSequence *seq;
|
||||||
GtkSequencePtr ptr;
|
GtkSequencePtr ptr;
|
||||||
|
gint length;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_LIST_STORE (list_store));
|
g_return_if_fail (GTK_IS_LIST_STORE (list_store));
|
||||||
g_return_if_fail (iter != NULL);
|
g_return_if_fail (iter != NULL);
|
||||||
@ -979,6 +980,10 @@ gtk_list_store_insert (GtkListStore *list_store,
|
|||||||
|
|
||||||
seq = list_store->seq;
|
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_get_ptr_at_pos (seq, position);
|
||||||
ptr = _gtk_sequence_insert (ptr, NULL);
|
ptr = _gtk_sequence_insert (ptr, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user