mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
add some more stamp checks (pointed out by Anders Carlsson)
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtktreestore.c: add some more stamp checks (pointed out by Anders Carlsson) * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't assume _row_changed will insert sort (because _row_changed doesn't need to follow this signal), so apply insert sort here (gtk_tree_model_sort_level_find_insert): header doesn't need to be set here, so use a return instead of g_return_val_if_fail.
This commit is contained in:
parent
969279b54e
commit
f0c42465b9
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c: add some more stamp checks (pointed out
|
||||
by Anders Carlsson)
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
|
||||
assume _row_changed will insert sort (because _row_changed doesn't
|
||||
need to follow this signal), so apply insert sort here
|
||||
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
|
||||
set here, so use a return instead of g_return_val_if_fail.
|
||||
|
||||
Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update
|
||||
|
@ -1,3 +1,14 @@
|
||||
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c: add some more stamp checks (pointed out
|
||||
by Anders Carlsson)
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
|
||||
assume _row_changed will insert sort (because _row_changed doesn't
|
||||
need to follow this signal), so apply insert sort here
|
||||
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
|
||||
set here, so use a return instead of g_return_val_if_fail.
|
||||
|
||||
Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update
|
||||
|
@ -1,3 +1,14 @@
|
||||
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c: add some more stamp checks (pointed out
|
||||
by Anders Carlsson)
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
|
||||
assume _row_changed will insert sort (because _row_changed doesn't
|
||||
need to follow this signal), so apply insert sort here
|
||||
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
|
||||
set here, so use a return instead of g_return_val_if_fail.
|
||||
|
||||
Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update
|
||||
|
@ -1,3 +1,14 @@
|
||||
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c: add some more stamp checks (pointed out
|
||||
by Anders Carlsson)
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
|
||||
assume _row_changed will insert sort (because _row_changed doesn't
|
||||
need to follow this signal), so apply insert sort here
|
||||
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
|
||||
set here, so use a return instead of g_return_val_if_fail.
|
||||
|
||||
Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update
|
||||
|
@ -1,3 +1,14 @@
|
||||
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c: add some more stamp checks (pointed out
|
||||
by Anders Carlsson)
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
|
||||
assume _row_changed will insert sort (because _row_changed doesn't
|
||||
need to follow this signal), so apply insert sort here
|
||||
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
|
||||
set here, so use a return instead of g_return_val_if_fail.
|
||||
|
||||
Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update
|
||||
|
@ -1,3 +1,14 @@
|
||||
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c: add some more stamp checks (pointed out
|
||||
by Anders Carlsson)
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
|
||||
assume _row_changed will insert sort (because _row_changed doesn't
|
||||
need to follow this signal), so apply insert sort here
|
||||
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
|
||||
set here, so use a return instead of g_return_val_if_fail.
|
||||
|
||||
Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update
|
||||
|
@ -1,3 +1,14 @@
|
||||
Mon Jan 21 01:21:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c: add some more stamp checks (pointed out
|
||||
by Anders Carlsson)
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
|
||||
assume _row_changed will insert sort (because _row_changed doesn't
|
||||
need to follow this signal), so apply insert sort here
|
||||
(gtk_tree_model_sort_level_find_insert): header doesn't need to be
|
||||
set here, so use a return instead of g_return_val_if_fail.
|
||||
|
||||
Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update
|
||||
|
@ -1581,7 +1581,9 @@ gtk_tree_model_sort_level_find_insert (GtkTreeModelSort *tree_model_sort,
|
||||
header = _gtk_tree_data_list_get_header (tree_model_sort->sort_list,
|
||||
tree_model_sort->sort_column_id);
|
||||
|
||||
g_return_val_if_fail (header != NULL, 0);
|
||||
if (!header)
|
||||
return 0;
|
||||
|
||||
g_return_val_if_fail (header->func != NULL, 0);
|
||||
|
||||
func = header->func;
|
||||
@ -1634,11 +1636,10 @@ gtk_tree_model_sort_insert_value (GtkTreeModelSort *tree_model_sort,
|
||||
elt.ref_count = 0;
|
||||
elt.children = NULL;
|
||||
|
||||
/* just insert it here, the ::row_changed signal will put the model
|
||||
* back in a nice sort order
|
||||
*/
|
||||
index = gtk_tree_model_sort_level_find_insert (tree_model_sort,
|
||||
level, s_iter,
|
||||
FALSE);
|
||||
|
||||
index = gtk_tree_path_get_indices (s_path)[gtk_tree_path_get_depth (s_path)-1];
|
||||
g_array_insert_vals (level->array, index, &elt, 1);
|
||||
|
||||
/* update all larger offsets */
|
||||
|
@ -612,6 +612,7 @@ gtk_tree_store_get_value (GtkTreeModel *tree_model,
|
||||
|
||||
g_return_if_fail (GTK_IS_TREE_STORE (tree_model));
|
||||
g_return_if_fail (iter != NULL);
|
||||
g_return_if_fail (iter->stamp == GTK_TREE_STORE (tree_model)->stamp);
|
||||
g_return_if_fail (column < GTK_TREE_STORE (tree_model)->n_columns);
|
||||
|
||||
list = G_NODE (iter->user_data)->data;
|
||||
@ -636,7 +637,9 @@ static gboolean
|
||||
gtk_tree_store_iter_next (GtkTreeModel *tree_model,
|
||||
GtkTreeIter *iter)
|
||||
{
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->stamp == GTK_TREE_STORE (tree_model)->stamp, FALSE);
|
||||
|
||||
if (G_NODE (iter->user_data)->next)
|
||||
{
|
||||
@ -655,6 +658,7 @@ gtk_tree_store_iter_children (GtkTreeModel *tree_model,
|
||||
GNode *children;
|
||||
|
||||
g_return_val_if_fail (parent == NULL || parent->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (parent->stamp == GTK_TREE_STORE (tree_model)->stamp, FALSE);
|
||||
|
||||
if (parent)
|
||||
children = G_NODE (parent->user_data)->children;
|
||||
@ -743,7 +747,9 @@ gtk_tree_store_iter_parent (GtkTreeModel *tree_model,
|
||||
GNode *parent;
|
||||
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
g_return_val_if_fail (iter->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (child != NULL, FALSE);
|
||||
g_return_val_if_fail (child->user_data != NULL, FALSE);
|
||||
g_return_val_if_fail (child->stamp == GTK_TREE_STORE (tree_model)->stamp, FALSE);
|
||||
|
||||
parent = G_NODE (child->user_data)->parent;
|
||||
|
||||
@ -1265,7 +1271,7 @@ gtk_tree_store_prepend (GtkTreeStore *tree_store,
|
||||
iter->stamp = tree_store->stamp;
|
||||
iter->user_data = g_node_new (NULL);
|
||||
|
||||
g_node_prepend (parent_node, iter->user_data);
|
||||
g_node_prepend (parent_node, G_NODE (iter->user_data));
|
||||
|
||||
path = gtk_tree_store_get_path (GTK_TREE_MODEL (tree_store), iter);
|
||||
gtk_tree_model_row_inserted (GTK_TREE_MODEL (tree_store), path, iter);
|
||||
|
Loading…
Reference in New Issue
Block a user