[gtk+] GtkScrolledWindow: Avoid a test failure
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkScrolledWindow: Avoid a test failure
- Date: Thu, 22 May 2014 10:01:52 +0000 (UTC)
commit d01a291dbc051e8a92fadcf60e9a16423aea029a
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 22 06:00:09 2014 -0400
GtkScrolledWindow: Avoid a test failure
The change to take out unneeded NULL checks requires some care
at startup: we check both adjustments when any of them changes;
we need to do those checks in the same order in which we create
the scrollbars, otherwise we'll try to get the adjustment of
the vscrollbar when we just set the up the hscrollbars' adjustment.
gtk/gtkscrolledwindow.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index f8d1582..a6353c7 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -2890,10 +2890,10 @@ gtk_scrolled_window_adjustment_value_changed (GtkAdjustment *adjustment,
return;
/* Ensure GtkAdjustment and unclamped values are in sync */
- if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar)))
- priv->unclamped_vadj_value = gtk_adjustment_get_value (adjustment);
- else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar)))
+ if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar)))
priv->unclamped_hadj_value = gtk_adjustment_get_value (adjustment);
+ else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar)))
+ priv->unclamped_vadj_value = gtk_adjustment_get_value (adjustment);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]