Add informative messages for common problems. (#137974, Owen Taylor)
Fri May 28 14:57:13 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkwidget.c (gtk_widget_set_parent): Add informative messages for common problems. (#137974, Owen Taylor)
This commit is contained in:
committed by
Matthias Clasen
parent
4e1f3b630d
commit
eecfff186b
@ -1,3 +1,8 @@
|
|||||||
|
Fri May 28 15:00:01 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||||
|
messages for common problems. (#137974, Owen Taylor)
|
||||||
|
|
||||||
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Fri May 28 15:00:01 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||||
|
messages for common problems. (#137974, Owen Taylor)
|
||||||
|
|
||||||
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Fri May 28 15:00:01 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||||
|
messages for common problems. (#137974, Owen Taylor)
|
||||||
|
|
||||||
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
Fri May 28 15:00:01 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_set_parent): Add informative
|
||||||
|
messages for common problems. (#137974, Owen Taylor)
|
||||||
|
|
||||||
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
Fri May 28 14:20:17 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
* gdk/x11/gdkevents-x11.c: Fix off-by-one allocation
|
||||||
|
|||||||
@ -4253,10 +4253,18 @@ gtk_widget_set_parent (GtkWidget *widget,
|
|||||||
GtkStateData data;
|
GtkStateData data;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||||
g_return_if_fail (widget->parent == NULL);
|
|
||||||
g_return_if_fail (!GTK_WIDGET_TOPLEVEL (widget));
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (parent));
|
g_return_if_fail (GTK_IS_WIDGET (parent));
|
||||||
g_return_if_fail (widget != parent);
|
g_return_if_fail (widget != parent);
|
||||||
|
if (widget->parent != NULL)
|
||||||
|
{
|
||||||
|
g_warning ("Can't set a parent on widget which has a parent\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (GTK_WIDGET_TOPLEVEL (widget))
|
||||||
|
{
|
||||||
|
g_warning ("Can't set a parent on a toplevel widget\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* keep this function in sync with gtk_menu_attach_to_widget()
|
/* keep this function in sync with gtk_menu_attach_to_widget()
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user