/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2010, 2011, 2012 Free Software Foundation
+ Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "dialog-common.h"
+#include <gl/c-xvasprintf.h>
#include <language/stats/aggregate.h>
#include <ui/syntax-gen.h>
gtk_file_filter_add_mime_type (filter, "application/x-spss-sav");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
+ filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name (filter, _("Compressed System Files (*.zsav)"));
+ gtk_file_filter_add_pattern (filter, "*.zsav");
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
+
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Portable Files (*.por) "));
gtk_file_filter_add_mime_type (filter, "application/x-spss-por");
gtk_entry_set_text (GTK_ENTRY (agg->summary_var_label_entry), label);
gtk_entry_set_text (GTK_ENTRY (agg->summary_sv_entry), srcvar);
- text = g_strdup_printf ("%g", arg1);
+ text = c_xasprintf ("%g", arg1);
gtk_entry_set_text (GTK_ENTRY (agg->summary_arg1_entry), text);
g_free (text);
- text = g_strdup_printf ("%g", arg2);
+ text = c_xasprintf ("%g", arg2);
gtk_entry_set_text (GTK_ENTRY (agg->summary_arg2_entry), text);
g_free (text);
-
gtk_combo_box_set_active (GTK_COMBO_BOX (agg->function_combo), f_idx);
}
if ( has_src_vars != AGR_SV_NO)
{
- g_string_append (string, " (");
+ struct string dss;
+ ds_init_cstr (&dss, " (");
- g_string_append (string, srcvar);
+ ds_put_cstr (&dss, srcvar);
if ( arity > 0)
- g_string_append_printf (string, ", %g", arg1);
+ ds_put_c_format (&dss, ", %g", arg1);
if ( arity > 1)
- g_string_append_printf (string, ", %g", arg2);
+ ds_put_c_format (&dss, ", %g", arg2);
+
+ ds_put_cstr (&dss, ")");
+
+ g_string_append (string, ds_cstr (&dss));
- g_string_append (string, ")");
+ ds_destroy (&dss);
}
free (label);