X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ft-test-one-sample.c;h=3f13a9b745c31435c55c512c3a6feda721204b52;hb=64a18d9cb2657b541ebf39c9a064edc92101f2f3;hp=2c48c5d9c6c3dffa690fb6cfa48a3764bfc82e54;hpb=df83cf8a655317445e3237457658bd827282f970;p=pspp-builds.git diff --git a/src/ui/gui/t-test-one-sample.c b/src/ui/gui/t-test-one-sample.c index 2c48c5d9..3f13a9b7 100644 --- a/src/ui/gui/t-test-one-sample.c +++ b/src/ui/gui/t-test-one-sample.c @@ -21,12 +21,14 @@ #include "t-test-one-sample.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" #include "dialog-common.h" #include "dict-display.h" #include "widget-io.h" +#include "executor.h" #include "t-test-options.h" #include @@ -57,7 +59,7 @@ generate_syntax (const struct tt_one_sample_dialog *d) g_string_append (str, "\n\t/VARIABLES="); - append_variable_names (str, d->dict, GTK_TREE_VIEW (d->vars_treeview), 0); + psppire_var_view_append_names (PSPPIRE_VAR_VIEW (d->vars_treeview), 0, str); tt_options_dialog_append_syntax (d->opt, str); @@ -118,11 +120,10 @@ dialog_state_valid (gpointer data) /* Pops up the dialog box */ void -t_test_one_sample_dialog (GObject *o, gpointer data) +t_test_one_sample_dialog (PsppireDataWindow *de) { struct tt_one_sample_dialog tt_d; gint response; - PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); PsppireVarStore *vs = NULL; @@ -134,33 +135,21 @@ t_test_one_sample_dialog (GObject *o, gpointer data) GtkWidget *options_button = get_widget_assert (xml, "button1"); - GtkWidget *selector = get_widget_assert (xml, "psppire-selector1"); - GtkWidget *dialog = get_widget_assert (xml, "t-test-one-sample-dialog"); g_object_get (de->data_editor, "var-store", &vs, NULL); - tt_d.dict = vs->dict; + g_object_get (vs, "dictionary", &tt_d.dict, NULL); tt_d.vars_treeview = get_widget_assert (xml, "one-sample-t-test-treeview1"); tt_d.test_value_entry = get_widget_assert (xml, "test-value-entry"); tt_d.opt = tt_options_dialog_create (xml, GTK_WINDOW (de)); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de)); - g_object_set (dict_view, "dictionary", - vs->dict, - "predicate", - var_is_numeric, NULL); - - set_dest_model (GTK_TREE_VIEW (tt_d.vars_treeview), vs->dict); - - - psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector), - dict_view, tt_d.vars_treeview, - insert_source_row_into_tree_view, - NULL, - NULL); - + g_object_set (dict_view, "model", + tt_d.dict, + "predicate", + var_is_numeric, NULL); g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh), &tt_d);