Text import dialog: Display the thousands separator in the number of cases.
[pspp] / src / ui / gui / psppire-dialog-action-means.c
index 8d378e221a76ac1931b6b08dba8620e810bdc794..6ebda5055180cc04291a72fff93d40d441ac891d 100644 (file)
@@ -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