X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Ft-test-independent-samples-dialog.c;h=9c3ea41daeb3f4511884ac6be6c6a359ad2af7f7;hb=2fbfb300e1200847986e5c669aa8322fe96683e7;hp=9a396d9b669c1926ae4b6794534b90f8fffb1cf7;hpb=43a916e8e177a54a6d6a8565aa92a4239f3383bb;p=pspp-builds.git diff --git a/src/ui/gui/t-test-independent-samples-dialog.c b/src/ui/gui/t-test-independent-samples-dialog.c index 9a396d9b..9c3ea41d 100644 --- a/src/ui/gui/t-test-independent-samples-dialog.c +++ b/src/ui/gui/t-test-independent-samples-dialog.c @@ -23,14 +23,13 @@ #include "psppire-dict.h" #include "psppire-var-store.h" #include "helper.h" -#include #include "data-editor.h" #include "psppire-dialog.h" #include "dialog-common.h" #include "dict-display.h" #include "widget-io.h" #include "t-test-options.h" -#include +#include #include #include "syntax-editor.h" @@ -162,7 +161,7 @@ generate_syntax (const struct tt_indep_samples_dialog *d) GString *str = g_string_new ("T-TEST /VARIABLES="); - append_variable_names (str, d->dict, GTK_TREE_VIEW (tv)); + append_variable_names (str, d->dict, GTK_TREE_VIEW (tv), 0); g_string_append (str, "\n\t/GROUPS="); @@ -178,9 +177,8 @@ generate_syntax (const struct tt_indep_samples_dialog *d) if ( var_is_alpha (group_variable)) { - struct string s; - ds_init_cstr (&s, d->grps->val[0]); - gen_quoted_string (&s); + struct string s = DS_EMPTY_INITIALIZER; + syntax_gen_string (&s, ss_cstr (d->grps->val[0])); g_string_append (str, ds_cstr (&s)); ds_destroy (&s); } @@ -195,9 +193,8 @@ generate_syntax (const struct tt_indep_samples_dialog *d) if ( var_is_alpha (group_variable)) { - struct string s; - ds_init_cstr (&s, d->grps->val[1]); - gen_quoted_string (&s); + struct string s = DS_EMPTY_INITIALIZER; + syntax_gen_string (&s, ss_cstr (d->grps->val[1])); g_string_append (str, ds_cstr (&s)); ds_destroy (&s); } @@ -397,13 +394,10 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) gint response; struct data_editor *de = data; - PsppireVarStore *vs; + PsppireVarStore *vs = NULL; GladeXML *xml = XML_NEW ("t-test.glade"); - GtkSheet *var_sheet = - GTK_SHEET (get_widget_assert (de->xml, "variable_sheet")); - GtkWidget *dict_view = get_widget_assert (xml, "indep-samples-t-test-treeview1"); @@ -417,9 +411,9 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) get_widget_assert (xml, "indep-samples-t-test-selector1"); GtkWidget *options_button = - get_widget_assert (xml, "options-button"); + get_widget_assert (xml, "indep-samples-t-test-options-button"); - vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet)); + g_object_get (de->data_editor, "var-store", &vs, NULL); tt_d.dialog = get_widget_assert (xml, "t-test-independent-samples-dialog"); tt_d.xml = xml; @@ -443,6 +437,7 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector1), dict_view, test_variables_treeview, insert_source_row_into_tree_view, + NULL, NULL); psppire_selector_set_allow (PSPPIRE_SELECTOR (selector1), @@ -452,7 +447,8 @@ t_test_independent_samples_dialog (GObject *o, gpointer data) psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector2), dict_view, tt_d.groups_entry, insert_source_row_into_entry, - is_currently_in_entry); + is_currently_in_entry, + NULL); g_signal_connect_swapped (tt_d.define_groups_button, "clicked", G_CALLBACK (run_define_groups), &tt_d);