X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-means.c;h=6ebda5055180cc04291a72fff93d40d441ac891d;hb=2fd4306b04da6c8fc982d81beacc1f2e3573307b;hp=8d378e221a76ac1931b6b08dba8620e810bdc794;hpb=2b4fb7e846d62f1a70656bb42a0f769363ed0832;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-means.c b/src/ui/gui/psppire-dialog-action-means.c index 8d378e221a..6ebda50551 100644 --- a/src/ui/gui/psppire-dialog-action-means.c +++ b/src/ui/gui/psppire-dialog-action-means.c @@ -51,8 +51,10 @@ generate_syntax (PsppireDialogAction *act) GtkTreeIter iter; PsppireVarView *vv = PSPPIRE_VAR_VIEW (layer->var_view); psppire_var_view_set_current_model (vv, l); - g_string_append (string, "\n\tBY"); - for (ok = psppire_var_view_get_iter_first (vv, &iter); + ok = psppire_var_view_get_iter_first (vv, &iter); + if (ok) + g_string_append (string, "\n\tBY"); + for (; ok; ok = psppire_var_view_get_iter_next (vv, &iter)) { @@ -62,7 +64,7 @@ generate_syntax (PsppireDialogAction *act) } } - g_string_append (string, "."); + g_string_append (string, ".\n"); text = string->str; g_string_free (string, FALSE); @@ -110,7 +112,6 @@ psppire_dialog_action_means_activate (GtkAction *a) act->variables = get_widget_assert (xml, "stat-variables"); g_object_set (pda->source, - "model", pda->dict, "predicate", var_is_numeric, NULL); @@ -120,6 +121,8 @@ psppire_dialog_action_means_activate (GtkAction *a) psppire_dialog_action_set_refresh (pda, dialog_refresh); PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_means_parent_class)->activate (pda); + + g_object_unref (xml); } static void