[evolution-patches] ETree patch for #42952 and friends



This prevents the jumping around of the scrollbar, although it will
still scroll to show the cursor when resizing even if the cursor is not
currently visible (which is a different, but minor, bug).

-- Ettore
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/ChangeLog,v
retrieving revision 1.896
diff -u -p -r1.896 ChangeLog
--- ChangeLog	14 May 2003 17:56:49 -0000	1.896
+++ ChangeLog	15 May 2003 20:35:45 -0000
@@ -1,3 +1,9 @@
+2003-05-15  Ettore Perazzoli  <ettore ximian com>
+
+	* e-tree.c (tree_canvas_size_allocate): Call
+	tree_canvas_reflow_idle() before deciding whether to move the
+	adjustment, not afterwards.  [#42952]
+
 2003-05-13  Mike Kestner  <mkestner ximian com>
 
 	* e-table-item.c (eti_event): gross hack to work around a
Index: e-tree.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-tree.c,v
retrieving revision 1.99
diff -u -p -r1.99 e-tree.c
--- e-tree.c	9 May 2003 21:39:56 -0000	1.99
+++ e-tree.c	15 May 2003 20:35:45 -0000
@@ -767,17 +767,17 @@ tree_canvas_size_allocate (GtkWidget *wi
 	g_object_set_property (G_OBJECT (e_tree->priv->header), "width", val);
 	g_free (val);
 
+	if (e_tree->priv->reflow_idle_id)
+		g_source_remove(e_tree->priv->reflow_idle_id);
+	tree_canvas_reflow_idle(e_tree);
+
 	if (path)
 		e_tree_get_cell_geometry (e_tree, e_tree_row_of_node(e_tree, path), 0, &x, &y, &w, &h);
 	else
 		y = h = 0;
 
-	if (y < adj->value || y + h > adj->value + adj->page_size)
+ 	if (y < adj->value || y + h > adj->value + adj->page_size)
 		gtk_adjustment_set_value(adj, CLAMP(y - adj->page_size / 2, adj->lower, adj->upper - adj->page_size));
-
-	if (e_tree->priv->reflow_idle_id)
-		g_source_remove(e_tree->priv->reflow_idle_id);
-	tree_canvas_reflow_idle(e_tree);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]