From 3804b7e64bb9f0cc88a53f6cc26d3bd03de7d0e9 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Mon, 27 Jan 2003 21:41:06 +0000 Subject: ChangeLog too long to mention here. Bugs fixed: #100973, #83195, #87556, #99803, #100458. And a couple of non-bugzilla'd bugs (I am soooo sure I misspelled that). --- gtk/gtktreestore.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'gtk/gtktreestore.c') diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index be3a15af0..e39ae4da4 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -2337,6 +2337,8 @@ gtk_tree_store_move (GtkTreeStore *tree_store, /* after with sibling = NULL prepends */ g_node_insert_after (parent, NULL, node); } + + handle_b = FALSE; } if (handle_b) @@ -2409,7 +2411,7 @@ gtk_tree_store_move (GtkTreeStore *tree_store, path = gtk_tree_path_new (); gtk_tree_model_rows_reordered (GTK_TREE_MODEL (tree_store), - path, NULL, order); + path, &parent_iter, order); gtk_tree_path_free (path); if (position) @@ -2536,7 +2538,12 @@ gtk_tree_store_sort_helper (GtkTreeStore *tree_store, node = parent->children; if (node == NULL || node->next == NULL) - return; + { + if (recurse && node && node->children) + gtk_tree_store_sort_helper (tree_store, node, TRUE); + + return; + } g_assert (GTK_TREE_STORE_IS_SORTED (tree_store)); @@ -2815,7 +2822,7 @@ gtk_tree_store_get_sort_column_id (GtkTreeSortable *sortable, g_return_val_if_fail (GTK_IS_TREE_STORE (sortable), FALSE); - if (tree_store->sort_column_id == -1) + if (tree_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID) return FALSE; if (sort_column_id) @@ -2840,7 +2847,7 @@ gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable, (tree_store->order == order)) return; - if (sort_column_id != -1) + if (sort_column_id != GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID) { GtkTreeDataSortHeader *header = NULL; @@ -2858,9 +2865,9 @@ gtk_tree_store_set_sort_column_id (GtkTreeSortable *sortable, tree_store->sort_column_id = sort_column_id; tree_store->order = order; - gtk_tree_store_sort (tree_store); - gtk_tree_sortable_sort_column_changed (sortable); + + gtk_tree_store_sort (tree_store); } static void @@ -2907,6 +2914,9 @@ gtk_tree_store_set_sort_func (GtkTreeSortable *sortable, header->func = func; header->data = data; header->destroy = destroy; + + if (tree_store->sort_column_id == sort_column_id) + gtk_tree_store_sort (tree_store); } static void @@ -2930,6 +2940,9 @@ gtk_tree_store_set_default_sort_func (GtkTreeSortable *sortable, tree_store->default_sort_func = func; tree_store->default_sort_data = data; tree_store->default_sort_destroy = destroy; + + if (tree_store->sort_column_id == GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID) + gtk_tree_store_sort (tree_store); } static gboolean @@ -2957,6 +2970,3 @@ validate_gnode (GNode* node) iter = iter->next; } } - - - -- cgit v1.2.1