diff options
author | Juan Pablo Ugarte <jpu@src.gnome.org> | 2007-12-18 11:09:43 +0000 |
---|---|---|
committer | Juan Pablo Ugarte <jpu@src.gnome.org> | 2007-12-18 11:09:43 +0000 |
commit | 20502fc79bdfef700ab94812848cbf339468f5e8 (patch) | |
tree | 5ce6af767b65f9028628c8881ebc145de10ec9e5 | |
parent | 720d6049513669ad4af62c48c302068662bb810b (diff) | |
download | glade-20502fc79bdfef700ab94812848cbf339468f5e8.tar.gz |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | plugins/gtk+/glade-gtk.c | 7 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,8 @@ +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 diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c index d0644cd2..8cfcc6b5 100644 --- a/plugins/gtk+/glade-gtk.c +++ b/plugins/gtk+/glade-gtk.c @@ -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 */ |