* gladeui/glade-base-editor.c: Fixed to unref in ->dispose() and to unset the loaded widget

in the signal editor when doing so.
This commit is contained in:
Tristan Van Berkom 2010-03-31 22:00:10 -04:00
parent fa97bcf995
commit a70df15164
2 changed files with 22 additions and 7 deletions

View File

@ -17,6 +17,9 @@
* gladeui/glade-project.c: Added the targets-changed signal to refresh views with data about
target project versions (notebook tabs).
* gladeui/glade-base-editor.c: Fixed to unref in ->dispose() and to unset the loaded widget
in the signal editor when doing so.
2010-03-30 Tristan Van Berkom <tvb@gnome.org>
* plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in: Block the glade_gtk_text_buffer_changed()

View File

@ -1177,8 +1177,7 @@ glade_base_editor_set_container (GladeBaseEditor *editor,
{
GladeBaseEditorPrivate *e = editor->priv;
if (e->project)
glade_base_editor_project_disconnect (editor);
glade_base_editor_project_disconnect (editor);
if (container == NULL)
{
@ -1237,15 +1236,27 @@ glade_base_editor_finalize (GObject *object)
{
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
g_free (cobj->priv);
G_OBJECT_CLASS(parent_class)->finalize (object);
}
static void
glade_base_editor_dispose (GObject *object)
{
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
glade_signal_editor_load_widget (cobj->priv->signal_editor, NULL);
reset_child_types (cobj);
/* Free private members, etc. */
glade_base_editor_project_disconnect (cobj);
g_object_unref (cobj->priv->group);
g_free (cobj->priv);
G_OBJECT_CLASS(parent_class)->finalize(object);
if (cobj->priv->group)
cobj->priv->group =
(g_object_unref (cobj->priv->group), NULL);
G_OBJECT_CLASS(parent_class)->dispose (object);
}
static void
@ -1430,6 +1441,7 @@ glade_base_editor_class_init (GladeBaseEditorClass *klass)
parent_class = g_type_class_peek_parent(klass);
object_class->finalize = glade_base_editor_finalize;
object_class->dispose = glade_base_editor_dispose;
object_class->set_property = glade_base_editor_set_property;
object_class->get_property = glade_base_editor_get_property;