Index: gailtreeview.c
===================================================================
RCS file: /cvs/gnome/gail/gail/gailtreeview.c,v
retrieving revision 1.173
diff -u -p -r1.173 gailtreeview.c
--- gailtreeview.c	13 Aug 2004 09:12:29 -0000	1.173
+++ gailtreeview.c	25 Nov 2004 11:18:00 -0000
@@ -488,6 +488,7 @@ gail_tree_view_real_initialize (AtkObjec
   view->focus_cell = NULL;
   view->old_hadj = NULL;
   view->old_vadj = NULL;
+  view->idle_expand_id = 0;
 
   view->n_children_deleted = 0;
 
@@ -2256,7 +2257,7 @@ gail_tree_view_expand_row_gtk (GtkTreeVi
   data = g_new (GailTreeViewIdleData, 1);
   data->tree_view = gailview;
   data->path = gtk_tree_path_copy (path);
-  g_idle_add (idle_expand_row, data);
+  gailview->idle_expand_id = g_idle_add (idle_expand_row, data);
 
   return FALSE;
 }
@@ -2775,6 +2776,11 @@ model_row_inserted (GtkTreeModel *tree_m
   GailTreeView *gailview = GAIL_TREE_VIEW (atk_obj);
   gint row, n_inserted, child_row;
 
+  if (gailview->idle_expand_id)
+    {
+      g_source_remove (gailview->idle_expand_id);
+      gailview->idle_expand_id = 0;
+    }
   /* Check to see if row is visible */
   row = get_row_from_tree_path (tree_view, path);
 
@@ -2857,6 +2863,13 @@ model_row_deleted (GtkTreeModel *tree_mo
   tree_view = (GtkTreeView *)user_data;
   atk_obj = gtk_widget_get_accessible (GTK_WIDGET (tree_view));
   gailview = GAIL_TREE_VIEW (atk_obj);
+
+  if (gailview->idle_expand_id)
+    {
+      g_source_remove (gailview->idle_expand_id);
+      gailview->idle_expand_id = 0;
+    }
+  /* Check to see if row is visible */
   clean_rows (gailview);
 
   /* Set rows at or below the specified row to ATK_STATE_STALE */
@@ -2919,6 +2932,11 @@ model_rows_reordered (GtkTreeModel *tree
   AtkObject *atk_obj = gtk_widget_get_accessible (GTK_WIDGET (tree_view));
   GailTreeView *gailview = GAIL_TREE_VIEW (atk_obj);
 
+  if (gailview->idle_expand_id)
+    {
+      g_source_remove (gailview->idle_expand_id);
+      gailview->idle_expand_id = 0;
+    }
   traverse_cells (gailview, NULL, TRUE, FALSE);
 
   g_signal_emit_by_name (atk_obj, "row_reordered");
Index: gailtreeview.h
===================================================================
RCS file: /cvs/gnome/gail/gail/gailtreeview.h,v
retrieving revision 1.23
diff -u -p -r1.23 gailtreeview.h
--- gailtreeview.h	20 Oct 2003 16:53:32 -0000	1.23
+++ gailtreeview.h	25 Nov 2004 11:18:00 -0000
@@ -52,6 +52,7 @@ struct _GailTreeView
   AtkObject     *focus_cell;
   GtkAdjustment *old_hadj;
   GtkAdjustment *old_vadj;
+  guint         idle_expand_id;
 };
 
 GType gail_tree_view_get_type (void);
