X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcompute-dialog.c;h=c09c7571936fa4e4ca493bd0647b2586629caa6d;hb=66153a44d861ccddf6a176ec5a94ffb959232ad6;hp=7703640c4d553e81eb6584f28eb46841a0c3fe21;hpb=9a331fe64eb814ae5c1322e21717a04fb254bf65;p=pspp-builds.git diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index 7703640c..c09c7571 100644 --- a/src/ui/gui/compute-dialog.c +++ b/src/ui/gui/compute-dialog.c @@ -24,10 +24,11 @@ #include "psppire-var-store.h" #include "psppire-selector.h" #include "dialog-common.h" +#include #include #include -#include "helper.h" +#include "executor.h" static void function_list_populate (GtkTreeView *tv); @@ -388,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", @@ -396,8 +397,8 @@ 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); @@ -603,7 +604,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)); @@ -631,13 +631,10 @@ insert_source_row_into_text_view (GtkTreeIter iter, gtk_tree_path_free (path); - name = pspp_locale_to_utf8 (var_get_name (var), -1, NULL); - 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); }