X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fsort-cases-dialog.c;h=d9c665e69a8db988df983919d7ea6d651cc9c9ea;hb=8953baa61127d6d3b91f763663ea647bf3e4e793;hp=dea226c76098886e43efed67e385d98d36475377;hpb=dff7c7a05e6da0de78544fa97c6882bd4a40d977;p=pspp-builds.git diff --git a/src/ui/gui/sort-cases-dialog.c b/src/ui/gui/sort-cases-dialog.c index dea226c7..d9c665e6 100644 --- a/src/ui/gui/sort-cases-dialog.c +++ b/src/ui/gui/sort-cases-dialog.c @@ -19,13 +19,13 @@ #include "sort-cases-dialog.h" #include "helper.h" #include "psppire-dialog.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 "syntax-editor.h" +#include "helper.h" static void refresh (PsppireDialog *dialog, GtkTreeView *dest) @@ -91,7 +91,7 @@ void sort_cases_dialog (GObject *o, gpointer data) { gint response; - struct data_editor *de = data; + PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); struct sort_cases_dialog scd; @@ -108,7 +108,7 @@ sort_cases_dialog (GObject *o, gpointer data) g_object_get (de->data_editor, "var-store", &vs, NULL); - 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 (source), vs->dict, @@ -143,6 +143,7 @@ sort_cases_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); @@ -152,11 +153,7 @@ sort_cases_dialog (GObject *o, gpointer data) case PSPPIRE_RESPONSE_PASTE: { 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); }