[gtk+] viewport: Initialize the adjustment in the init function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] viewport: Initialize the adjustment in the init function
- Date: Wed, 16 Nov 2011 23:50:10 +0000 (UTC)
commit 2939eae20f4c45d33c5a311aedf2b384b31a0267
Author: Benjamin Otte <otte redhat com>
Date: Thu Nov 17 00:24:15 2011 +0100
viewport: Initialize the adjustment in the init function
gtk/gtkviewport.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 226f3bf..68bf8f1 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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]