diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-07-19 14:57:15 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-07-19 14:57:15 +0000 |
commit | aa49527fa78bf5b3a3f1394092b248e27e1bfa3f (patch) | |
tree | a1b7651c9e379ab1f7ffe2af68727cdccdf682e6 /gtk/gtklayout.c | |
parent | 8f2bf7976d73ba58b808002268c49a19e9b586ee (diff) | |
download | gtk+-aa49527fa78bf5b3a3f1394092b248e27e1bfa3f.tar.gz |
Enforce the widget/child realization/mapping invariants.
Sat Jul 7 02:50:14 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_parent): Enforce
the widget/child realization/mapping invariants.
* gtk/gtkwidget.[ch] gtk/gtkprivate.h: Add functions
gtk_widget_[get/set]_child_visible() to control
whether visible children of a mapped window are
mapped.
* docs/widget_system.txt: Updated for changes in
container contract, and addition of GTK_CHILD_VISIBLE.
* gtk/gtkcontainer.c: Add generic map()/unmap()
functions that work for almost all containers.
* gtk/gtknotebook.c gtk/gtkpacker.c: Use
gtk_widget_set_child_visible() where necessary.
* gtk/*.c: Remove excess map(), unmap(), and
realization/mapping invariant enforcing code
from many containers.
Diffstat (limited to 'gtk/gtklayout.c')
-rw-r--r-- | gtk/gtklayout.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c index ec1ffc5579..c50290509a 100644 --- a/gtk/gtklayout.c +++ b/gtk/gtklayout.c @@ -233,20 +233,10 @@ gtk_layout_put (GtkLayout *layout, layout->children = g_list_append (layout->children, child); - gtk_widget_set_parent (child_widget, GTK_WIDGET (layout)); if (GTK_WIDGET_REALIZED (layout)) gtk_widget_set_parent_window (child->widget, layout->bin_window); - - if (GTK_WIDGET_REALIZED (layout)) - gtk_widget_realize (child_widget); - - if (GTK_WIDGET_VISIBLE (layout) && GTK_WIDGET_VISIBLE (child_widget)) - { - if (GTK_WIDGET_MAPPED (layout)) - gtk_widget_map (child_widget); - - gtk_widget_queue_resize (child_widget); - } + + gtk_widget_set_parent (child_widget, GTK_WIDGET (layout)); } void |