X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ft-test-options.c;h=d4656bf4a457bc811a08219df7624e32ce610ca1;hb=99732245d610cf363429f1b67a8b2b2e15a9a734;hp=ed8ac042daaf7e3e420eb739dcfd0e32a6ef24a1;hpb=8953baa61127d6d3b91f763663ea647bf3e4e793;p=pspp diff --git a/src/ui/gui/t-test-options.c b/src/ui/gui/t-test-options.c index ed8ac042da..d4656bf4a4 100644 --- a/src/ui/gui/t-test-options.c +++ b/src/ui/gui/t-test-options.c @@ -25,6 +25,7 @@ #include "t-test-options.h" #include "widget-io.h" +#include "psppire-scanf.h" #include #define _(msgid) gettext (msgid) @@ -49,27 +50,29 @@ struct tt_options_dialog gdouble confidence_interval; gboolean non_default_options; enum exclude_mode excl; + GtkBuilder *xml; }; struct tt_options_dialog * -tt_options_dialog_create (GtkBuilder *xml, GtkWindow *parent) +tt_options_dialog_create (GtkWindow *parent) { struct tt_options_dialog *tto = xmalloc (sizeof (*tto)); + tto->xml = builder_new ("t-test.ui"); + tto->confidence = - widget_scanf (_("Confidence Interval: %2d %%"), - &tto->conf_percent); + psppire_scanf_new (_("Confidence Interval: %2d %%"), &tto->conf_percent); - tto->dialog = get_widget_assert (xml, "options-dialog"); + tto->dialog = get_widget_assert (tto->xml, "options-dialog"); - tto->box = get_widget_assert (xml, "vbox1"); + tto->box = get_widget_assert (tto->xml, "vbox1"); - tto->analysis = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton1")); - tto->listwise = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton2")); + tto->analysis = GTK_TOGGLE_BUTTON (get_widget_assert (tto->xml, "radiobutton1")); + tto->listwise = GTK_TOGGLE_BUTTON (get_widget_assert (tto->xml, "radiobutton2")); gtk_widget_show (tto->confidence); - gtk_box_pack_start_defaults (GTK_BOX (tto->box), tto->confidence); + psppire_box_pack_start_defaults (GTK_BOX (tto->box), tto->confidence); gtk_window_set_transient_for (GTK_WINDOW (tto->dialog), parent); @@ -84,6 +87,7 @@ void tt_options_dialog_destroy (struct tt_options_dialog *tto) { gtk_container_remove (GTK_CONTAINER (tto->box), tto->confidence); + g_object_unref (tto->xml); g_free (tto); } @@ -115,7 +119,7 @@ tt_options_dialog_run (struct tt_options_dialog *tto) } void -tt_options_dialog_append_syntax (struct tt_options_dialog *tto, GString *str) +tt_options_dialog_append_syntax (const struct tt_options_dialog *tto, GString *str) { g_string_append (str, "\t/MISSING=");