X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcrosstabs-dialog.c;fp=src%2Fui%2Fgui%2Fcrosstabs-dialog.c;h=a3498d1f6d72c4b70b72a46ccc6569721898c29e;hb=8953baa61127d6d3b91f763663ea647bf3e4e793;hp=2c50b461844d38de4587e1bcc9fcad01212b4d04;hpb=dff7c7a05e6da0de78544fa97c6882bd4a40d977;p=pspp-builds.git diff --git a/src/ui/gui/crosstabs-dialog.c b/src/ui/gui/crosstabs-dialog.c index 2c50b461..a3498d1f 100644 --- a/src/ui/gui/crosstabs-dialog.c +++ b/src/ui/gui/crosstabs-dialog.c @@ -23,13 +23,13 @@ #include #include -#include +#include #include #include #include "helper.h" #include #include -#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) @@ -385,13 +385,15 @@ void crosstabs_dialog (GObject *o, gpointer data) { gint response; - struct data_editor *de = data; - struct crosstabs_dialog cd; GtkBuilder *xml = builder_new ("crosstabs.ui"); + PsppireVarStore *vs = NULL; + PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); + + GtkWidget *dialog = get_widget_assert (xml, "crosstabs-dialog"); GtkWidget *source = get_widget_assert (xml, "dict-treeview"); GtkWidget *dest_rows = get_widget_assert (xml, "rows"); @@ -419,7 +421,7 @@ crosstabs_dialog (GObject *o, gpointer data) cells ); - 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, @@ -461,9 +463,9 @@ crosstabs_dialog (GObject *o, gpointer data) cd.current_opts.table = TRUE; cd.current_opts.pivot = TRUE; - gtk_window_set_transient_for (GTK_WINDOW (cd.format_dialog), de->parent.window); - gtk_window_set_transient_for (GTK_WINDOW (cd.cell_dialog), de->parent.window); - gtk_window_set_transient_for (GTK_WINDOW (cd.stat_dialog), de->parent.window); + gtk_window_set_transient_for (GTK_WINDOW (cd.format_dialog), GTK_WINDOW (de)); + gtk_window_set_transient_for (GTK_WINDOW (cd.cell_dialog), GTK_WINDOW (de)); + gtk_window_set_transient_for (GTK_WINDOW (cd.stat_dialog), GTK_WINDOW (de)); g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &cd); @@ -485,6 +487,7 @@ crosstabs_dialog (GObject *o, gpointer data) case GTK_RESPONSE_OK: { gchar *syntax = generate_syntax (&cd); + struct getl_interface *sss = create_syntax_string_source (syntax); execute_syntax (sss); @@ -495,10 +498,7 @@ crosstabs_dialog (GObject *o, gpointer data) { gchar *syntax = generate_syntax (&cd); - 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); }