mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-22 06:44:07 +00:00
check for existing viewport first, and don't add one if there already is
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add_with_viewport): check for existing viewport first, and don't add one if there already is one -Yosh
This commit is contained in:
parent
33347533ec
commit
67d445eebc
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user