Separated psppire_selector_set_subjects into two individual functions
[pspp-builds.git] / src / ui / gui / examine-dialog.c
index 171d88cfc2f9f6def60a12b6fee571f22825bbce..09b5f8b819182e2ae24450e24ebf8f2e9b89bb3c 100644 (file)
@@ -28,7 +28,7 @@
 #include <ui/gui/helper.h>
 #include <ui/gui/psppire-dialog.h>
 #include <ui/gui/psppire-var-store.h>
-#include <ui/gui/helper.h>
+#include "executor.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -279,39 +279,30 @@ examine_dialog (GObject *o, gpointer data)
   gtk_window_set_transient_for (GTK_WINDOW (ex_d.stats_dialog), GTK_WINDOW (de));
   gtk_window_set_transient_for (GTK_WINDOW (ex_d.opts_dialog), GTK_WINDOW (de));
 
-  attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
-                                vs->dict,
-                                GTK_SELECTION_MULTIPLE, NULL);
-
+  g_object_get (vs, "dictionary", &ex_d.dict, NULL);
+  g_object_set (source, "model", ex_d.dict, NULL);
 
-  set_dest_model (GTK_TREE_VIEW (ex_d.dep_list), vs->dict);
-  ex_d.dict = vs->dict;
+  set_dest_model (GTK_TREE_VIEW (ex_d.dep_list), ex_d.dict);
 
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (dep_selector),
-                                source,
-                                ex_d.dep_list,
+  psppire_selector_set_select_func (PSPPIRE_SELECTOR (dep_selector),
                                 insert_source_row_into_tree_view,
-                                NULL, NULL);
+                                NULL);
 
   psppire_selector_set_allow (PSPPIRE_SELECTOR (dep_selector),
                              numeric_only);
 
-  set_dest_model (GTK_TREE_VIEW (ex_d.fct_list), vs->dict);
+  set_dest_model (GTK_TREE_VIEW (ex_d.fct_list), ex_d.dict);
 
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (fct_selector),
-                                source,
-                                ex_d.fct_list,
+  psppire_selector_set_select_func (PSPPIRE_SELECTOR (fct_selector),
                                 insert_source_row_into_tree_view,
-                                NULL, NULL);
+                                NULL);
 
 
-  psppire_selector_set_subjects (PSPPIRE_SELECTOR (id_selector),
-                                source,
-                                ex_d.id_entry,
+  psppire_selector_set_select_func (PSPPIRE_SELECTOR (id_selector),
                                 insert_source_row_into_entry,
-                                NULL, NULL);
+                                NULL);
 
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &ex_d);