summaryrefslogtreecommitdiff
path: root/gtk/gtktreestore.c
diff options
context:
space:
mode:
authorKristian Rietveld <kristian@src.gnome.org>2003-01-27 21:41:06 +0000
committerKristian Rietveld <kristian@src.gnome.org>2003-01-27 21:41:06 +0000
commit3804b7e64bb9f0cc88a53f6cc26d3bd03de7d0e9 (patch)
tree227981c5c5d781884b7f8a9f28ce8cf8e62a3ace /gtk/gtktreestore.c
parentb6913de5e9266fa851c1c3cb870494e5a7b966b5 (diff)
downloadgdk-pixbuf-3804b7e64bb9f0cc88a53f6cc26d3bd03de7d0e9.tar.gz
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).
Diffstat (limited to 'gtk/gtktreestore.c')
-rw-r--r--gtk/gtktreestore.c28
1 files changed, 19 insertions, 9 deletions
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;
}
}
-
-
-