summaryrefslogtreecommitdiff
path: root/gtk/gtkliststore.c
diff options
context:
space:
mode:
authorKristian Rietveld <kris@gtk.org>2002-02-10 22:53:20 +0000
committerKristian Rietveld <kristian@src.gnome.org>2002-02-10 22:53:20 +0000
commit1aefb1160590060e6a5afb1e41924ec1771d9b6e (patch)
tree26e6b48ef0ff564dc47df53638ee3223d6f2072e /gtk/gtkliststore.c
parent73aa2bfe050ec9c1ae4cb2e913d46f550ce19668 (diff)
downloadgtk+-1aefb1160590060e6a5afb1e41924ec1771d9b6e.tar.gz
increase value of new_location by one if cmp_a > 0 and we hit the end of
Sun Feb 10 22:20:46 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtkliststore.c (gtk_list_store_sort_iter_changed): increase value of new_location by one if cmp_a > 0 and we hit the end of the list and pass NULL instead of a 'NULL-iter' with _rows_reordered
Diffstat (limited to 'gtk/gtkliststore.c')
-rw-r--r--gtk/gtkliststore.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c
index 829cfa939c..1c90037902 100644
--- a/gtk/gtkliststore.c
+++ b/gtk/gtkliststore.c
@@ -1777,6 +1777,9 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
cmp_a = (* func) (GTK_TREE_MODEL (list_store), iter, &tmp_iter, data);
}
+ if (!list->next && cmp_a > 0)
+ new_location++;
+
if ((!list->next) && (cmp_a > 0))
{
list->next = G_SLIST (iter->user_data);
@@ -1824,7 +1827,7 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
tmp_iter.user_data = NULL;
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (list_store),
- tmp_path, &tmp_iter,
+ tmp_path, NULL,
new_order);
gtk_tree_path_free (tmp_path);