X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Foneway-anova-dialog.c;h=8b91a5134d709274d2f37d8586a0e23871e9434f;hb=724be9e4720784aafeac395b3f6df47a89fc5e07;hp=e1e3c5aeca6542b7cdc48b22cdca3d1113fc37a1;hpb=b94025a12799b6826a772731b8f58907dca2cf5c;p=pspp-builds.git
diff --git a/src/ui/gui/oneway-anova-dialog.c b/src/ui/gui/oneway-anova-dialog.c
index e1e3c5ae..8b91a513 100644
--- a/src/ui/gui/oneway-anova-dialog.c
+++ b/src/ui/gui/oneway-anova-dialog.c
@@ -1,5 +1,5 @@
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010, 2011 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,12 +15,12 @@
along with this program. If not, see .
*/
-
#include
#include
#include "oneway-anova-dialog.h"
#include "psppire-dict.h"
#include "psppire-var-store.h"
+#include "psppire-var-view.h"
#include "helper.h"
#include "psppire-data-window.h"
#include "psppire-dialog.h"
@@ -29,8 +29,6 @@
#include "psppire-selector.h"
#include "dict-display.h"
-
-#include
#include "executor.h"
@@ -124,10 +122,9 @@ refresh (struct oneway_anova_dialog *ow)
/* Pops up the dialog box */
void
-oneway_anova_dialog (GObject *o, gpointer data)
+oneway_anova_dialog (PsppireDataWindow *de)
{
gint response;
- PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
PsppireVarStore *vs = NULL;
@@ -141,9 +138,6 @@ oneway_anova_dialog (GObject *o, gpointer data)
GtkWidget *selector2 =
get_widget_assert (builder, "oneway-anova-selector2");
- GtkWidget *selector1 =
- get_widget_assert (builder, "oneway-anova-selector1");
-
GtkWidget *contrasts_button =
get_widget_assert (builder, "contrasts-button");
@@ -173,18 +167,6 @@ oneway_anova_dialog (GObject *o, gpointer data)
g_object_set (dict_view, "model", ow.dict, NULL);
- set_dest_model (GTK_TREE_VIEW (ow.vars_treeview), ow.dict);
-
-
- psppire_selector_set_select_func (PSPPIRE_SELECTOR (selector1),
- insert_source_row_into_tree_view,
- NULL);
-
-
- psppire_selector_set_select_func (PSPPIRE_SELECTOR (selector2),
- insert_source_row_into_entry,
- NULL);
-
psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector2),
is_currently_in_entry);
@@ -228,22 +210,10 @@ oneway_anova_dialog (GObject *o, gpointer data)
switch (response)
{
case GTK_RESPONSE_OK:
- {
- gchar *syntax = generate_syntax (&ow);
-
- struct getl_interface *sss = create_syntax_string_source (syntax);
- execute_syntax (sss);
-
- g_free (syntax);
- }
+ g_free (execute_syntax_string (de, generate_syntax (&ow)));
break;
case PSPPIRE_RESPONSE_PASTE:
- {
- gchar *syntax = generate_syntax (&ow);
- paste_syntax_in_new_window (syntax);
-
- g_free (syntax);
- }
+ g_free (paste_syntax_to_window (generate_syntax (&ow)));
break;
default:
break;
@@ -264,7 +234,7 @@ static gchar * generate_syntax (const struct oneway_anova_dialog *ow)
GString *str = g_string_new ("ONEWAY /VARIABLES=");
- append_variable_names (str, ow->dict, GTK_TREE_VIEW (ow->vars_treeview), 0);
+ psppire_var_view_append_names (PSPPIRE_VAR_VIEW (ow->vars_treeview), 0, str);
g_string_append (str, " BY ");