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/gtkviewport.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/gtkviewport.c')
-rw-r--r-- | gtk/gtkviewport.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 21726288d2..9ac5b47d30 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -50,8 +50,6 @@ static void gtk_viewport_get_property (GObject *object, static void gtk_viewport_set_scroll_adjustments (GtkViewport *viewport, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); -static void gtk_viewport_map (GtkWidget *widget); -static void gtk_viewport_unmap (GtkWidget *widget); static void gtk_viewport_realize (GtkWidget *widget); static void gtk_viewport_unrealize (GtkWidget *widget); static void gtk_viewport_paint (GtkWidget *widget, @@ -116,8 +114,6 @@ gtk_viewport_class_init (GtkViewportClass *class) gobject_class->get_property = gtk_viewport_get_property; object_class->destroy = gtk_viewport_destroy; - widget_class->map = gtk_viewport_map; - widget_class->unmap = gtk_viewport_unmap; widget_class->realize = gtk_viewport_realize; widget_class->unrealize = gtk_viewport_unrealize; widget_class->expose_event = gtk_viewport_expose; @@ -413,34 +409,6 @@ gtk_viewport_get_shadow_type (GtkViewport *viewport) } static void -gtk_viewport_map (GtkWidget *widget) -{ - GtkBin *bin; - - g_return_if_fail (GTK_IS_VIEWPORT (widget)); - - GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); - bin = GTK_BIN (widget); - - if (bin->child && - GTK_WIDGET_VISIBLE (bin->child) && - !GTK_WIDGET_MAPPED (bin->child)) - gtk_widget_map (bin->child); - - gdk_window_show (widget->window); -} - -static void -gtk_viewport_unmap (GtkWidget *widget) -{ - g_return_if_fail (GTK_IS_VIEWPORT (widget)); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); - - gdk_window_hide (widget->window); -} - -static void gtk_viewport_realize (GtkWidget *widget) { GtkBin *bin; |