[gtk+] treeview: Only update vadjustment in size_allocate()



commit b968147e0aa714cc16fc900162512a405a5ea3c6
Author: Benjamin Otte <otte redhat com>
Date:   Mon Nov 13 01:53:45 2017 +0100

    treeview: Only update vadjustment in size_allocate()
    
    The 2 calls even do different things, but because the one in allocate
    always overrides the one here...

 gtk/gtktreeview.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 7f8f3e5..635ee91 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -11219,7 +11219,6 @@ gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
   GList *list;
   GtkTreeViewColumn *column;
   GtkWidget *button;
-  int height;
 
   g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
 
@@ -11251,15 +11250,6 @@ gtk_tree_view_set_headers_visible (GtkTreeView *tree_view,
        }
     }
 
-  height = gtk_widget_get_height (GTK_WIDGET (tree_view));
-  gtk_adjustment_configure (tree_view->priv->vadjustment,
-                            gtk_adjustment_get_value (tree_view->priv->vadjustment),
-                            0,
-                            gtk_tree_view_get_height (tree_view),
-                            gtk_adjustment_get_step_increment (tree_view->priv->vadjustment),
-                            (height - gtk_tree_view_get_effective_header_height (tree_view)) / 2,
-                            height - gtk_tree_view_get_effective_header_height (tree_view));
-
   gtk_widget_queue_resize (GTK_WIDGET (tree_view));
 
   g_object_notify_by_pspec (G_OBJECT (tree_view), tree_view_props[PROP_HEADERS_VISIBLE]);


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