[glade] GtkStack: Survive loading an empty stack
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GtkStack: Survive loading an empty stack
- Date: Tue, 20 Jan 2015 03:14:54 +0000 (UTC)
commit c4cea7f93569193a1475b8aa680f13e9ee903298
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 25 00:12:48 2014 -0500
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
plugins/gtk+/glade-gtk-stack.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-stack.c b/plugins/gtk+/glade-gtk-stack.c
index 2185bbd..3cf3c3a 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]