diff options
author | Tristan Van Berkom <tristan@upstairslabs.com> | 2015-12-09 13:16:20 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan@upstairslabs.com> | 2015-12-09 13:17:08 +0900 |
commit | 0ed81f09e51aefa36eb80bb7cad9722fa85b8bf0 (patch) | |
tree | 4f2c53c2b94a05c6e98f7af42e4e5bad4e03e8c1 | |
parent | 472d652691248adce2e823910c484de6d50e02c9 (diff) | |
download | glade-0ed81f09e51aefa36eb80bb7cad9722fa85b8bf0.tar.gz |
Bug 754131: Avoid crashes when loading boxes with center-child children
Patch by Juan Pablo Ugarte
-rw-r--r-- | plugins/gtk+/glade-gtk-box.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/gtk+/glade-gtk-box.c b/plugins/gtk+/glade-gtk-box.c index 8b9d228d..6a0eb0ac 100644 --- a/plugins/gtk+/glade-gtk-box.c +++ b/plugins/gtk+/glade-gtk-box.c @@ -57,12 +57,12 @@ glade_gtk_box_create_editable (GladeWidgetAdaptor * adaptor, } static void -glade_gtk_box_parse_finished (GladeProject * project, GObject * object) +glade_gtk_box_parse_finished (GladeProject * project, GObject *gbox) { - GladeWidget *gbox; + GObject *box = glade_widget_get_object (gbox); - gbox = glade_widget_get_from_gobject (object); - glade_widget_property_set (gbox, "use-center-child", gtk_box_get_center_widget (GTK_BOX (object)) != NULL); + glade_widget_property_set (gbox, "use-center-child", + gtk_box_get_center_widget (GTK_BOX (box)) != NULL); } void @@ -87,9 +87,9 @@ glade_gtk_box_post_create (GladeWidgetAdaptor * adaptor, if (reason == GLADE_CREATE_LOAD) { - g_signal_connect (project, "parse-finished", - G_CALLBACK (glade_gtk_box_parse_finished), - container); + g_signal_connect_object (project, "parse-finished", + G_CALLBACK (glade_gtk_box_parse_finished), + gwidget, 0); } } |