From 6ff585e18951e27cea2883e59aa0d0e3cc41d55e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 5 Jan 2011 13:58:28 +0100 Subject: [PATCH] treeview: Update adjustment usage for sealing Use gtk_adjustment_set_upper() instead of doing its work manually. --- gtk/gtktreeview.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 4a715e84f8..5d918781cb 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -6572,10 +6572,10 @@ validate_visible_area (GtkTreeView *tree_view) gtk_widget_get_preferred_size (GTK_WIDGET (tree_view), &requisition, NULL); - tree_view->priv->hadjustment->upper = MAX (tree_view->priv->hadjustment->upper, (gfloat)requisition.width); - tree_view->priv->vadjustment->upper = MAX (tree_view->priv->vadjustment->upper, (gfloat)requisition.height); - gtk_adjustment_changed (tree_view->priv->hadjustment); - gtk_adjustment_changed (tree_view->priv->vadjustment); + gtk_adjustment_set_upper (tree_view->priv->hadjustment, + MAX (gtk_adjustment_get_upper (tree_view->priv->hadjustment), requisition.width)); + gtk_adjustment_set_upper (tree_view->priv->vadjustment, + MAX (gtk_adjustment_get_upper (tree_view->priv->vadjustment), requisition.height)); gtk_widget_queue_resize (GTK_WIDGET (tree_view)); } @@ -6772,10 +6772,10 @@ do_validate_rows (GtkTreeView *tree_view, gboolean queue_resize) */ gtk_tree_view_size_request (GTK_WIDGET (tree_view), &requisition, FALSE); - tree_view->priv->hadjustment->upper = MAX (tree_view->priv->hadjustment->upper, (gfloat)requisition.width); - tree_view->priv->vadjustment->upper = MAX (tree_view->priv->vadjustment->upper, (gfloat)requisition.height); - gtk_adjustment_changed (tree_view->priv->hadjustment); - gtk_adjustment_changed (tree_view->priv->vadjustment); + gtk_adjustment_set_upper (tree_view->priv->hadjustment, + MAX (gtk_adjustment_get_upper (tree_view->priv->hadjustment), requisition.width)); + gtk_adjustment_set_upper (tree_view->priv->vadjustment, + MAX (gtk_adjustment_get_upper (tree_view->priv->vadjustment), requisition.height)); if (queue_resize) gtk_widget_queue_resize (GTK_WIDGET (tree_view)); @@ -6837,10 +6837,10 @@ do_presize_handler (GtkTreeView *tree_view) gtk_widget_get_preferred_size (GTK_WIDGET (tree_view), &requisition, NULL); - tree_view->priv->hadjustment->upper = MAX (tree_view->priv->hadjustment->upper, (gfloat)requisition.width); - tree_view->priv->vadjustment->upper = MAX (tree_view->priv->vadjustment->upper, (gfloat)requisition.height); - gtk_adjustment_changed (tree_view->priv->hadjustment); - gtk_adjustment_changed (tree_view->priv->vadjustment); + gtk_adjustment_set_upper (tree_view->priv->hadjustment, + MAX (gtk_adjustment_get_upper (tree_view->priv->hadjustment), requisition.width)); + gtk_adjustment_set_upper (tree_view->priv->vadjustment, + MAX (gtk_adjustment_get_upper (tree_view->priv->vadjustment), requisition.height)); gtk_widget_queue_resize (GTK_WIDGET (tree_view)); }