From: John Darrington Date: Thu, 3 Aug 2017 05:37:27 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into sheet X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=5dbf5abcbed01f04422d4dead1c0ae0bb7efde4f;hp=-c;p=pspp Merge remote-tracking branch 'origin/master' into sheet --- 5dbf5abcbed01f04422d4dead1c0ae0bb7efde4f diff --combined NEWS index ab6ae5daf3,a7a54c4d43..f253c7b279 --- a/NEWS +++ b/NEWS @@@ -4,13 -4,15 +4,15 @@@ See the end for copying conditions Please send PSPP bug reports to bug-gnu-pspp@gnu.org. -Changes from 0.10.2 to 0.10.5-pre3: +Changes from 0.10.2 to 0.10.4 * The REGRESSION command now has a /ORIGIN subcommand to perform regression through the origin. * The FACTOR command can now analyse matrix files prepared with MATRIX DATA. + * The FACTOR command can now print the anti-image matrices. + * The MATRIX DATA command has been added. * Some inappropriate properties in selection dialogs have been corrected. @@@ -31,17 -33,18 +33,21 @@@ * Graphical user interface changes: + ** The code implementing the sheet rendering has been removed. Instead we + use a third party library: spread-sheet-widget. + ** There is a new menu: Edit|Options ** The Non Parametric Statistics Menu has a new item: "K Independent Samples". + ** Dialog boxes can now be canceled using the key. + * The AUTORECODE command now accepts an optional / before INTO. * The short form of the VECTOR command can now create string variables. + * Bug fixes, including fixes for CVE-2017-10791 and CVE-2017-10792. + Changes from 0.10.1 to 0.10.2: * CROSSTABS implements a new COUNT subcommand to round case or cell diff --combined configure.ac index 492cdd3085,fc8761ad90..6e7984bf98 --- a/configure.ac +++ b/configure.ac @@@ -1,8 -1,24 +1,24 @@@ + dnl PSPP - a program for statistical analysis. + dnl Copyright (C) 2017 Free Software Foundation, Inc. + dnl + dnl This program is free software: you can redistribute it and/or modify + dnl it under the terms of the GNU General Public License as published by + dnl the Free Software Foundation, either version 3 of the License, or + dnl (at your option) any later version. + dnl + dnl This program is distributed in the hope that it will be useful, + dnl but WITHOUT ANY WARRANTY; without even the implied warranty of + dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + dnl GNU General Public License for more details. + dnl + dnl You should have received a copy of the GNU General Public License + dnl along with this program. If not, see . + dnl dnl Process this file with autoconf to produce a configure script. dnl Initialize. AC_PREREQ(2.63) - AC_INIT([GNU PSPP], [0.10.5pre1], [bug-gnu-pspp@gnu.org], [pspp]) -AC_INIT([GNU PSPP], [0.10.5-pre3], [bug-gnu-pspp@gnu.org], [pspp]) ++AC_INIT([GNU PSPP], [0.10.4], [bug-gnu-pspp@gnu.org], [pspp]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) @@@ -96,11 -112,8 +112,11 @@@ if test "$with_cairo" != no && test "$w PKG_CHECK_MODULES([GTKSOURCEVIEW], [gtksourceview-3.0 >= 3.4.2], [], [PSPP_REQUIRED_PREREQ([gtksourceview 3.0 version 3.4.2 or later (or use --without-gui)])]) - PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32], [], - [PSPP_REQUIRED_PREREQ([glib 2.0 version 2.32 or later (or use --without-gui)])]) + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.44], [], + [PSPP_REQUIRED_PREREQ([glib 2.0 version 2.44 or later (or use --without-gui)])]) + + PKG_CHECK_MODULES([SPREAD_SHEET_WIDGET], [spread-sheet-widget >= 0.0], [], + [PSPP_REQUIRED_PREREQ([spread-sheet-widget 0.0 (or use --without-gui)])]) AC_ARG_VAR([GLIB_GENMARSHAL]) AC_CHECK_PROGS([GLIB_GENMARSHAL], [glib-genmarshal]) diff --combined lib/automake.mk index 690304e73c,e2c98cc42f..dbda6b48a8 --- a/lib/automake.mk +++ b/lib/automake.mk @@@ -1,4 -1,24 +1,20 @@@ + # PSPP - a program for statistical analysis. + # Copyright (C) 2017 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 + # the Free Software Foundation, either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # ## Process this file with automake to produce Makefile.in -*- makefile -*- include $(top_srcdir)/lib/linreg/automake.mk include $(top_srcdir)/lib/tukey/automake.mk - -if HAVE_GUI -include $(top_srcdir)/lib/gtk-contrib/automake.mk -endif diff --combined src/ui/gui/automake.mk index d302f5b258,3d10ed0229..1877263b73 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@@ -1,3 -1,19 +1,19 @@@ + # PSPP - a program for statistical analysis. + # Copyright (C) 2017 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 + # the Free Software Foundation, either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # ## Process this file with automake to produce Makefile.in -*- makefile -*- UI_FILES = \ @@@ -69,14 -85,13 +85,14 @@@ EXTRA_DIST += src/ui/gui/marshaller-list \ src/ui/gui/pspplogo.svg +src_ui_gui_psppire_CPPFLAGS= if HAVE_GUI -bin_PROGRAMS += src/ui/gui/psppire -noinst_PROGRAMS += src/ui/gui/spreadsheet-test +bin_PROGRAMS += src/ui/gui/psppire +noinst_PROGRAMS += src/ui/gui/spreadsheet-test -src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 -src_ui_gui_spreadsheet_test_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 +src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) $(SPREAD_SHEET_WIDGET_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 +src_ui_gui_spreadsheet_test_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1 src_ui_gui_psppire_LDFLAGS = \ @@@ -92,13 -107,13 +108,13 @@@ endi src_ui_gui_psppire_LDADD = \ - lib/gtk-contrib/libxpaned.a \ src/ui/libuicommon.la \ src/libpspp.la \ src/libpspp-core.la \ $(GTK_LIBS) \ $(GTHREAD_LIBS) \ $(GTKSOURCEVIEW_LIBS) \ + $(SPREAD_SHEET_WIDGET_LIBS) \ $(CAIRO_LIBS) \ $(LIBINTL) \ $(GSL_LIBS) @@@ -122,9 -137,23 +138,9 @@@ INSTALL_DATA_HOOKS += install-lan dist_src_ui_gui_psppire_DATA = \ $(UI_FILES) \ - $(top_srcdir)/src/ui/gui/pspp.lang \ - $(top_srcdir)/src/ui/gui/psppire.gtkrc + $(top_srcdir)/src/ui/gui/pspp.lang src_ui_gui_psppire_SOURCES = \ - src/ui/gui/pspp-sheet-private.h \ - src/ui/gui/pspp-sheet-selection.c \ - src/ui/gui/pspp-sheet-selection.h \ - src/ui/gui/pspp-sheet-view-column.c \ - src/ui/gui/pspp-sheet-view-column.h \ - src/ui/gui/pspp-sheet-view.c \ - src/ui/gui/pspp-sheet-view.h \ - src/ui/gui/pspp-widget-facade.c \ - src/ui/gui/pspp-widget-facade.h \ - src/ui/gui/psppire-button-editable.c \ - src/ui/gui/psppire-button-editable.h \ - src/ui/gui/psppire-cell-renderer-button.c \ - src/ui/gui/psppire-cell-renderer-button.h \ src/ui/gui/psppire-dialog.c \ src/ui/gui/psppire-keypad.c \ src/ui/gui/psppire-selector.c \ @@@ -167,6 -196,8 +183,6 @@@ src/ui/gui/psppire-conf.h \ src/ui/gui/psppire-data-editor.c \ src/ui/gui/psppire-data-editor.h \ - src/ui/gui/psppire-data-sheet.c \ - src/ui/gui/psppire-data-sheet.h \ src/ui/gui/psppire-data-store.c \ src/ui/gui/psppire-data-store.h \ src/ui/gui/psppire-data-window.c \ @@@ -262,6 -293,8 +278,6 @@@ src/ui/gui/psppire-dict.h \ src/ui/gui/psppire-dictview.c \ src/ui/gui/psppire-dictview.h \ - src/ui/gui/psppire-empty-list-store.c \ - src/ui/gui/psppire-empty-list-store.h \ src/ui/gui/psppire-encoding-selector.c \ src/ui/gui/psppire-encoding-selector.h \ src/ui/gui/psppire-format.c \ @@@ -284,22 -317,14 +300,22 @@@ src/ui/gui/psppire-select-dest.h \ src/ui/gui/psppire-syntax-window.c \ src/ui/gui/psppire-syntax-window.h \ + src/ui/gui/psppire-delimited-text.c \ + src/ui/gui/psppire-delimited-text.h \ + src/ui/gui/psppire-text-file.c \ + src/ui/gui/psppire-text-file.h \ src/ui/gui/psppire-val-chooser.c \ src/ui/gui/psppire-val-chooser.h \ src/ui/gui/psppire-value-entry.c \ src/ui/gui/psppire-value-entry.h \ src/ui/gui/psppire-var-ptr.c \ src/ui/gui/psppire-var-ptr.h \ - src/ui/gui/psppire-var-sheet.c \ - src/ui/gui/psppire-var-sheet.h \ + src/ui/gui/psppire-data-sheet.c \ + src/ui/gui/psppire-data-sheet.h \ + src/ui/gui/psppire-variable-sheet.c \ + src/ui/gui/psppire-variable-sheet.h \ + src/ui/gui/psppire-var-sheet-header.h \ + src/ui/gui/psppire-var-sheet-header.c \ src/ui/gui/psppire-window.c \ src/ui/gui/psppire-window.h \ src/ui/gui/psppire-window-base.c \ @@@ -314,8 -339,6 +330,8 @@@ src/ui/gui/var-display.h \ src/ui/gui/var-type-dialog.c \ src/ui/gui/var-type-dialog.h \ + src/ui/gui/value-variant.c \ + src/ui/gui/value-variant.h \ src/ui/gui/widget-io.c \ src/ui/gui/widget-io.h \ src/ui/gui/widgets.c \ @@@ -389,7 -412,6 +405,7 @@@ BUILT_SOURCES += src/ui/gui/psppire-mar CLEANFILES += src/ui/gui/psppire-marshal.c src/ui/gui/psppire-marshal.h \ src/ui/gui/resources.c $(nodist_src_ui_gui_psppire_DATA) + endif HAVE_GUI #ensure the installcheck passes even if there is no X server available @@@ -397,7 -419,7 +413,7 @@@ installcheck-local DISPLAY=/invalid/port $(MAKE) $(AM_MAKEFLAGS) installcheck-binPROGRAMS # wrapper -src_ui_gui_psppire_CPPFLAGS = $(AM_CPPFLAGS) -Isrc/ui/gui/include +src_ui_gui_psppire_CPPFLAGS += $(AM_CPPFLAGS) -Isrc/ui/gui/include BUILT_SOURCES += src/ui/gui/include/gtk/gtk.h src/ui/gui/include/gtk/gtk.h: src/ui/gui/include/gtk/gtk.in.h @$(MKDIR_P) src/ui/gui/include/gtk diff --combined src/ui/gui/text-data-import.ui index e7ee2d369c,0b40468ef1..86e6f39906 --- a/src/ui/gui/text-data-import.ui +++ b/src/ui/gui/text-data-import.ui @@@ -1,4 -1,20 +1,20 @@@ + + + + + + + + + + + + + + + + @@@ -77,7 -93,6 +93,7 @@@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK vertical 94 + True True @@@ -91,7 -106,6 +107,7 @@@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 + 12 @@@ -119,7 -133,6 +135,7 @@@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 none + 12 True diff --combined src/ui/gui/widgets.c index 6878fa0fe5,ec9be33516..26a5dac4fd --- a/src/ui/gui/widgets.c +++ b/src/ui/gui/widgets.c @@@ -1,10 -1,27 +1,28 @@@ + /* + PSPP - a program for statistical analysis. + Copyright (C) 2017 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + #include #include #include "widgets.h" +#include "gettext.h" #include "psppire-dialog.h" #include "psppire-selector.h" @@@ -123,62 -140,6 +141,62 @@@ preregister_actions (void } +static void +tx_string_to_double (const GValue *src, GValue *dest) +{ + const gchar *str = g_value_get_string (src); + gdouble dble = g_strtod (str, NULL); + g_value_set_double (dest, dble); +} + + +static void +tx_string_to_int (const GValue *src, GValue *dest) +{ + const gchar *str = g_value_get_string (src); + gint x = atoi (str); + g_value_set_int (dest, x); +} + +static void +enum_to_string (const GValue *src, GValue *dest) +{ + gint n = g_value_get_enum (src); + GType t = G_VALUE_TYPE (src); + GEnumClass *ec = g_type_class_ref (t); + GEnumValue *ev = g_enum_get_value (ec, n); + + g_value_set_string (dest, gettext (ev->value_nick)); +} + + + +GType align_enum_type; +GType measure_enum_type; +GType role_enum_type; + + +extern const GEnumValue align[]; +extern const GEnumValue measure[]; +extern const GEnumValue role[]; + + + +static void +preregister_misc (void) +{ + align_enum_type = g_enum_register_static ("PsppAlignment", align); + measure_enum_type = g_enum_register_static ("PsppMeasure", measure); + role_enum_type = g_enum_register_static ("PsppRole", role); + + g_value_register_transform_func (G_TYPE_STRING, G_TYPE_DOUBLE, tx_string_to_double); + g_value_register_transform_func (G_TYPE_STRING, G_TYPE_INT, tx_string_to_int); + + g_value_register_transform_func (measure_enum_type, G_TYPE_STRING, enum_to_string); + g_value_register_transform_func (align_enum_type, G_TYPE_STRING, enum_to_string); + g_value_register_transform_func (role_enum_type, G_TYPE_STRING, enum_to_string); +} + /* Any custom widgets which are to be used in GtkBuilder ui files need to be preregistered, otherwise GtkBuilder refuses to @@@ -199,7 -160,6 +217,7 @@@ preregister_widgets (void psppire_means_layer_get_type (); preregister_actions (); + preregister_misc (); /* This seems to be necessary on Cygwin. It ought not to be necessary. Having it here can't do any harm. */