/* --- prototypes --- */
static void psppire_dict_class_init (PsppireDictClass *class);
static void psppire_dict_init (PsppireDict *dict);
-static void psppire_dict_finalize (GObject *object);
+static void psppire_dict_dispose (GObject *object);
static void dictionary_tree_model_init (GtkTreeModelIface *iface);
parent_class = g_type_class_peek_parent (class);
- object_class->finalize = psppire_dict_finalize;
+ object_class->dispose = psppire_dict_dispose;
signals [BACKEND_CHANGED] =
g_signal_new ("backend-changed",
}
static void
-psppire_dict_finalize (GObject *object)
+psppire_dict_dispose (GObject *object)
{
PsppireDict *d = PSPPIRE_DICT (object);
- dict_destroy (d->dict);
+ dict_set_callbacks (d->dict, NULL, NULL);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
/* Pass on callbacks from src/data/dictionary, as
if (p->psppire_dict != NULL)
{
- /* This destroys p->dict also. */
+ dict_destroy (p->psppire_dict->dict);
g_object_unref (p->psppire_dict);
}
clear_modified_vars (ia);