Fix for #312924, by John Finlay.

2005-08-11  Kristian Rietveld  <kris@gtk.org>

	Fix for #312924, by John Finlay.

	* gtk/gtkliststore.c (gtk_list_store_increment_stamp),
	(gtk_list_store_clear): increment stamp on store clearance.

	* gtk/gtktreestore.c (gtk_tree_store_increment_stamp),
	(gtk_tree_store_clear): ditto.
This commit is contained in:
Kristian Rietveld 2005-08-11 18:07:47 +00:00 committed by Kristian Rietveld
parent 48729ed118
commit 1f56c13d32
5 changed files with 57 additions and 0 deletions

View File

@ -1,3 +1,13 @@
2005-08-11 Kristian Rietveld <kris@gtk.org>
Fix for #312924, by John Finlay.
* gtk/gtkliststore.c (gtk_list_store_increment_stamp),
(gtk_list_store_clear): increment stamp on store clearance.
* gtk/gtktreestore.c (gtk_tree_store_increment_stamp),
(gtk_tree_store_clear): ditto.
2005-08-11 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate_columns): queue

View File

@ -1,3 +1,13 @@
2005-08-11 Kristian Rietveld <kris@gtk.org>
Fix for #312924, by John Finlay.
* gtk/gtkliststore.c (gtk_list_store_increment_stamp),
(gtk_list_store_clear): increment stamp on store clearance.
* gtk/gtktreestore.c (gtk_tree_store_increment_stamp),
(gtk_tree_store_clear): ditto.
2005-08-11 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate_columns): queue

View File

@ -1,3 +1,13 @@
2005-08-11 Kristian Rietveld <kris@gtk.org>
Fix for #312924, by John Finlay.
* gtk/gtkliststore.c (gtk_list_store_increment_stamp),
(gtk_list_store_clear): increment stamp on store clearance.
* gtk/gtktreestore.c (gtk_tree_store_increment_stamp),
(gtk_tree_store_clear): ditto.
2005-08-11 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate_columns): queue

View File

@ -74,6 +74,8 @@ static void gtk_list_store_set_column_type (GtkListStore *list_store,
gint column,
GType type);
static void gtk_list_store_increment_stamp (GtkListStore *list_store);
/* Drag and Drop */
static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
@ -1121,6 +1123,16 @@ gtk_list_store_append (GtkListStore *list_store,
gtk_list_store_insert (list_store, iter, _gtk_sequence_get_length (list_store->seq));
}
static void
gtk_list_store_increment_stamp (GtkListStore *list_store)
{
do
{
list_store->stamp++;
}
while (list_store->stamp == 0);
}
/**
* gtk_list_store_clear:
* @list_store: a #GtkListStore.
@ -1140,6 +1152,8 @@ gtk_list_store_clear (GtkListStore *list_store)
iter.user_data = _gtk_sequence_get_begin_ptr (list_store->seq);
gtk_list_store_remove (list_store, &iter);
}
gtk_list_store_increment_stamp (list_store);
}
/**

View File

@ -74,6 +74,8 @@ static void gtk_tree_store_set_column_type (GtkTreeStore *tree_store,
gint column,
GType type);
static void gtk_tree_store_increment_stamp (GtkTreeStore *tree_store);
/* DND interfaces */
static gboolean real_gtk_tree_store_row_draggable (GtkTreeDragSource *drag_source,
@ -1541,6 +1543,16 @@ gtk_tree_store_clear_traverse (GNode *node,
return FALSE;
}
static void
gtk_tree_store_increment_stamp (GtkTreeStore *tree_store)
{
do
{
tree_store->stamp++;
}
while (tree_store->stamp == 0);
}
/**
* gtk_tree_store_clear:
* @tree_store: a #GtkTreeStore
@ -1553,6 +1565,7 @@ gtk_tree_store_clear (GtkTreeStore *tree_store)
g_return_if_fail (GTK_IS_TREE_STORE (tree_store));
gtk_tree_store_clear_traverse (tree_store->root, tree_store);
gtk_tree_store_increment_stamp (tree_store);
}
static gboolean