From: John Darrington Date: Fri, 18 Dec 2009 19:34:12 +0000 (+0100) Subject: Merge branch 'master' into output X-Git-Tag: fc11-i386-build61^0 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c08a6e1009cf60847e770a77a73c650e9326379;hp=d7551158e8b3eb352fbbaa97628f3fa82e4186d6;p=pspp-builds.git Merge branch 'master' into output Conflicts: NEWS configure.ac src/output/charts/dummy-chart.c --- diff --git a/NEWS b/NEWS index 24f1d4a8..ab21afde 100644 --- a/NEWS +++ b/NEWS @@ -63,8 +63,7 @@ Changes from 0.6.2-pre6 to 0.7.0: * A tutorial chapter has been added to the user manual. - -Changes from 0.6.1 to 0.6.2-pre6: +Changes from 0.6.1 to 0.6.2 * New translations: @@ -86,6 +85,8 @@ Changes from 0.6.1 to 0.6.2-pre6: * Build fixes and changes: + - Fix build with GTK+ 2.17.4 and later. + - Make running "make" after running "configure" with different settings reliably rebuild version.c. @@ -109,6 +110,9 @@ Changes from 0.6.1 to 0.6.2-pre6: - Fix writing corrupted .sav files on Windows. + - Fix writing variable labels longer than 252 bytes to save files. + Thanks to Robert Westlund for reporting this bug. + - Fix writing corrupted .por files (bug #26034). - Fix reading .por files whose initial lines are not padded out diff --git a/README.Git b/README.Git index 753423e3..7d365293 100644 --- a/README.Git +++ b/README.Git @@ -34,11 +34,12 @@ This version of PSPP should work with the Gnulib commit shown below. Gnulib does not maintain a stable API or ABI, so it is possible that PSPP will not work with older or newer versions of Gnulib. - commit e21985ad14508137d75b0dccf064adfc4e5888c6 - Author: Bruno Haible - Date: Mon Sep 28 23:25:49 2009 +0200 + commit 0883405cc751858a633bebc56acb75381a6e50c8 + Author: Eric Blake + Date: Wed Nov 18 06:59:44 2009 -0700 + + utimens: fix regression on Solaris - Avoid identifier clash with POSIX function 'remove' defined as a macro. To clone Gnulib into a directory named "gnulib" using Git, and then check out this particular commit, run these commands: diff --git a/configure.ac b/configure.ac index 499128b3..1dc8e558 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ fi dnl Checks for libraries. AC_SYS_LARGEFILE AC_SEARCH_LIBS([sin], [m]) +AC_SEARCH_LIBS([dcgettext], [intl]) PSPP_LC_PAPER diff --git a/doc/dev/system-file-format.texi b/doc/dev/system-file-format.texi index a404d0d6..c1d1e421 100644 --- a/doc/dev/system-file-format.texi +++ b/doc/dev/system-file-format.texi @@ -1093,6 +1093,9 @@ value @var{code} - @var{bias}, where variable @code{bias} from the file header. For example, code 105 with bias 100.0 (the normal value) indicates a numeric variable of value 5. +One file has been seen written by SPSS 14 that contained such a code +in a @emph{string} field with the value 0 (after the bias is +subtracted) as a way of encoding null bytes. @item 252 End of file. This code may or may not appear at the end of the data diff --git a/glade/automake.mk b/glade/automake.mk index 8e51e1f7..1f0bf0ba 100644 --- a/glade/automake.mk +++ b/glade/automake.mk @@ -15,6 +15,7 @@ libglade_psppire_la_SOURCES = \ glade/selector.c \ glade/acr.c \ glade/dictview.c \ + glade/var-view.c \ src/ui/gui/psppire-conf.c \ src/ui/gui/psppire-acr.c \ src/ui/gui/psppire-buttonbox.c \ @@ -23,7 +24,9 @@ libglade_psppire_la_SOURCES = \ src/ui/gui/psppire-dialog.c \ src/ui/gui/psppire-keypad.c \ src/ui/gui/psppire-dictview.c \ - src/ui/gui/psppire-selector.c + src/ui/gui/psppire-selector.c \ + src/ui/gui/psppire-select-dest.c \ + src/ui/gui/psppire-var-view.c dist_catalog_DATA = \ glade/psppire.xml diff --git a/glade/psppire.xml b/glade/psppire.xml index 50a03661..db8956b7 100644 --- a/glade/psppire.xml +++ b/glade/psppire.xml @@ -173,8 +173,10 @@ - - + + + + @@ -210,12 +212,33 @@ + + + + + + + + + glade_psppire_var_view_post_create + glade_psppire_var_view_get_children + glade_psppire_var_view_get_internal_child + + + + + + + + + + @@ -223,6 +246,7 @@ + diff --git a/glade/var-view.c b/glade/var-view.c new file mode 100644 index 00000000..7eb6c627 --- /dev/null +++ b/glade/var-view.c @@ -0,0 +1,83 @@ +#include + +#include +#include +#include "psppire-var-view.h" + +#include + + +/* Dummy function to keep the linker happy. + Glade never actually needs to use this return value. + */ +GType +psppire_var_ptr_get_type (void) +{ + return 0; +} + +void +glade_psppire_var_view_post_create (GladeWidgetAdaptor *adaptor, + GObject *object, + GladeCreateReason reason) +{ + GladeWidget *widget ; + + PsppireVarView *var_view = PSPPIRE_VAR_VIEW (object); + + g_return_if_fail (PSPPIRE_IS_VAR_VIEW (var_view)); + + widget = glade_widget_get_from_gobject (GTK_WIDGET (var_view)); + if (!widget) + return; + + if (reason == GLADE_CREATE_USER) + { + /* HIG complient border-width defaults on var_views */ + glade_widget_property_set (widget, "border-width", 5); + } +} + + +GtkWidget * +glade_psppire_var_view_get_internal_child (GladeWidgetAdaptor *adaptor, + PsppireVarView *var_view, + const gchar *name) +{ +#if DEBUGGING + g_print ("%s\n", __FUNCTION__); +#endif + return GTK_WIDGET (var_view); +} + + + +void +glade_psppire_var_view_set_property (GladeWidgetAdaptor *adaptor, + GObject *object, + const gchar *id, + const GValue *value) +{ +#if DEBUGGING + g_print ("%s(%p) Type=\"%s\" Id=\"%s\"\n", __FUNCTION__, object, + G_OBJECT_TYPE_NAME( object ), + id); +#endif + + GWA_GET_CLASS (GTK_TYPE_WINDOW)->set_property (adaptor, object, + id, value); +} + + +GList * +glade_psppire_var_view_get_children (GladeWidgetAdaptor *adaptor, + PsppireVarView *dv) +{ + GList *list = NULL; + + g_return_val_if_fail (PSPPIRE_IS_VAR_VIEW (dv), NULL); + + list = glade_util_container_get_all_children (GTK_CONTAINER (dv)); + + return list; +} diff --git a/perl-module/PSPP.xs b/perl-module/PSPP.xs index 77a720ca..fef85510 100644 --- a/perl-module/PSPP.xs +++ b/perl-module/PSPP.xs @@ -584,6 +584,7 @@ CODE: struct file_handle *fh = fh_create_file (NULL, name, fh_default_properties () ); struct sysfile_info *sfi = xmalloc (sizeof (*sfi)); + dict_set_encoding (dict, "UTF-8"); sfi->writer = sfm_open_writer (fh, dict, opts); sfi->dict = dict; sfi->opened = true; diff --git a/perl-module/lib/PSPP.pm b/perl-module/lib/PSPP.pm index c6b05982..fd2f5a5f 100644 --- a/perl-module/lib/PSPP.pm +++ b/perl-module/lib/PSPP.pm @@ -197,7 +197,7 @@ package PSPP::Var; =head3 new ($dict, $name, %input_fmt) Creates and returns a new variable in the dictionary C. The -new variable will have the name C. +new variable will have the name C. C must be a valid UTF8 string. The input format is set by the C parameter (See L). By default, the write and print formats are the same as the input format. @@ -226,7 +226,7 @@ sub new =head3 set_label ($label) -Sets the variable label to C