Commit 3f48dfac authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* plugins/gtk+/glade-gtk.c: Make sure any manually created glade widgets pass

	  through glade_widget_add_child() and get a proper ref from the parent (fixing
	  more last minute crahsers).

	* gladeui/glade-utils.c: Fixed crasher bug 628233 partially using patch by
	  ramz <ramanathan.nitt@gmail.com>.
parent c2ff2efb
......@@ -20,6 +20,13 @@
the plugin doesnt screw up, also hold a ref to widgets being rebuilt since
they can go out and into the project.
* plugins/gtk+/glade-gtk.c: Make sure any manually created glade widgets pass
through glade_widget_add_child() and get a proper ref from the parent (fixing
more last minute crahsers).
* gladeui/glade-utils.c: Fixed crasher bug 628233 partially using patch by
ramz <ramanathan.nitt@gmail.com>.
2010-12-14 Tristan Van Berkom <tristanvb@openismus.com>
* Reverted 3.0 commit, now targetting this branch to the final GTK+ 2.x chapter
......
......@@ -1023,7 +1023,7 @@ glade_util_find_iter (GtkTreeModel *model,
gint column)
{
GtkTreeIter *retval = NULL;
GObject* object;
GObject* object = NULL;
GtkTreeIter *next;
g_return_val_if_fail (GTK_IS_TREE_MODEL (model), NULL);
......@@ -1049,7 +1049,9 @@ glade_util_find_iter (GtkTreeModel *model,
break;
}
g_object_unref (object);
if (object &&
gtk_tree_model_get_column_type (model, column) == G_TYPE_OBJECT)
g_object_unref (object);
if (!gtk_tree_model_iter_next (model, next))
break;
......
......@@ -3340,14 +3340,12 @@ glade_gtk_frame_post_create (GladeWidgetAdaptor *adaptor,
NULL);
label_text = g_strdup_printf ("<b>%s</b>", glade_widget_get_name (gframe));
glade_widget_property_set (glabel, "label", label_text);
glade_widget_property_set (glabel, "use-markup", "TRUE");
g_free (label_text);
g_object_set_data (glabel->object, "special-child-type", "label_item");
gtk_frame_set_label_widget (GTK_FRAME (frame), GTK_WIDGET (glabel->object));
gtk_widget_show (GTK_WIDGET (glabel->object));
g_free (label_text);
glade_widget_add_child (gframe, glabel, FALSE);
/* add alignment */
galignment = glade_widget_adaptor_create_widget (alignment_adaptor, FALSE,
......@@ -3356,8 +3354,7 @@ glade_gtk_frame_post_create (GladeWidgetAdaptor *adaptor,
NULL);
glade_widget_property_set (galignment, "left-padding", 12);
gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (galignment->object));
gtk_widget_show (GTK_WIDGET (galignment->object));
glade_widget_add_child (gframe, galignment, FALSE);
}
/* Chain Up */
......@@ -4612,10 +4609,7 @@ glade_gtk_expander_post_create (GladeWidgetAdaptor *adaptor,
glade_widget_property_set (glabel, "label", "expander");
g_object_set_data (glabel->object, "special-child-type", "label_item");
gtk_expander_set_label_widget (GTK_EXPANDER (expander),
GTK_WIDGET (glabel->object));
gtk_widget_show (GTK_WIDGET (glabel->object));
glade_widget_add_child (gexpander, glabel, FALSE);
}
gtk_expander_set_expanded (GTK_EXPANDER (expander), TRUE);
......
Supports Markdown
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