X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-acr.c;h=0b397fe3dcbd97edc8a65462a4294a42a3d255b6;hb=c4bc3574d974d3aaf4d291097c995a31515a308a;hp=b858df268eb904ac927576af39b47b4efc3db74b;hpb=96994a54e60e9c95b8bba54c2281acf7059b1203;p=pspp diff --git a/src/ui/gui/psppire-acr.c b/src/ui/gui/psppire-acr.c index b858df268e..0b397fe3dc 100644 --- a/src/ui/gui/psppire-acr.c +++ b/src/ui/gui/psppire-acr.c @@ -50,6 +50,11 @@ static void 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); @@ -178,7 +183,7 @@ on_change_button_clicked (PsppireAcr *acr) g_value_unset (&value); } - g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL); + g_list_foreach (l, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL); g_list_free (l); if (acr->update) acr->update (acr->update_data); @@ -204,7 +209,7 @@ on_remove_button_clicked (PsppireAcr *acr) gtk_list_store_remove (acr->list_store, &iter); - g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL); + g_list_foreach (l, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL); g_list_free (l); } @@ -220,7 +225,7 @@ row_is_selected (const PsppireAcr *acr) result = (l != NULL); - g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL); + g_list_foreach (l, GFUNC_COMPAT_CAST (gtk_tree_path_free), NULL); g_list_free (l); return result; @@ -259,6 +264,8 @@ psppire_acr_init (PsppireAcr *acr) 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 ());