X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcompute-dialog.c;h=34f686162b44db3e94edbf08c826a0c10ea42bb4;hb=7c2fa3735ac1115b6c1ad4b5e0613673de2faf4c;hp=a42ce4febf438d338727a68a9f70728217b8c2d4;hpb=d6ede2e8f16079edae2e308583f8af4f7e9daddd;p=pspp-builds.git diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index a42ce4fe..34f68616 100644 --- a/src/ui/gui/compute-dialog.c +++ b/src/ui/gui/compute-dialog.c @@ -28,7 +28,7 @@ #include #include -#include "helper.h" +#include "executor.h" static void function_list_populate (GtkTreeView *tv); @@ -389,7 +389,7 @@ compute_dialog (GObject *o, gpointer data) g_object_get (de->data_editor, "var-store", &vs, NULL); - scd.dict = vs->dict; + g_object_get (vs, "dictionary", &scd.dict, NULL); scd.use_type = FALSE; g_signal_connect (expression, "toggled", @@ -397,13 +397,12 @@ compute_dialog (GObject *o, gpointer data) gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); - g_object_set (dict_view, - "dictionary", vs->dict, + + g_object_set (dict_view, "dictionary", scd.dict, "selection-mode", GTK_SELECTION_SINGLE, NULL); psppire_selector_set_subjects (PSPPIRE_SELECTOR (var_selector), - dict_view, syntax_area, insert_source_row_into_text_view, NULL, NULL); @@ -412,7 +411,6 @@ compute_dialog (GObject *o, gpointer data) function_list_populate (GTK_TREE_VIEW (functions)); psppire_selector_set_subjects (PSPPIRE_SELECTOR (func_selector), - functions, syntax_area, insert_function_into_syntax_area, NULL, NULL); @@ -604,7 +602,6 @@ insert_source_row_into_text_view (GtkTreeIter iter, gint *idx; struct variable *var; GtkTreeIter dict_iter; - gchar *name; GtkTextBuffer *buffer; g_return_if_fail (GTK_IS_TEXT_VIEW (dest)); @@ -632,15 +629,10 @@ insert_source_row_into_text_view (GtkTreeIter iter, gtk_tree_path_free (path); - name = recode_string (UTF8, psppire_dict_encoding (dict), - var_get_name (var), - -1); - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dest)); erase_selection (buffer); - gtk_text_buffer_insert_at_cursor (buffer, name, -1); + gtk_text_buffer_insert_at_cursor (buffer, var_get_name (var), -1); - g_free (name); }