From: John Darrington Date: Thu, 13 Dec 2007 07:58:20 +0000 (+0000) Subject: Miscellaneous T Test improvements. See bug #21760 X-Git-Tag: v0.6.0~159 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1effaa062b65095fbaa5c83c691deb741a79f8ee;p=pspp-builds.git Miscellaneous T Test improvements. See bug #21760 --- diff --git a/po/de.po b/po/de.po index 77a72c4d..ace9ade0 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.3\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-12-10 21:25+0900\n" +"POT-Creation-Date: 2007-12-12 21:07+0900\n" "PO-Revision-Date: 2006-07-28 19:32+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -5088,7 +5088,7 @@ msgstr "Kennsatz:" msgid "Value:" msgstr "Werte:" -#: src/ui/gui/data-editor.glade:1814 src/ui/gui/t-test.glade:365 +#: src/ui/gui/data-editor.glade:1814 src/ui/gui/t-test.glade:460 msgid "Missing Values" msgstr "Lösewerten" @@ -5931,50 +5931,48 @@ msgstr "" msgid "To End" msgstr "" -#: src/ui/gui/t-test.glade:54 -#, fuzzy -msgid "Grouping Variable:" -msgstr "Variableansicht" +#: src/ui/gui/t-test.glade:53 src/ui/gui/t-test.glade:161 +msgid "Define Groups" +msgstr "" -#: src/ui/gui/t-test.glade:89 src/ui/gui/t-test.glade:545 +#: src/ui/gui/t-test.glade:88 src/ui/gui/t-test.glade:640 #, fuzzy msgid "Test Variable(s):" msgstr "Variableansicht" -#: src/ui/gui/t-test.glade:162 -msgid "Define Groups" +#: src/ui/gui/t-test.glade:174 src/ui/gui/t-test.glade:533 +msgid "Options..." msgstr "" -#: src/ui/gui/t-test.glade:175 src/ui/gui/t-test.glade:438 -msgid "Options..." +#: src/ui/gui/t-test.glade:255 +msgid "_Use specified values:" msgstr "" -#: src/ui/gui/t-test.glade:259 +#: src/ui/gui/t-test.glade:273 +msgid "_Cut point:" +msgstr "" + +#: src/ui/gui/t-test.glade:333 msgid "Group_1 value:" msgstr "" -#: src/ui/gui/t-test.glade:270 +#: src/ui/gui/t-test.glade:344 msgid "Group_2 value:" msgstr "" -#: src/ui/gui/t-test.glade:336 +#: src/ui/gui/t-test.glade:431 msgid "Exclude cases _analysis by analysis" msgstr "" -#: src/ui/gui/t-test.glade:347 +#: src/ui/gui/t-test.glade:442 msgid "Exclude cases _listwise" msgstr "" -#: src/ui/gui/t-test.glade:459 +#: src/ui/gui/t-test.glade:554 #, fuzzy msgid "Test Value: " msgstr "Werte:" -#: src/ui/gui/t-test-options.c:60 -#, c-format -msgid "Confidence Interval: %2d %%" -msgstr "" - #: src/ui/gui/variable-info-dialog.c:88 #, fuzzy, c-format msgid "Label: %s\n" @@ -6150,3 +6148,7 @@ msgstr "Warnung" #, c-format msgid "could not access definition for terminal `%s'" msgstr "" + +#, fuzzy +#~ msgid "Grouping Variable:" +#~ msgstr "Variableansicht" diff --git a/po/en_GB.po b/po/en_GB.po index 340132b8..92b2747f 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.3\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-12-10 21:25+0900\n" +"POT-Creation-Date: 2007-12-12 21:07+0900\n" "PO-Revision-Date: 2007-09-15 08:29+0800\n" "Last-Translator: John Darrington \n" "Language-Team: John Darrington \n" @@ -5047,7 +5047,7 @@ msgstr "" msgid "Value:" msgstr "" -#: src/ui/gui/data-editor.glade:1814 src/ui/gui/t-test.glade:365 +#: src/ui/gui/data-editor.glade:1814 src/ui/gui/t-test.glade:460 msgid "Missing Values" msgstr "" @@ -5837,47 +5837,46 @@ msgstr "" msgid "To End" msgstr "" -#: src/ui/gui/t-test.glade:54 -msgid "Grouping Variable:" +#: src/ui/gui/t-test.glade:53 src/ui/gui/t-test.glade:161 +msgid "Define Groups" msgstr "" -#: src/ui/gui/t-test.glade:89 src/ui/gui/t-test.glade:545 +#: src/ui/gui/t-test.glade:88 src/ui/gui/t-test.glade:640 msgid "Test Variable(s):" msgstr "" -#: src/ui/gui/t-test.glade:162 -msgid "Define Groups" +#: src/ui/gui/t-test.glade:174 src/ui/gui/t-test.glade:533 +msgid "Options..." msgstr "" -#: src/ui/gui/t-test.glade:175 src/ui/gui/t-test.glade:438 -msgid "Options..." +#: src/ui/gui/t-test.glade:255 +msgid "_Use specified values:" msgstr "" -#: src/ui/gui/t-test.glade:259 +#: src/ui/gui/t-test.glade:273 +msgid "_Cut point:" +msgstr "" + +#: src/ui/gui/t-test.glade:333 msgid "Group_1 value:" msgstr "" -#: src/ui/gui/t-test.glade:270 +#: src/ui/gui/t-test.glade:344 msgid "Group_2 value:" msgstr "" -#: src/ui/gui/t-test.glade:336 +#: src/ui/gui/t-test.glade:431 msgid "Exclude cases _analysis by analysis" msgstr "" -#: src/ui/gui/t-test.glade:347 +#: src/ui/gui/t-test.glade:442 msgid "Exclude cases _listwise" msgstr "" -#: src/ui/gui/t-test.glade:459 +#: src/ui/gui/t-test.glade:554 msgid "Test Value: " msgstr "" -#: src/ui/gui/t-test-options.c:60 -#, c-format -msgid "Confidence Interval: %2d %%" -msgstr "" - #: src/ui/gui/variable-info-dialog.c:88 #, c-format msgid "Label: %s\n" diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index fa7e052b..e4dccd86 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,12 @@ +2007-12-13 John Darrington + + * dialog-common.c dialog-common.h (numeric_only): New function. + + * t-test-independent-samples-dialog.c: Added the ability to specify + groups by a threshold ("Cut Point"). Keep OK/Paste buttons insensitive, + until groups are properly defined. Prevented variables treeview from + accepting string variables. + 2007-12-08 John Darrington * data-editor.h data-editor.c: Added hooks for one sample t-test diff --git a/src/ui/gui/dialog-common.c b/src/ui/gui/dialog-common.c index 723a65e4..c6832df4 100644 --- a/src/ui/gui/dialog-common.c +++ b/src/ui/gui/dialog-common.c @@ -236,3 +236,59 @@ homogeneous_types (GtkWidget *source, GtkWidget *dest) return retval; } + + +/* Returns true iff the variable selected by SOURCE is numeric */ +gboolean +numeric_only (GtkWidget *source, GtkWidget *dest) +{ + gboolean ok; + GtkTreeIter iter; + gboolean retval = TRUE; + + GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (source)); + + PsppireDict *dict; + GtkTreeSelection *selection; + GList *list, *l; + + while (GTK_IS_TREE_MODEL_FILTER (model)) + { + model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model)); + } + + dict = PSPPIRE_DICT (model); + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (source)); + + list = gtk_tree_selection_get_selected_rows (selection, &model); + + /* Iterate through the selection of the source treeview */ + for (l = list; l ; l = l->next) + { + GtkTreePath *path = l->data; + GtkTreePath *fpath; + gint *idx; + + const struct variable *v; + + fpath = gtk_tree_model_filter_convert_path_to_child_path + (GTK_TREE_MODEL_FILTER (model), path); + + idx = gtk_tree_path_get_indices (fpath); + + v = psppire_dict_get_variable (dict, idx[0]); + + if ( var_is_alpha (v)) + { + retval = FALSE; + break; + } + } + + g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL); + g_list_free (list); + + return retval; +} + diff --git a/src/ui/gui/dialog-common.h b/src/ui/gui/dialog-common.h index 4dd11cb7..1e66c8f8 100644 --- a/src/ui/gui/dialog-common.h +++ b/src/ui/gui/dialog-common.h @@ -65,5 +65,14 @@ void set_dest_model (GtkTreeView *dest, PsppireDict *dict); */ gboolean homogeneous_types (GtkWidget *source, GtkWidget *dest); +/* Returns TRUE if all of the variable(s) represented by the rows + currently selected by SOURCE widget, are numeric. DEST is ignored. + + In other words, this function when passed as the argument to + psppire_selector_set_allow, ensures that the selector selects only + numeric variables. +*/ +gboolean numeric_only (GtkWidget *source, GtkWidget *dest); + #endif diff --git a/src/ui/gui/t-test-independent-samples-dialog.c b/src/ui/gui/t-test-independent-samples-dialog.c index 5b3d98f7..e9b6a169 100644 --- a/src/ui/gui/t-test-independent-samples-dialog.c +++ b/src/ui/gui/t-test-independent-samples-dialog.c @@ -35,29 +35,130 @@ #include #include "syntax-editor.h" +#include + #include #define _(msgid) gettext (msgid) #define N_(msgid) msgid +enum group_definition + { + GROUPS_UNDEF, + GROUPS_VALUES, + GROUPS_CUT_POINT + }; + +struct tt_groups_dialog +{ + GtkWidget *dialog; + GtkWidget *label; + GtkWidget *table1; + GtkWidget *table2; + GtkWidget *hbox1; + + GtkWidget *values_toggle_button; + GtkWidget *cut_point_toggle_button; + + GtkWidget *grp_entry[2]; + GtkWidget *cut_point_entry; + + enum group_definition group_defn; + gchar *val[2]; +}; + +static void +set_group_criterion_type (GtkToggleButton *button, + struct tt_groups_dialog *groups) +{ + gboolean by_values = gtk_toggle_button_get_active (button); + + gtk_widget_set_sensitive (groups->label, by_values); + gtk_widget_set_sensitive (groups->table2, by_values); + + gtk_widget_set_sensitive (groups->hbox1, !by_values); +} + +static void +tt_groups_dialog_destroy (struct tt_groups_dialog *grps) +{ + g_object_unref (grps->table1); + g_object_unref (grps->table2); + + g_free (grps->val[0]); + g_free (grps->val[1]); + + g_free (grps); +} + +static struct tt_groups_dialog * +tt_groups_dialog_create (GladeXML *xml, GtkWindow *parent) +{ + struct tt_groups_dialog *grps = xmalloc (sizeof (*grps)); + + grps->group_defn = GROUPS_UNDEF; + + grps->dialog = get_widget_assert (xml, "define-groups-dialog"); + grps->table1 = get_widget_assert (xml, "table1"); + grps->table2 = get_widget_assert (xml, "table2"); + grps->label = get_widget_assert (xml, "label4"); + grps->hbox1 = get_widget_assert (xml, "hbox1"); + + grps->grp_entry[0] = get_widget_assert (xml, "group1-entry"); + grps->grp_entry[1] = get_widget_assert (xml, "group2-entry"); + grps->cut_point_entry = get_widget_assert (xml, "cut-point-entry"); + + grps->cut_point_toggle_button = get_widget_assert (xml, "radiobutton4"); + grps->values_toggle_button = get_widget_assert (xml, "radiobutton3"); + + g_object_ref (grps->table1); + g_object_ref (grps->table2); + + g_signal_connect (grps->values_toggle_button, "toggled", + G_CALLBACK (set_group_criterion_type), grps); + + gtk_window_set_transient_for (parent, + GTK_WINDOW (grps->dialog)); + + + + grps->val[0] = strdup (""); + grps->val[1] = strdup (""); + + return grps; +} + + struct tt_indep_samples_dialog { GladeXML *xml; /* The xml that generated the widgets */ GtkWidget *dialog; PsppireDict *dict; - gboolean groups_defined; + GtkWidget *define_groups_button; + GtkWidget *groups_entry; + struct tt_groups_dialog *grps; struct tt_options_dialog *opts; }; +static void +set_define_groups_sensitivity (GtkEntry *entry, + struct tt_indep_samples_dialog *tt_d) +{ + const gchar *text = gtk_entry_get_text (entry); + + const struct variable *v = psppire_dict_lookup_var (tt_d->dict, text); + + gtk_widget_set_sensitive (tt_d->define_groups_button, v != NULL); +} + + static gchar * generate_syntax (const struct tt_indep_samples_dialog *d) { struct variable *group_variable; gchar *text; - GtkWidget *entry = - get_widget_assert (d->xml, "indep-samples-t-test-entry"); GtkWidget *tv = get_widget_assert (d->xml, "indep-samples-t-test-treeview2"); @@ -69,48 +170,49 @@ generate_syntax (const struct tt_indep_samples_dialog *d) g_string_append (str, "\n\t/GROUPS="); group_variable = - psppire_dict_lookup_var (d->dict, gtk_entry_get_text (GTK_ENTRY (entry))); + psppire_dict_lookup_var (d->dict, + gtk_entry_get_text (GTK_ENTRY (d->groups_entry))); g_string_append (str, var_get_name (group_variable)); - if ( d->groups_defined ) + if (d->grps->group_defn != GROUPS_UNDEF) { - GtkWidget *entry1 = get_widget_assert (d->xml, "group1-entry"); - GtkWidget *entry2 = get_widget_assert (d->xml, "group2-entry"); - - const gchar *val1 = gtk_entry_get_text (GTK_ENTRY (entry1)); - const gchar *val2 = gtk_entry_get_text (GTK_ENTRY (entry2)); - g_string_append (str, "("); + if ( var_is_alpha (group_variable)) { struct string s; - ds_init_cstr (&s, val1); + ds_init_cstr (&s, d->grps->val[0]); gen_quoted_string (&s); g_string_append (str, ds_cstr (&s)); ds_destroy (&s); } else { - g_string_append (str, val1); - } - g_string_append (str, ","); - if ( var_is_alpha (group_variable)) - { - struct string s; - ds_init_cstr (&s, val2); - gen_quoted_string (&s); - g_string_append (str, ds_cstr (&s)); - ds_destroy (&s); + g_string_append (str, d->grps->val[0]); } - else + + if ( d->grps->group_defn == GROUPS_VALUES ) { - g_string_append (str, val2); + g_string_append (str, ","); + + if ( var_is_alpha (group_variable)) + { + struct string s; + ds_init_cstr (&s, d->grps->val[1]); + gen_quoted_string (&s); + g_string_append (str, ds_cstr (&s)); + ds_destroy (&s); + } + else + { + g_string_append (str, d->grps->val[1]); + } } + g_string_append (str, ")"); } - tt_options_dialog_append_syntax (d->opts, str); g_string_append (str, ".\n"); @@ -122,38 +224,44 @@ generate_syntax (const struct tt_indep_samples_dialog *d) return text; } - - static void -refresh (GladeXML *xml) +refresh (struct tt_indep_samples_dialog *ttd) { - GtkWidget *entry = - get_widget_assert (xml, "indep-samples-t-test-entry"); - GtkWidget *tv = - get_widget_assert (xml, "indep-samples-t-test-treeview2"); + get_widget_assert (ttd->xml, "indep-samples-t-test-treeview2"); GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (tv)); - gtk_entry_set_text (GTK_ENTRY (entry), ""); + gtk_entry_set_text (GTK_ENTRY (ttd->groups_entry), ""); gtk_list_store_clear (GTK_LIST_STORE (model)); + + gtk_widget_set_sensitive (ttd->define_groups_button, FALSE); } +/* Returns TRUE iff the define groups subdialog has a + state which defines a valid group criterion */ static gboolean define_groups_state_valid (gpointer data) { - struct tt_indep_samples_dialog *d = data; - - GtkWidget *entry1 = get_widget_assert (d->xml, "group1-entry"); - GtkWidget *entry2 = get_widget_assert (d->xml, "group2-entry"); + struct tt_groups_dialog *d = data; - if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (entry1)))) - return FALSE; + if ( gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (d->values_toggle_button))) + { + if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (d->grp_entry[0])))) + return FALSE; - if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (entry2)))) - return FALSE; + if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (d->grp_entry[1])))) + return FALSE; + } + else + { + if ( 0 == strcmp ("", + gtk_entry_get_text (GTK_ENTRY (d->cut_point_entry)))) + return FALSE; + } return TRUE; } @@ -161,19 +269,101 @@ define_groups_state_valid (gpointer data) static void run_define_groups (struct tt_indep_samples_dialog *ttd) { + struct tt_groups_dialog *grps = ttd->grps; + gint response; - GtkWidget *dialog = - get_widget_assert (ttd->xml, "define-groups-dialog"); + GtkWidget *box = get_widget_assert (ttd->xml, "dialog-hbox2"); + + const gchar *text = gtk_entry_get_text (GTK_ENTRY (ttd->groups_entry)); + + const struct variable *v = psppire_dict_lookup_var (ttd->dict, text); + + if ( grps->table2->parent) + gtk_container_remove (GTK_CONTAINER (grps->table2->parent), grps->table2); + + if ( grps->table1->parent) + gtk_container_remove (GTK_CONTAINER (grps->table1->parent), grps->table1); - psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog), - define_groups_state_valid, ttd); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (ttd->dialog)); + if ( var_is_numeric (v)) + { + gtk_table_attach_defaults (GTK_TABLE (grps->table1), grps->table2, + 1, 2, 1, 2); + + gtk_container_add (GTK_CONTAINER (box), grps->table1); + } + else + { + gtk_container_add (GTK_CONTAINER (box), grps->table2); + grps->group_defn = GROUPS_VALUES; + } + + + psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (grps->dialog), + define_groups_state_valid, grps); + + if ( grps->group_defn != GROUPS_CUT_POINT ) + { + gtk_toggle_button_set_active + (GTK_TOGGLE_BUTTON (grps->cut_point_toggle_button), TRUE); + + gtk_toggle_button_set_active + (GTK_TOGGLE_BUTTON (grps->values_toggle_button), TRUE); + + gtk_entry_set_text (GTK_ENTRY (grps->grp_entry[0]), grps->val[0]); + gtk_entry_set_text (GTK_ENTRY (grps->grp_entry[1]), grps->val[1]); + + gtk_entry_set_text (GTK_ENTRY (grps->cut_point_entry), ""); + } + else + { + gtk_toggle_button_set_active + (GTK_TOGGLE_BUTTON (grps->values_toggle_button), TRUE); + + gtk_toggle_button_set_active + (GTK_TOGGLE_BUTTON (grps->cut_point_toggle_button), TRUE); - response = psppire_dialog_run (PSPPIRE_DIALOG (dialog)); + gtk_entry_set_text (GTK_ENTRY (grps->grp_entry[0]), ""); + gtk_entry_set_text (GTK_ENTRY (grps->grp_entry[1]), ""); - ttd->groups_defined = (response == PSPPIRE_RESPONSE_CONTINUE); + gtk_entry_set_text (GTK_ENTRY (grps->cut_point_entry), grps->val[0]); + } + + g_signal_emit_by_name (grps->grp_entry[0], "changed"); + g_signal_emit_by_name (grps->grp_entry[1], "changed"); + g_signal_emit_by_name (grps->cut_point_entry, "changed"); + + response = psppire_dialog_run (PSPPIRE_DIALOG (grps->dialog)); + + if (response == PSPPIRE_RESPONSE_CONTINUE) + { + g_free (grps->val[0]); + g_free (grps->val[1]); + + if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (grps->values_toggle_button))) + { + grps->group_defn = GROUPS_VALUES; + + grps->val[0] = + strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[0]))); + + grps->val[1] = + strdup (gtk_entry_get_text (GTK_ENTRY (grps->grp_entry[1]))); + } + else + { + grps->group_defn = GROUPS_CUT_POINT; + + grps->val[1] = NULL; + + grps->val[0] = + strdup (gtk_entry_get_text (GTK_ENTRY (grps->cut_point_entry))); + } + + psppire_dialog_notify_change (PSPPIRE_DIALOG (ttd->dialog)); + } } @@ -183,9 +373,6 @@ dialog_state_valid (gpointer data) { struct tt_indep_samples_dialog *tt_d = data; - GtkWidget *entry = - get_widget_assert (tt_d->xml, "indep-samples-t-test-entry"); - GtkWidget *tv_vars = get_widget_assert (tt_d->xml, "indep-samples-t-test-treeview2"); @@ -193,17 +380,18 @@ dialog_state_valid (gpointer data) GtkTreeIter notused; - if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (entry)))) + if ( 0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (tt_d->groups_entry)))) return FALSE; - if ( 0 == gtk_tree_model_get_iter_first (vars, ¬used)) return FALSE; + if ( tt_d->grps->group_defn == GROUPS_UNDEF) + return FALSE; + return TRUE; } - /* Pops up the dialog box */ void t_test_independent_samples_dialog (GObject *o, gpointer data) @@ -231,12 +419,6 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) GtkWidget *selector1 = get_widget_assert (xml, "indep-samples-t-test-selector1"); - GtkWidget *entry = - get_widget_assert (xml, "indep-samples-t-test-entry"); - - GtkWidget *define_groups_button = - get_widget_assert (xml, "define-groups-button"); - GtkWidget *options_button = get_widget_assert (xml, "options-button"); @@ -245,8 +427,12 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) tt_d.dialog = get_widget_assert (xml, "t-test-independent-samples-dialog"); tt_d.xml = xml; tt_d.dict = vs->dict; - tt_d.groups_defined = FALSE; + + 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"); tt_d.opts = tt_options_dialog_create (xml, de->parent.window); + tt_d.grps = tt_groups_dialog_create (xml, de->parent.window); + gtk_window_set_transient_for (GTK_WINDOW (tt_d.dialog), de->parent.window); @@ -262,13 +448,16 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) insert_source_row_into_tree_view, NULL); + psppire_selector_set_allow (PSPPIRE_SELECTOR (selector1), + numeric_only); + psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2), - dict_view, entry, + dict_view, tt_d.groups_entry, insert_source_row_into_entry, is_currently_in_entry); - g_signal_connect_swapped (define_groups_button, "clicked", + g_signal_connect_swapped (tt_d.define_groups_button, "clicked", G_CALLBACK (run_define_groups), &tt_d); @@ -276,7 +465,11 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) G_CALLBACK (tt_options_dialog_run), tt_d.opts); - g_signal_connect_swapped (tt_d.dialog, "refresh", G_CALLBACK (refresh), xml); + g_signal_connect_swapped (tt_d.dialog, "refresh", G_CALLBACK (refresh), + &tt_d); + + g_signal_connect (tt_d.groups_entry, "changed", + G_CALLBACK (set_define_groups_sensitivity), &tt_d); psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (tt_d.dialog), @@ -312,6 +505,8 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) } tt_options_dialog_destroy (tt_d.opts); + tt_groups_dialog_destroy (tt_d.grps); + g_object_unref (xml); } diff --git a/src/ui/gui/t-test.glade b/src/ui/gui/t-test.glade index afa954e4..4ddf65be 100644 --- a/src/ui/gui/t-test.glade +++ b/src/ui/gui/t-test.glade @@ -50,8 +50,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Grouping Variable: + Define Groups False @@ -225,54 +224,150 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 + 3 2 5 + 5 + + + - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + radiobutton3 - 1 - 2 + 2 + 3 + + - + True - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + _Use specified values: + True 1 2 - 1 - 2 + - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Group_1 value: - True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + _Cut point: + True + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + + - + 1 + 2 + 2 + 3 + + 5 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Group_2 value: - True + 2 + 2 + 5 + 5 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Group_1 value: + True + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Group_2 value: + True + + + 1 + 2 + + + + 1 + 2 1 2 + GTK_EXPAND + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + +