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/gtklist.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/gtklist.c')
-rw-r--r-- | gtk/gtklist.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/gtk/gtklist.c b/gtk/gtklist.c index 79e42b5a22..ba080fc6c8 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -64,7 +64,6 @@ static void gtk_list_size_request (GtkWidget *widget, static void gtk_list_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static void gtk_list_realize (GtkWidget *widget); -static void gtk_list_map (GtkWidget *widget); static void gtk_list_unmap (GtkWidget *widget); static void gtk_list_style_set (GtkWidget *widget, GtkStyle *previous_style); @@ -219,7 +218,6 @@ gtk_list_class_init (GtkListClass *class) object_class->set_arg = gtk_list_set_arg; object_class->get_arg = gtk_list_get_arg; - widget_class->map = gtk_list_map; widget_class->unmap = gtk_list_unmap; widget_class->style_set = gtk_list_style_set; widget_class->realize = gtk_list_realize; @@ -352,7 +350,6 @@ gtk_list_dispose (GObject *object) * gtk_list_size_request * gtk_list_size_allocate * gtk_list_realize - * gtk_list_map * gtk_list_unmap * gtk_list_motion_notify * gtk_list_button_press @@ -479,32 +476,6 @@ gtk_list_realize (GtkWidget *widget) } static void -gtk_list_map (GtkWidget *widget) -{ - GtkList *list; - GtkWidget *child; - GList *children; - - g_return_if_fail (GTK_IS_LIST (widget)); - - GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); - list = GTK_LIST (widget); - - children = list->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child) && - !GTK_WIDGET_MAPPED (child)) - gtk_widget_map (child); - } - - gdk_window_show (widget->window); -} - -static void gtk_list_unmap (GtkWidget *widget) { GtkList *list; @@ -1077,17 +1048,6 @@ gtk_list_insert_items (GtkList *list, gtk_signal_connect (GTK_OBJECT (widget), "toggle", GTK_SIGNAL_FUNC (gtk_list_signal_item_toggle), list); - - if (GTK_WIDGET_REALIZED (widget->parent)) - gtk_widget_realize (widget); - - if (GTK_WIDGET_VISIBLE (widget->parent) && GTK_WIDGET_VISIBLE (widget)) - { - if (GTK_WIDGET_MAPPED (widget->parent)) - gtk_widget_map (widget); - - gtk_widget_queue_resize (widget); - } } |