psppire_acr_dispose (GObject *obj)
{
PsppireAcr *acr = PSPPIRE_ACR (obj);
+
+ if (acr->dispose_has_run)
+ return;
+ acr->dispose_has_run = TRUE;
+
psppire_acr_set_model (acr, NULL);
G_OBJECT_CLASS (psppire_acr_parent_class)->dispose (obj);
GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL);
+ acr->dispose_has_run = FALSE;
+
gtk_orientable_set_orientation (GTK_ORIENTABLE (acr), GTK_ORIENTATION_HORIZONTAL);
acr->tv = GTK_TREE_VIEW (gtk_tree_view_new ());
{
GtkBox parent;
-
+ gboolean dispose_has_run;
GtkListStore *list_store;
GtkTreeView *tv;
object_class->finalize = psppire_conf_finalize;
object_class->dispose = psppire_conf_dispose;
object_class->constructor = psppire_conf_construct;
-
}
conf->keyfile = g_key_file_new ();
- conf->dispose_has_run = FALSE;
conf->idle = 0;
}
GObject parent;
/*< private >*/
- gboolean dispose_has_run ;
GKeyFile *keyfile;
gchar *filename;
static void
psppire_data_editor_finalize (GObject *obj)
{
+ PsppireDataEditor *de = (PsppireDataEditor *) obj;
+ if (de->font)
+ pango_font_description_free (de->font);
+
/* Chain up to the parent class */
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
{
PsppireDataEditor *de = (PsppireDataEditor *) obj;
- if (de->data_store)
- {
- g_object_unref (de->data_store);
- de->data_store = NULL;
- }
+ if (de->dispose_has_run)
+ return;
- if (de->dict)
- {
- g_object_unref (de->dict);
- de->dict = NULL;
- }
+ de->dispose_has_run = TRUE;
- if (de->font != NULL)
- {
- pango_font_description_free (de->font);
- de->font = NULL;
- }
+ g_object_unref (de->data_store);
+ g_object_unref (de->dict);
/* Chain up to the parent class */
G_OBJECT_CLASS (parent_class)->dispose (obj);
GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (de));
gtk_style_context_add_class (context, "psppire-data-editor");
+ de->dispose_has_run = FALSE;
+
de->font = NULL;
g_object_set (de, "tab-pos", GTK_POS_BOTTOM, NULL);
{
GtkNotebook parent;
+ gboolean dispose_has_run;
+
/* <private> */
PsppireDataStore *data_store;
PsppireDict *dict;
modify the menu as part of the "filename" property_set() function and end up
with a Gtk-CRITICAL since 'menu' is NULL. */
static void
-psppire_data_window_init (PsppireDataWindow *de)
+psppire_data_window_init (PsppireDataWindow *dw)
{
- de->builder = builder_new ("data-editor.ui");
+ dw->dispose_has_run = FALSE;
+
+ dw->builder = builder_new ("data-editor.ui");
}
static void
{
PsppireDataWindow *dw = PSPPIRE_DATA_WINDOW (object);
- if (dw->builder != NULL)
- {
- g_object_unref (dw->builder);
- dw->builder = NULL;
- }
+ if (dw->dispose_has_run)
+ return;
+ dw->dispose_has_run = TRUE;
+
+ g_object_unref (dw->builder);
if (dw->dict)
{
G_CALLBACK (on_split_change), dw);
g_object_unref (dw->dict);
- dw->dict = NULL;
}
- if (dw->data_store)
- {
- g_object_unref (dw->data_store);
- dw->data_store = NULL;
- }
-
- if (dw->ll.next != NULL)
- {
- ll_remove (&dw->ll);
- dw->ll.next = NULL;
- }
+ g_object_unref (dw->data_store);
if (G_OBJECT_CLASS (parent_class)->dispose)
G_OBJECT_CLASS (parent_class)->dispose (object);
dataset_destroy (dataset);
}
+ if (dw->ll.next != NULL)
+ {
+ ll_remove (&dw->ll);
+ dw->ll.next = NULL;
+ }
+
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
{
PsppireWindow parent;
+ gboolean dispose_has_run;
+
/* <private> */
PsppireDataEditor *data_editor;
GtkBuilder *builder;
{
PsppireDict *d = PSPPIRE_DICT (object);
+ if (!d->dispose_has_run)
+ return;
+
+ d->dispose_has_run = TRUE;
+
dict_set_callbacks (d->dict, NULL, NULL);
dict_unref (d->dict);
};
static void
-psppire_dict_init (PsppireDict *psppire_dict)
+psppire_dict_init (PsppireDict *d)
{
- psppire_dict->stamp = g_random_int ();
- psppire_dict->disable_insert_signal = FALSE;
+ d->dispose_has_run = FALSE;
+
+ d->stamp = g_random_int ();
+ d->disable_insert_signal = FALSE;
}
/**
GObject parent;
struct dictionary *dict;
+ gboolean dispose_has_run;
+
gboolean disable_insert_signal;
/* For GtkTreeModelIface */
gint stamp;
static void
psppire_scanf_init (PsppireScanf *w)
{
+ w->dispose_has_run = FALSE;
+
gtk_orientable_set_orientation (GTK_ORIENTABLE (w), GTK_ORIENTATION_HORIZONTAL);
}
static void
psppire_window_register_init (PsppireWindowRegister *window_register)
{
- window_register->dispose_has_run = FALSE;
window_register->name_table = g_hash_table_new (g_str_hash, g_str_equal);
}
GObject parent;
/*< private >*/
- gboolean dispose_has_run ;
GHashTable *name_table;
};