summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-06
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkscrolledwindow.c20
8 files changed, 57 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4212541e4..0dd754ceb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Nov 27 18:57:20 PST 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport):
+ check for existing viewport first, and don't add one if there
+ already is one
+
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 4212541e4..0dd754ceb 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,9 @@
+Fri Nov 27 18:57:20 PST 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport):
+ check for existing viewport first, and don't add one if there
+ already is one
+
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 4212541e4..0dd754ceb 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Fri Nov 27 18:57:20 PST 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport):
+ check for existing viewport first, and don't add one if there
+ already is one
+
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 4212541e4..0dd754ceb 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,9 @@
+Fri Nov 27 18:57:20 PST 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport):
+ check for existing viewport first, and don't add one if there
+ already is one
+
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 4212541e4..0dd754ceb 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Fri Nov 27 18:57:20 PST 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport):
+ check for existing viewport first, and don't add one if there
+ already is one
+
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 4212541e4..0dd754ceb 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Fri Nov 27 18:57:20 PST 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport):
+ check for existing viewport first, and don't add one if there
+ already is one
+
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 4212541e4..0dd754ceb 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Fri Nov 27 18:57:20 PST 1998 Manish Singh <yosh@gimp.org>
+
+ * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport):
+ check for existing viewport first, and don't add one if there
+ already is one
+
Sat Nov 28 00:06:49 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 944026fc2..ea7939f4d 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -867,13 +867,23 @@ gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrolled_window,
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (scrolled_window->child == NULL);
g_return_if_fail (child->parent == NULL);
- viewport =
- gtk_viewport_new (gtk_scrolled_window_get_hadjustment (scrolled_window),
- gtk_scrolled_window_get_vadjustment (scrolled_window));
+ if (scrolled_window->child != NULL)
+ {
+ g_return_if_fail (GTK_IS_VIEWPORT (scrolled_window->child));
+ g_return_if_fail (GTK_BIN (scrolled_window->child)->child == NULL);
+
+ viewport = scrolled_window->child;
+ }
+ else
+ {
+ viewport =
+ gtk_viewport_new (gtk_scrolled_window_get_hadjustment (scrolled_window),
+ gtk_scrolled_window_get_vadjustment (scrolled_window));
+ gtk_container_add (GTK_CONTAINER (scrolled_window), viewport);
+ }
+
gtk_widget_show (viewport);
gtk_container_add (GTK_CONTAINER (viewport), child);
- gtk_container_add (GTK_CONTAINER (scrolled_window), viewport);
}