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;
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
34
gtk/gtkbin.c
34
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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user