Commit 20502fc7 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

fixed bug #503955 'Activating "Add Parent" on an internal widget component

* plugins/gtk+/glade-gtk.c: fixed bug #503955
  'Activating "Add Parent" on an internal widget component causes crash'

svn path=/trunk/; revision=1656
parent 720d6049
2007-12-18 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* plugins/gtk+/glade-gtk.c: fixed bug #503955
'Activating "Add Parent" on an internal widget component causes crash'
2007-12-10 Vincent Geddes <vgeddes@gnome.org>
* gladeui/glade-app.c (glade_app_init): Fix icon theme path for win32
......
......@@ -249,11 +249,14 @@ widget_parent_changed (GtkWidget *widget,
{
GladeWidget *gwidget = glade_widget_get_from_gobject (widget);
if (gwidget->parent && !GTK_IS_WINDOW (glade_widget_get_object (gwidget->parent)))
if (gwidget->parent && !GTK_IS_WINDOW (glade_widget_get_object (gwidget->parent)) &&
gwidget->parent->internal == NULL)
glade_widget_set_action_sensitive (gwidget, "remove_parent", TRUE);
else
glade_widget_set_action_sensitive (gwidget, "remove_parent", FALSE);
if (gwidget->internal)
glade_widget_set_action_sensitive (gwidget, "add_parent", FALSE);
}
void
......@@ -265,7 +268,7 @@ glade_gtk_widget_deep_post_create (GladeWidgetAdaptor *adaptor,
glade_widget_set_action_sensitive (gwidget, "remove_parent", FALSE);
if (GTK_IS_WINDOW (widget))
if (GTK_IS_WINDOW (widget) || gwidget->internal)
glade_widget_set_action_sensitive (gwidget, "add_parent", FALSE);
/* Watch parents and set actions sensitive/insensitive */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment