PsppireDictView: Change "dictionary" property to "model".
[pspp-builds.git] / src / ui / gui / crosstabs-dialog.c
index f5593586778cd3b3bf17bcdb6376564f44d08085..791eea2563871ec7768e5356d8b619632fd7c6b8 100644 (file)
@@ -389,6 +389,7 @@ crosstabs_dialog (GObject *o, gpointer data)
 
   GtkBuilder *xml = builder_new ("crosstabs.ui");
   PsppireVarStore *vs = NULL;
+  PsppireDict *dict = NULL;
 
   PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
 
@@ -422,28 +423,25 @@ crosstabs_dialog (GObject *o, gpointer data)
 
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
-  g_object_set (source, "dictionary", vs->dict, NULL);
+  g_object_get (vs, "dictionary", &dict, NULL);
+  g_object_set (source, "model", dict, NULL);
 
-  set_dest_model (GTK_TREE_VIEW (dest_rows), vs->dict);
-  set_dest_model (GTK_TREE_VIEW (dest_cols), vs->dict);
+  set_dest_model (GTK_TREE_VIEW (dest_rows), dict);
+  set_dest_model (GTK_TREE_VIEW (dest_cols), dict);
 
   psppire_selector_set_subjects (PSPPIRE_SELECTOR (row_selector),
-                                source,
-                                dest_rows,
                                 insert_source_row_into_tree_view,
                                 NULL,
                                 NULL);
 
   psppire_selector_set_subjects (PSPPIRE_SELECTOR (col_selector),
-                                source,
-                                dest_cols,
                                 insert_source_row_into_tree_view,
                                 NULL,
                                 NULL);
 
   cd.row_vars = GTK_TREE_VIEW (dest_rows);
   cd.col_vars = GTK_TREE_VIEW (dest_cols);
-  cd.dict = vs->dict;
+  g_object_get (vs, "dictionary", &cd.dict, NULL);
   cd.format_dialog = get_widget_assert (xml, "format-dialog");
   cd.table_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "print-tables"));
   cd.pivot_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pivot"));