X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Foneway-anova-dialog.c;h=1814dd6737562a1d922722141d9e6c6f3c2b0a63;hb=66153a44d861ccddf6a176ec5a94ffb959232ad6;hp=59b65b4a2487dfc1ce793381d407cc1e6cb402f9;hpb=a1efcf97ca2f75f4be6a0389ff2372c03ed2d4e1;p=pspp-builds.git diff --git a/src/ui/gui/oneway-anova-dialog.c b/src/ui/gui/oneway-anova-dialog.c index 59b65b4a..1814dd67 100644 --- a/src/ui/gui/oneway-anova-dialog.c +++ b/src/ui/gui/oneway-anova-dialog.c @@ -22,15 +22,16 @@ #include "psppire-dict.h" #include "psppire-var-store.h" #include "helper.h" -#include "data-editor.h" +#include "psppire-data-window.h" #include "psppire-dialog.h" #include "dialog-common.h" -#include "dict-display.h" #include "psppire-acr.h" +#include "psppire-selector.h" +#include "dict-display.h" #include -#include "syntax-editor.h" +#include "executor.h" #include "gettext.h" @@ -126,7 +127,7 @@ void oneway_anova_dialog (GObject *o, gpointer data) { gint response; - struct data_editor *de = data; + PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); PsppireVarStore *vs = NULL; @@ -163,18 +164,16 @@ oneway_anova_dialog (GObject *o, gpointer data) g_object_get (de->data_editor, "var-store", &vs, NULL); - ow.dict = vs->dict; + g_object_get (vs, "dictionary", &ow.dict, NULL); ow.dialog = GTK_WINDOW (get_widget_assert (builder, "oneway-anova-dialog")); - gtk_window_set_transient_for (ow.dialog, de->parent.window); + gtk_window_set_transient_for (ow.dialog, GTK_WINDOW (de)); - attach_dictionary_to_treeview (GTK_TREE_VIEW (dict_view), - vs->dict, - GTK_SELECTION_MULTIPLE, NULL); + g_object_set (dict_view, "dictionary", ow.dict, NULL); - set_dest_model (GTK_TREE_VIEW (ow.vars_treeview), vs->dict); + set_dest_model (GTK_TREE_VIEW (ow.vars_treeview), ow.dict); psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1), @@ -222,7 +221,7 @@ oneway_anova_dialog (GObject *o, gpointer data) psppire_acr_set_entry (cd->acr, entry); gtk_window_set_transient_for (GTK_WINDOW (cd->contrasts_dialog), - de->parent.window); + GTK_WINDOW (de)); } response = psppire_dialog_run (PSPPIRE_DIALOG (ow.dialog)); @@ -232,6 +231,7 @@ oneway_anova_dialog (GObject *o, gpointer data) case GTK_RESPONSE_OK: { gchar *syntax = generate_syntax (&ow); + struct getl_interface *sss = create_syntax_string_source (syntax); execute_syntax (sss); @@ -241,11 +241,7 @@ oneway_anova_dialog (GObject *o, gpointer data) case PSPPIRE_RESPONSE_PASTE: { gchar *syntax = generate_syntax (&ow); - - 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); }