Separate the execute_syntax function into its own file.
[pspp-builds.git] / src / ui / gui / compute-dialog.c
index 7269ab79750e76c3ed2cf5c7431045d5506545c3..183aa31b4da8a3e04e961a2da7e2e5fa82de034d 100644 (file)
 #include "psppire-keypad.h"
 #include "psppire-data-window.h"
 #include "psppire-var-store.h"
+#include "psppire-selector.h"
 #include "dialog-common.h"
-#include "dict-display.h"
+#include <libpspp/i18n.h>
 
 #include <language/expressions/public.h>
 #include <language/syntax-string-source.h>
-#include "helper.h"
+#include "executor.h"
 
 static void function_list_populate (GtkTreeView *tv);
 
@@ -396,11 +397,10 @@ compute_dialog (GObject *o, gpointer data)
 
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
 
-
-  attach_dictionary_to_treeview (GTK_TREE_VIEW (dict_view),
-                                vs->dict,
-                                GTK_SELECTION_SINGLE, NULL);
-
+  g_object_set (dict_view,
+               "dictionary", vs->dict,
+               "selection-mode", GTK_SELECTION_SINGLE,
+               NULL);
 
   psppire_selector_set_subjects (PSPPIRE_SELECTOR (var_selector),
                                 dict_view, syntax_area,
@@ -632,7 +632,9 @@ insert_source_row_into_text_view (GtkTreeIter iter,
 
   gtk_tree_path_free (path);
 
-  name = pspp_locale_to_utf8 (var_get_name (var), -1, NULL);
+  name = recode_string (UTF8, psppire_dict_encoding (dict),
+                       var_get_name (var),
+                       -1);
 
   buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dest));