psppire-var-sheet: Refresh var sheet when variables change.
[pspp] / src / ui / gui / aggregate-dialog.c
index b3ea30ccca7f60f7bb31e4814e0b3664302584c9..7348cd5ed2bebf6220141c6134c3fb9b64293054 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2010, 2011  Free Software Foundation
+   Copyright (C) 2010, 2011, 2012  Free Software Foundation
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@
 #include "dict-display.h"
 
 #include "executor.h"
+#include "builder-wrapper.h"
 #include "helper.h"
 
 #include <gtk/gtk.h>
@@ -225,6 +226,7 @@ populate_combo_model (GtkComboBox *cb)
   gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (cb), renderer, "text", 0);
 
   gtk_combo_box_set_model (GTK_COMBO_BOX (cb), GTK_TREE_MODEL (list));
+  g_object_unref (list);
 }
 
 
@@ -467,8 +469,6 @@ aggregate_dialog (PsppireDataWindow *dw)
   struct aggregate fd;
   gint response;
 
-  PsppireVarStore *vs;
-
   GtkWidget *dialog ;
   GtkWidget *source ;
 
@@ -526,6 +526,7 @@ aggregate_dialog (PsppireDataWindow *dw)
                                             G_TYPE_DOUBLE);
 
     psppire_acr_set_model (PSPPIRE_ACR (fd.summary_acr), list);
+    g_object_unref (list);
 
     psppire_acr_set_get_value_func (PSPPIRE_ACR (fd.summary_acr),
                                                 get_summary_spec, &fd);
@@ -563,11 +564,9 @@ aggregate_dialog (PsppireDataWindow *dw)
 
   g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh),  &fd);
 
-  g_object_get (fd.de->data_editor, "var-store", &vs, NULL);
-
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fd.de));
 
-  g_object_get (vs, "dictionary", &fd.dict, NULL);
+  g_object_get (fd.de->data_editor, "dictionary", &fd.dict, NULL);
   g_object_set (source, "model", fd.dict, NULL);