X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-binomial.c;h=2641684c1ca762d85818cff1cc435ee54854bd06;hb=refs%2Fbuilds%2F20140209033012%2Fpspp;hp=97a5f3cfcc31d69e95db8742d152d79ef61fba40;hpb=b0fd056eedc6872d45541c1ee0eb43e909bbc8b1;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-binomial.c b/src/ui/gui/psppire-dialog-action-binomial.c index 97a5f3cfcc..2641684c1c 100644 --- a/src/ui/gui/psppire-dialog-action-binomial.c +++ b/src/ui/gui/psppire-dialog-action-binomial.c @@ -27,7 +27,6 @@ #include "psppire-dialog.h" #include "builder-wrapper.h" -#include "checkbox-treeview.h" #include "psppire-dict.h" #include "libpspp/str.h" @@ -137,26 +136,28 @@ generate_syntax (PsppireDialogAction *a) gchar *text = NULL; double prop; - GString *string = g_string_new ("NPAR TEST\n\t/BINOMIAL"); + struct string str; + + ds_init_cstr (&str, "NPAR TEST\n\t/BINOMIAL"); if ( get_proportion (scd, &prop)) - g_string_append_printf (string, "(%g)", prop); + ds_put_c_format (&str, "(%g)", prop); - g_string_append (string, " ="); + ds_put_cstr (&str, " ="); - psppire_var_view_append_names (PSPPIRE_VAR_VIEW (scd->var_view), 0, string); + psppire_var_view_append_names_str (PSPPIRE_VAR_VIEW (scd->var_view), 0, &str); if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->cutpoint_button))) { const gchar *cutpoint = gtk_entry_get_text (GTK_ENTRY (scd->cutpoint_entry)); - g_string_append_printf (string, "(%s)", cutpoint); + ds_put_c_format (&str, "(%s)", cutpoint); } - g_string_append (string, ".\n"); + ds_put_cstr (&str, ".\n"); - text = string->str; + text = ds_steal_cstr (&str); - g_string_free (string, FALSE); + ds_destroy (&str); return text; }