Merge remote-tracking branch 'origin/master' into sheet
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 3 Aug 2017 05:37:27 +0000 (07:37 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 3 Aug 2017 05:37:27 +0000 (07:37 +0200)
1  2 
NEWS
configure.ac
lib/automake.mk
src/ui/gui/automake.mk
src/ui/gui/text-data-import.ui
src/ui/gui/widgets.c

diff --combined NEWS
index ab6ae5daf3e473e8086b95ce4875e710a7002896,a7a54c4d43579f70dce91b47f56eaf7f6ee77a50..f253c7b279338489f8bc171ec8c3679de466be77
--- 1/NEWS
--- 2/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.
  
   * 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 <Escape> 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 492cdd3085efccf7e8b610ca0b68c5f0d9dac4f8,fc8761ad9076c3e5b34c612d3e3fff6a30590615..6e7984bf988889a7ad6f495cc5009d37df95ec54
@@@ -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 <http://www.gnu.org/licenses/>.
+ 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 690304e73c5671d7832d2f74178dbcbb83ea2de1,e2c98cc42f834cf407864b6df08ad91497b4621d..dbda6b48a8f9222187ac5e6c2a4050deeba3dbce
@@@ -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 <http://www.gnu.org/licenses/>.
+ # 
  ## 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 d302f5b258bed2f81855eb14cf1947010935024f,3d10ed022910f4e438ef181cbded1e74c1d9d82f..1877263b73eac257ef0354d5f8bdfba91c752b40
@@@ -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 <http://www.gnu.org/licenses/>.
+ # 
  ## 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 \
        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 \
        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 \
        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 \
        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
  
  # <gtk/gtk.h> 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
index e7ee2d369c370709d78a2e6289e310af495c282b,0b40468ef1e2300df2aa00654fb84caed84e7e90..86e6f39906e27603569e501cb0f33edca4e6ccda
@@@ -1,4 -1,20 +1,20 @@@
  <?xml version="1.0" encoding="UTF-8"?>
+ <!-- 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 <http://www.gnu.org/licenses/>. -->
  <!-- Generated with glade 3.18.3 -->
  <interface>
    <requires lib="gtk+" version="3.4.2"/>
@@@ -77,7 -93,6 +93,7 @@@
          <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
          <property name="orientation">vertical</property>
          <property name="position">94</property>
 +      <property name="wide-handle">True</property>
          <child>
            <object class="GtkFrame" id="frame4">
              <property name="visible">True</property>
                  <property name="can_focus">True</property>
                  <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                  <property name="margin_start">12</property>
 +              <property name="margin-bottom">12</property>
                  <child>
                    <placeholder/>
                  </child>
              <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
              <property name="label_xalign">0</property>
              <property name="shadow_type">none</property>
 +            <property name="margin_top">12</property>
              <child>
                <object class="GtkScrolledWindow" id="data-scroller">
                  <property name="visible">True</property>
diff --combined src/ui/gui/widgets.c
index 6878fa0fe547ee0db128cd1cc85aeecd38d08b07,ec9be3351611353a66e7280150c960a5d8abdfdd..26a5dac4fd33f79c30545d1d3dae304727c71bdd
@@@ -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 <http://www.gnu.org/licenses/>.
+ */
  #include <config.h>
  
  #include <gtksourceview/gtksource.h>
  
  #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. */