Changes from 0.10.2 to 0.10.4:
- * Gtk+3.14.5 or later must now be used when building.
+ * Gtk+3.14.5 or later must now be used when building.
- * The AUTORECODE command now accepts an optional / before INTO.
+ * The AUTORECODE command now accepts an optional / before INTO.
+
+ * The short form of the VECTOR command can now create string variables.
Changes from 0.10.1 to 0.10.2:
dnl Xmllint is used in the rules to build the documentation. It is not actually necessary,
dnl but is used for post-build consistency checks. Thus, non-developers can live without it.
-dnl However for it to be usefull, it needs to be a certain version and have certain features.
+dnl However for it to be useful, it needs to be a certain version and have certain features.
dnl The macros below check that it the xmllint available is up to scratch. If it isn't
dnl then a dummy /bin/echo is subsituted instead.
dnl Checks for header files.
AC_CHECK_HEADERS([sys/wait.h fpu_control.h ieeefp.h fenv.h pwd.h])
-dnl Some systems dont have SIGWINCH
+dnl Some systems don't have SIGWINCH
AC_CHECK_DECLS([SIGWINCH], [], [],
[#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h. */
To make a vector out of a set of existing variables, specify a name
for the vector followed by an equals sign (@samp{=}) and the variables
-to put in the vector. All the variables in the vector must be the same
-type. String variables in a vector must all have the same width.
+to put in the vector. The variables must be all numeric or all
+string, and string variables must have the same width.
To make a vector and create variables at the same time, specify one or
-more vector names followed by a count in parentheses. This will cause
-variables named @code{@var{vec}1} through @code{@var{vec}@var{count}}
-to be created as numeric variables. By default, the new variables
-have print and write format F8.2, but an alternate format may be
-specified inside the parentheses before or after the count and
-separated from it by white space or a comma. Variable names including
-numeric suffixes may not exceed 64 characters in length, and none of
-the variables may exist prior to @cmd{VECTOR}.
+more vector names followed by a count in parentheses. This will
+create variables named @code{@var{vec}1} through
+@code{@var{vec}@var{count}}. By default, the new variables are
+numeric with format F8.2, but an alternate format may be specified
+inside the parentheses before or after the count and separated from it
+by white space or a comma. With a string format such as A8, the
+variables will be string variables; with a numeric format, they will
+be numeric. Variable names including the suffixes may not exceed 64
+characters in length, and none of the variables may exist prior to
+@cmd{VECTOR}.
Vectors created with @cmd{VECTOR} disappear after any procedure or
procedure-like command is executed. The variables contained in the
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2010, 2011, 2012, 2016 Free Software Foundation, Inc.
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
{
seen_format = true;
if (!parse_format_specifier (lexer, &format)
- || !fmt_check_output (&format)
- || !fmt_check_type_compat (&format, VAL_NUMERIC))
+ || !fmt_check_output (&format))
goto fail;
}
else
for (j = 0; j < var_cnt; j++)
{
char *name = xasprintf ("%s%d", vectors[i], j + 1);
- vars[j] = dict_create_var_assert (dict, name, 0);
+ vars[j] = dict_create_var_assert (dict, name,
+ fmt_var_width (&format));
var_set_both_formats (vars[j], &format);
free (name);
}
</screenshot>
</screenshots>
<url type="homepage">http://www.gnu.org/software/pspp/</url>
+ <url type="translate">http://translationproject.org/domain/pspp.html</url>
<updatecontact>pspp-dev@gnu.org</updatecontact>
</component>
GtkWidget *hbox;
gchar *fontname = NULL;
+ GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (de));
+ gtk_style_context_add_class (context, "psppire-data-editor");
+
de->font = NULL;
de->old_vbox_widget = NULL;
{
PangoFontDescription *font_desc = data;
- gtk_widget_override_font (w, font_desc);
+ GtkStyleContext *style = gtk_widget_get_style_context (w);
+ GtkCssProvider *cssp = gtk_css_provider_new ();
+
+ gchar *str = pango_font_description_to_string (font_desc);
+ gchar *css =
+ g_strdup_printf ("* {font: %s}", str);
+ g_free (str);
+
+ GError *err = NULL;
+ gtk_css_provider_load_from_data (cssp, css, -1, &err);
+ if (err)
+ {
+ g_warning ("Failed to load font css \"%s\": %s", css, err->message);
+ g_error_free (err);
+ }
+ g_free (css);
+
+ gtk_style_context_add_provider (style,
+ GTK_STYLE_PROVIDER (cssp),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (cssp);
+
if ( GTK_IS_CONTAINER (w))
gtk_container_foreach (GTK_CONTAINER (w), set_font_recursively, font_desc);
psppire_conf_set_string (psppire_conf_new (),
"Data Editor", "font",
font_name);
-
+ g_free (font_name);
}
/* If SPLIT is TRUE, splits DE's data sheet into four panes.
PangoLayout * layout ;
PangoRectangle rect;
+
/* Since we're going to truncate lines to 80 chars,
we need a monospaced font otherwise it'll look silly */
PangoFontDescription *font_desc =
pango_font_description_from_string ("monospace");
-
- gtk_widget_override_font (act->textview, font_desc);
-
- /* and let's just make sure that a complete line fits into the
+ {
+ GtkStyleContext *style = gtk_widget_get_style_context (GTK_WIDGET (act->textview));
+ GtkCssProvider *cssp = gtk_css_provider_new ();
+
+ gchar *str = pango_font_description_to_string (font_desc);
+ gchar *css =
+ g_strdup_printf ("* {font: %s}", str);
+ g_free (str);
+
+ GError *err = NULL;
+ gtk_css_provider_load_from_data (cssp, css, -1, &err);
+ if (err)
+ {
+ g_warning ("Failed to load font css \"%s\": %s", css, err->message);
+ g_error_free (err);
+ }
+ g_free (css);
+
+ gtk_style_context_add_provider (style,
+ GTK_STYLE_PROVIDER (cssp),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (cssp);
+ }
+
+ /* And let's just make sure that a complete line fits into the
widget's width */
context = gtk_widget_create_pango_context (act->textview);
layout = pango_layout_new (context);
psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid);
psppire_dialog_action_set_refresh (pda, refresh);
-
-
-
}
static void
AT_SETUP([VECTOR short form with format specification])
AT_DATA([vector.sps], [dnl
data list notable/x 1.
-vector #vec(4, comma10.2).
+vector #vec(4, comma10.2)
+ /#svec(3, a8).
display vector.
])
AT_CHECK([pspp -o pspp.csv vector.sps])
,2,#vec2,COMMA10.2
,3,#vec3,COMMA10.2
,4,#vec4,COMMA10.2
+#svec,1,#svec1,A8
+,2,#svec2,A8
+,3,#svec3,A8
])
AT_CLEANUP