X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcompute-dialog.c;h=96ea6630885b08fedf74a9b42d655fa94e18f333;hb=4c4f035bfad520dc54f0d5a9e30e36d4fb009efc;hp=5d40d21639bbe68fd9d06d6ea35dd9f50fba4a40;hpb=db2b1501c7ef5912183d51340740dd4bd2ee45ac;p=pspp-builds.git diff --git a/src/ui/gui/compute-dialog.c b/src/ui/gui/compute-dialog.c index 5d40d216..96ea6630 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); }