summaryrefslogtreecommitdiff
path: root/gtk/gtkfixed.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-07-19 14:57:15 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-07-19 14:57:15 +0000
commitaa49527fa78bf5b3a3f1394092b248e27e1bfa3f (patch)
treea1b7651c9e379ab1f7ffe2af68727cdccdf682e6 /gtk/gtkfixed.c
parent8f2bf7976d73ba58b808002268c49a19e9b586ee (diff)
downloadgtk+-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/gtkfixed.c')
-rw-r--r--gtk/gtkfixed.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 84aaf63968..3b214886a8 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -29,7 +29,6 @@
static void gtk_fixed_class_init (GtkFixedClass *klass);
static void gtk_fixed_init (GtkFixed *fixed);
-static void gtk_fixed_map (GtkWidget *widget);
static void gtk_fixed_realize (GtkWidget *widget);
static void gtk_fixed_size_request (GtkWidget *widget,
GtkRequisition *requisition);
@@ -87,7 +86,6 @@ gtk_fixed_class_init (GtkFixedClass *class)
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
- widget_class->map = gtk_fixed_map;
widget_class->realize = gtk_fixed_realize;
widget_class->size_request = gtk_fixed_size_request;
widget_class->size_allocate = gtk_fixed_size_allocate;
@@ -140,17 +138,6 @@ gtk_fixed_put (GtkFixed *fixed,
gtk_widget_set_parent (widget, GTK_WIDGET (fixed));
fixed->children = g_list_append (fixed->children, child_info);
-
- if (GTK_WIDGET_REALIZED (fixed))
- gtk_widget_realize (widget);
-
- if (GTK_WIDGET_VISIBLE (fixed) && GTK_WIDGET_VISIBLE (widget))
- {
- if (GTK_WIDGET_MAPPED (fixed))
- gtk_widget_map (widget);
-
- gtk_widget_queue_resize (GTK_WIDGET (fixed));
- }
}
void
@@ -185,32 +172,6 @@ gtk_fixed_move (GtkFixed *fixed,
}
static void
-gtk_fixed_map (GtkWidget *widget)
-{
- GtkFixed *fixed;
- GtkFixedChild *child;
- GList *children;
-
- g_return_if_fail (GTK_IS_FIXED (widget));
-
- GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
- fixed = GTK_FIXED (widget);
-
- children = fixed->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);
- }
-
- gdk_window_show (widget->window);
-}
-
-static void
gtk_fixed_realize (GtkWidget *widget)
{
GdkWindowAttr attributes;