]> Pileus Git - ~andy/gtk/commitdiff
don't try to update the top_row rowref ourselves here, but just have
authorKristian Rietveld <kris@gtk.org>
Fri, 17 Jun 2005 14:11:19 +0000 (14:11 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Fri, 17 Jun 2005 14:11:19 +0000 (14:11 +0000)
2005-06-17  Kristian Rietveld  <kris@gtk.org>

* gtk/gtktreeview.c (validate_visible_area): don't try to update
the top_row rowref ourselves here, but just have _dy_to_top_row()
do it,
(gtk_tree_view_scroll_to_cell): handle scrolling via
validate_visible_area() if the treeview is not visible or needs
reallocation. (#165246, Nickolay V. Shmyrev).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtktreeview.c

index 092cffe471203dbd06ff49838305189bf72ce6c4..261eaf40eff3a95bf392076a2a83e4bddcc8617b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-06-17  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtktreeview.c (validate_visible_area): don't try to update
+       the top_row rowref ourselves here, but just have _dy_to_top_row()
+       do it,
+       (gtk_tree_view_scroll_to_cell): handle scrolling via
+       validate_visible_area() if the treeview is not visible or needs
+       reallocation. (#165246, Nickolay V. Shmyrev).
+
 2005-06-17  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #307914 (Alexander Larsson), fixing some breakage caused
index 092cffe471203dbd06ff49838305189bf72ce6c4..261eaf40eff3a95bf392076a2a83e4bddcc8617b 100644 (file)
@@ -1,3 +1,12 @@
+2005-06-17  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtktreeview.c (validate_visible_area): don't try to update
+       the top_row rowref ourselves here, but just have _dy_to_top_row()
+       do it,
+       (gtk_tree_view_scroll_to_cell): handle scrolling via
+       validate_visible_area() if the treeview is not visible or needs
+       reallocation. (#165246, Nickolay V. Shmyrev).
+
 2005-06-17  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #307914 (Alexander Larsson), fixing some breakage caused
index 092cffe471203dbd06ff49838305189bf72ce6c4..261eaf40eff3a95bf392076a2a83e4bddcc8617b 100644 (file)
@@ -1,3 +1,12 @@
+2005-06-17  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtktreeview.c (validate_visible_area): don't try to update
+       the top_row rowref ourselves here, but just have _dy_to_top_row()
+       do it,
+       (gtk_tree_view_scroll_to_cell): handle scrolling via
+       validate_visible_area() if the treeview is not visible or needs
+       reallocation. (#165246, Nickolay V. Shmyrev).
+
 2005-06-17  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #307914 (Alexander Larsson), fixing some breakage caused
index 202e2bbd8591768b2ac921f47be5b4062ce52ad1..a9bb685db4288b409a997af78480f69fded0a9fc 100644 (file)
@@ -4927,14 +4927,7 @@ validate_visible_area (GtkTreeView *tree_view)
        dy = 0;
 
       gtk_adjustment_set_value (tree_view->priv->vadjustment, dy);
-
-      if (tree_view->priv->top_row)
-        {
-          gtk_tree_row_reference_free (tree_view->priv->top_row);
-          tree_view->priv->top_row = NULL;
-        }
-
-      tree_view->priv->top_row = gtk_tree_row_reference_new_proxy (G_OBJECT (tree_view), tree_view->priv->model, above_path);
+      gtk_tree_view_dy_to_top_row (tree_view);
 
       need_redraw = TRUE;
     }
@@ -10250,7 +10243,8 @@ gtk_tree_view_scroll_to_cell (GtkTreeView       *tree_view,
    * scrolling code, we short-circuit validate_visible_area's immplementation as
    * it is much slower than just going to the point.
    */
-  if (! GTK_WIDGET_REALIZED (tree_view) ||
+  if (! GTK_WIDGET_VISIBLE (tree_view) ||
+      GTK_WIDGET_ALLOC_NEEDED (tree_view) || 
       GTK_RBNODE_FLAG_SET (tree_view->priv->tree->root, GTK_RBNODE_DESCENDANTS_INVALID))
     {
       if (tree_view->priv->scroll_to_path)