diff options
author | Tim Janik <timj@gtk.org> | 1998-04-30 04:03:06 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-04-30 04:03:06 +0000 |
commit | e94d12f9260ef2e6200c128ddadce3f8e30041bd (patch) | |
tree | 8dce12d4e35d6085d972f748fbcb5b9294a143fa | |
parent | cde57dc1d275caecc2c1df770783e6c9927e7524 (diff) | |
download | gdk-pixbuf-e94d12f9260ef2e6200c128ddadce3f8e30041bd.tar.gz |
made this function issue a warning if the GtkBin widget already has a
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 8 | ||||
-rw-r--r-- | gtk/gtkbin.c | 34 | ||||
-rw-r--r-- | gtk/gtkbox.c | 2 |
9 files changed, 74 insertions, 18 deletions
@@ -1,3 +1,11 @@ +Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if + the GtkBin widget already has a child. + + * gtk/gtkbox.c (gtk_box_pack_{start|end}): + check that child->parent == NULL; + Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkselection.c (gtk_selection_clear): Only return diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 831b98a4a..fa89cad2b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if + the GtkBin widget already has a child. + + * gtk/gtkbox.c (gtk_box_pack_{start|end}): + check that child->parent == NULL; + Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkselection.c (gtk_selection_clear): Only return diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 831b98a4a..fa89cad2b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if + the GtkBin widget already has a child. + + * gtk/gtkbox.c (gtk_box_pack_{start|end}): + check that child->parent == NULL; + Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkselection.c (gtk_selection_clear): Only return diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 831b98a4a..fa89cad2b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if + the GtkBin widget already has a child. + + * gtk/gtkbox.c (gtk_box_pack_{start|end}): + check that child->parent == NULL; + Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkselection.c (gtk_selection_clear): Only return diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 831b98a4a..fa89cad2b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if + the GtkBin widget already has a child. + + * gtk/gtkbox.c (gtk_box_pack_{start|end}): + check that child->parent == NULL; + Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkselection.c (gtk_selection_clear): Only return diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 831b98a4a..fa89cad2b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if + the GtkBin widget already has a child. + + * gtk/gtkbox.c (gtk_box_pack_{start|end}): + check that child->parent == NULL; + Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkselection.c (gtk_selection_clear): Only return diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 831b98a4a..fa89cad2b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org> + + * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if + the GtkBin widget already has a child. + + * gtk/gtkbox.c (gtk_box_pack_{start|end}): + check that child->parent == NULL; + Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkselection.c (gtk_selection_clear): Only return diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c index 4e7b56e14..c1e07766d 100644 --- a/gtk/gtkbin.c +++ b/gtk/gtkbin.c @@ -200,27 +200,25 @@ gtk_bin_add (GtkContainer *container, g_return_if_fail (widget != NULL); bin = GTK_BIN (container); + g_return_if_fail (bin->child == NULL); - if (!bin->child) + gtk_widget_set_parent (widget, GTK_WIDGET (container)); + + if (GTK_WIDGET_VISIBLE (widget->parent)) { - gtk_widget_set_parent (widget, GTK_WIDGET (container)); - - if (GTK_WIDGET_VISIBLE (widget->parent)) - { - if (GTK_WIDGET_REALIZED (widget->parent) && - !GTK_WIDGET_REALIZED (widget)) - gtk_widget_realize (widget); - - if (GTK_WIDGET_MAPPED (widget->parent) && - !GTK_WIDGET_MAPPED (widget)) - gtk_widget_map (widget); - } - - bin->child = widget; - - if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container)) - gtk_widget_queue_resize (widget); + if (GTK_WIDGET_REALIZED (widget->parent) && + !GTK_WIDGET_REALIZED (widget)) + gtk_widget_realize (widget); + + if (GTK_WIDGET_MAPPED (widget->parent) && + !GTK_WIDGET_MAPPED (widget)) + gtk_widget_map (widget); } + + bin->child = widget; + + if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container)) + gtk_widget_queue_resize (widget); } static void diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 58891217f..0a58ca046 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -160,6 +160,7 @@ gtk_box_pack_start (GtkBox *box, g_return_if_fail (box != NULL); g_return_if_fail (GTK_IS_BOX (box)); g_return_if_fail (child != NULL); + g_return_if_fail (child->parent == NULL); child_info = g_new (GtkBoxChild, 1); child_info->widget = child; @@ -199,6 +200,7 @@ gtk_box_pack_end (GtkBox *box, g_return_if_fail (box != NULL); g_return_if_fail (GTK_IS_BOX (box)); g_return_if_fail (child != NULL); + g_return_if_fail (child->parent == NULL); child_info = g_new (GtkBoxChild, 1); child_info->widget = child; |