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/gtktable.c | |
parent | 8f2bf7976d73ba58b808002268c49a19e9b586ee (diff) | |
download | gdk-pixbuf-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/gtktable.c')
-rw-r--r-- | gtk/gtktable.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/gtk/gtktable.c b/gtk/gtktable.c index 64c07fb36..e85f122d4 100644 --- a/gtk/gtktable.c +++ b/gtk/gtktable.c @@ -54,8 +54,6 @@ enum static void gtk_table_class_init (GtkTableClass *klass); static void gtk_table_init (GtkTable *table); static void gtk_table_finalize (GObject *object); -static void gtk_table_map (GtkWidget *widget); -static void gtk_table_unmap (GtkWidget *widget); static void gtk_table_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_table_size_allocate (GtkWidget *widget, @@ -141,8 +139,6 @@ gtk_table_class_init (GtkTableClass *class) gobject_class->get_property = gtk_table_get_property; gobject_class->set_property = gtk_table_set_property; - widget_class->map = gtk_table_map; - widget_class->unmap = gtk_table_unmap; widget_class->size_request = gtk_table_size_request; widget_class->size_allocate = gtk_table_size_allocate; @@ -610,17 +606,6 @@ gtk_table_attach (GtkTable *table, table->children = g_list_prepend (table->children, table_child); gtk_widget_set_parent (child, GTK_WIDGET (table)); - - if (GTK_WIDGET_REALIZED (child->parent)) - gtk_widget_realize (child); - - if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child)) - { - if (GTK_WIDGET_MAPPED (child->parent)) - gtk_widget_map (child); - - gtk_widget_queue_resize (child); - } } void @@ -834,54 +819,6 @@ gtk_table_finalize (GObject *object) } static void -gtk_table_map (GtkWidget *widget) -{ - GtkTable *table; - GtkTableChild *child; - GList *children; - - g_return_if_fail (GTK_IS_TABLE (widget)); - - table = GTK_TABLE (widget); - GTK_WIDGET_SET_FLAGS (table, GTK_MAPPED); - - children = table->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget) && - !GTK_WIDGET_MAPPED (child->widget)) - gtk_widget_map (child->widget); - } -} - -static void -gtk_table_unmap (GtkWidget *widget) -{ - GtkTable *table; - GtkTableChild *child; - GList *children; - - g_return_if_fail (GTK_IS_TABLE (widget)); - - table = GTK_TABLE (widget); - GTK_WIDGET_UNSET_FLAGS (table, GTK_MAPPED); - - children = table->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child->widget) && - GTK_WIDGET_MAPPED (child->widget)) - gtk_widget_unmap (child->widget); - } -} - -static void gtk_table_size_request (GtkWidget *widget, GtkRequisition *requisition) { |