summaryrefslogtreecommitdiff
path: root/gtk/gtkviewport.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-11-17 00:24:15 +0100
committerBenjamin Otte <otte@redhat.com>2011-11-17 00:46:15 +0100
commit2939eae20f4c45d33c5a311aedf2b384b31a0267 (patch)
tree18cb1a82a8b20ad2e6a012f7a9bb3df3cb39c33a /gtk/gtkviewport.c
parent0ef224766a711cc510d158cbeeb245a3526d66ac (diff)
downloadgtk+-2939eae20f4c45d33c5a311aedf2b384b31a0267.tar.gz
viewport: Initialize the adjustment in the init function
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r--gtk/gtkviewport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 226f3bf7ba..68bf8f1459 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -110,6 +110,9 @@ static void gtk_viewport_get_preferred_height (GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
+static void viewport_set_adjustment (GtkViewport *viewport,
+ GtkOrientation orientation,
+ GtkAdjustment *adjustment);
G_DEFINE_TYPE_WITH_CODE (GtkViewport, gtk_viewport, GTK_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
@@ -246,6 +249,9 @@ gtk_viewport_init (GtkViewport *viewport)
priv->bin_window = NULL;
priv->hadjustment = NULL;
priv->vadjustment = NULL;
+
+ viewport_set_adjustment (viewport, GTK_ORIENTATION_HORIZONTAL, NULL);
+ viewport_set_adjustment (viewport, GTK_ORIENTATION_VERTICAL, NULL);
}
/**