X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcompute-dialog.c;h=7269ab79750e76c3ed2cf5c7431045d5506545c3;hb=8953baa61127d6d3b91f763663ea647bf3e4e793;hp=76b9a7d1ce5e48d58faffc1810f78872bc763183;hpb=dff7c7a05e6da0de78544fa97c6882bd4a40d977;p=pspp-builds.git diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index 76b9a7d1..7269ab79 100644 --- a/src/ui/gui/compute-dialog.c +++ b/src/ui/gui/compute-dialog.c @@ -20,14 +20,14 @@ #include "helper.h" #include "psppire-dialog.h" #include "psppire-keypad.h" -#include "data-editor.h" +#include "psppire-data-window.h" #include "psppire-var-store.h" #include "dialog-common.h" #include "dict-display.h" #include #include -#include "syntax-editor.h" +#include "helper.h" static void function_list_populate (GtkTreeView *tv); @@ -365,7 +365,7 @@ void compute_dialog (GObject *o, gpointer data) { gint response; - struct data_editor *de = data; + PsppireDataWindow *de = data; PsppireVarStore *vs = NULL; struct compute_dialog scd; @@ -394,7 +394,7 @@ compute_dialog (GObject *o, gpointer data) g_signal_connect (expression, "toggled", G_CALLBACK(on_expression_toggle), &scd); - gtk_window_set_transient_for (GTK_WINDOW (dialog), de->parent.window); + gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); attach_dictionary_to_treeview (GTK_TREE_VIEW (dict_view), @@ -447,6 +447,7 @@ compute_dialog (GObject *o, gpointer data) case GTK_RESPONSE_OK: { gchar *syntax = generate_syntax (&scd); + struct getl_interface *sss = create_syntax_string_source (syntax); execute_syntax (sss); @@ -457,10 +458,7 @@ compute_dialog (GObject *o, gpointer data) { gchar *syntax = generate_syntax (&scd); - struct syntax_editor *se = - (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL); - - gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1); + paste_syntax_in_new_window (syntax); g_free (syntax); }