/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2009 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
#include "t-test-independent-samples-dialog.h"
#include "psppire-dict.h"
#include "psppire-var-store.h"
-#include "helper.h"
+#include "psppire-var-view.h"
+#include "executor.h"
#include "psppire-data-window.h"
#include "psppire-dialog.h"
#include "dialog-common.h"
gtk_window_set_transient_for (GTK_WINDOW (grps->dialog), parent);
- grps->val[0] = strdup ("");
- grps->val[1] = strdup ("");
+ grps->val[0] = xstrdup ("");
+ grps->val[1] = xstrdup ("");
return grps;
}
GString *str = g_string_new ("T-TEST /VARIABLES=");
- append_variable_names (str, d->dict, GTK_TREE_VIEW (tv), 0);
+ psppire_var_view_append_names (PSPPIRE_VAR_VIEW (tv), 0, str);
g_string_append (str, "\n\t/GROUPS=");
grps->group_defn = GROUPS_VALUES;
grps->val[0] =
- strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[0])));
+ xstrdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[0])));
grps->val[1] =
- strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[1])));
+ xstrdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[1])));
}
else
{
grps->val[1] = NULL;
grps->val[0] =
- strdup (gtk_entry_get_text (GTK_ENTRY (grps->cut_point_entry)));
+ xstrdup (gtk_entry_get_text (GTK_ENTRY (grps->cut_point_entry)));
}
psppire_dialog_notify_change (PSPPIRE_DIALOG (ttd->dialog));
GtkWidget *dict_view =
get_widget_assert (xml, "indep-samples-t-test-treeview1");
- GtkWidget *test_variables_treeview =
- get_widget_assert (xml, "indep-samples-t-test-treeview2");
-
GtkWidget *selector2 =
get_widget_assert (xml, "indep-samples-t-test-selector2");
tt_d.dialog = get_widget_assert (xml, "t-test-independent-samples-dialog");
tt_d.xml = xml;
- tt_d.dict = vs->dict;
+ g_object_get (vs, "dictionary", &tt_d.dict, NULL);
tt_d.define_groups_button = get_widget_assert (xml, "define-groups-button");
tt_d.groups_entry = get_widget_assert (xml, "indep-samples-t-test-entry");
gtk_window_set_transient_for (GTK_WINDOW (tt_d.dialog), GTK_WINDOW (de));
- attach_dictionary_to_treeview (GTK_TREE_VIEW (dict_view),
- vs->dict,
- GTK_SELECTION_MULTIPLE, NULL);
-
- set_dest_model (GTK_TREE_VIEW (test_variables_treeview), vs->dict);
-
-
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1),
- dict_view, test_variables_treeview,
- insert_source_row_into_tree_view,
- NULL,
- NULL);
+ g_object_set (dict_view, "model", tt_d.dict, NULL);
psppire_selector_set_allow (PSPPIRE_SELECTOR (selector1),
numeric_only);
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2),
- dict_view, tt_d.groups_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 (tt_d.define_groups_button, "clicked",
G_CALLBACK (run_define_groups), &tt_d);