X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Foneway-anova-dialog.c;h=0d6f5aa546694fddf4c404427d2582119f61db60;hb=d1d36e7a9553b6effe6e6839128a05ef82b59466;hp=a17a93977e612db7fa99b9eb58226fd9b91f72c8;hpb=0d01f7bd35591882cd13b6352409858ea33d39f7;p=pspp
diff --git a/src/ui/gui/oneway-anova-dialog.c b/src/ui/gui/oneway-anova-dialog.c
index a17a93977e..0d6f5aa546 100644
--- a/src/ui/gui/oneway-anova-dialog.c
+++ b/src/ui/gui/oneway-anova-dialog.c
@@ -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,7 +29,6 @@
#include "psppire-selector.h"
#include "dict-display.h"
-
#include
#include "executor.h"
@@ -124,10 +123,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 +139,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");
@@ -164,31 +159,18 @@ 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, GTK_WINDOW (de));
- g_object_set (dict_view, "dictionary", vs->dict, NULL);
-
- set_dest_model (GTK_TREE_VIEW (ow.vars_treeview), vs->dict);
-
-
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1),
- dict_view, ow.vars_treeview,
- insert_source_row_into_tree_view,
- NULL,
- NULL);
-
+ g_object_set (dict_view, "model", ow.dict, NULL);
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2),
- dict_view, ow.factor_entry,
- insert_source_row_into_entry,
- is_currently_in_entry,
- NULL);
+ psppire_selector_set_filter_func (PSPPIRE_SELECTOR (selector2),
+ is_currently_in_entry);
g_signal_connect_swapped (ow.dialog, "refresh", G_CALLBACK (refresh), &ow);
@@ -241,7 +223,7 @@ oneway_anova_dialog (GObject *o, gpointer data)
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&ow);
- paste_syntax_in_new_window (syntax);
+ paste_syntax_to_window (syntax);
g_free (syntax);
}
@@ -265,7 +247,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 ");