summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-11-25 00:12:48 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-01-18 13:31:40 -0500
commitc4cea7f93569193a1475b8aa680f13e9ee903298 (patch)
tree156bd607f277b78491cf3766269779669ebdcf18 /plugins
parent7a813a6d81e0ba9679bcc15907371c243c560bc7 (diff)
downloadglade-c4cea7f93569193a1475b8aa680f13e9ee903298.tar.gz
GtkStack: Survive loading an empty stack
The code in glade_gtk_stack_add_child was not robust enough against disappearing placeholders. https://bugzilla.gnome.org/show_bug.cgi?id=740668
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtk+/glade-gtk-stack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/gtk+/glade-gtk-stack.c b/plugins/gtk+/glade-gtk-stack.c
index 2185bbde..3cf3c3a0 100644
--- a/plugins/gtk+/glade-gtk-stack.c
+++ b/plugins/gtk+/glade-gtk-stack.c
@@ -504,15 +504,15 @@ glade_gtk_stack_add_child (GladeWidgetAdaptor * adaptor,
gtk_container_add (GTK_CONTAINER (object), GTK_WIDGET (child));
+ gchild = glade_widget_get_from_gobject (child);
+ if (gchild != NULL)
+ glade_widget_set_pack_action_visible (gchild, "remove_page", FALSE);
+
gbox = glade_widget_get_from_gobject (object);
glade_widget_property_get (gbox, "pages", &pages);
glade_widget_property_set (gbox, "pages", pages);
glade_widget_property_get (gbox, "page", &page);
glade_widget_property_set (gbox, "page", page);
-
- gchild = glade_widget_get_from_gobject (child);
- if (gchild != NULL)
- glade_widget_set_pack_action_visible (gchild, "remove_page", FALSE);
}
void