Ben Pfaff [Wed, 23 Oct 2013 05:13:30 +0000 (22:13 -0700)]
por-file-writer: Rename 'fv' member to 'case_index'.
'fv' used to be used throughout the tree to refer to the first of possibly
several sequential indexes into a case, but it is now obsolescent. The
term 'case_index' is now widely used.
Ben Pfaff [Tue, 8 Oct 2013 03:40:24 +0000 (20:40 -0700)]
comments-dialog: Avoid segfault in comments dialog pasting very long text.
The code in wrap_line() used a GtkTextIter after an insertion invalidated
it. In some setups, with a sufficiently long pasted text, this caused a
Gtk-WARNING and a subsequent segfault. This commit fixes the problem by
removing the offending code. In my testing, this didn't cause a UI
regression.
Reported by Bastián Díaz in the thread starting at
http://lists.gnu.org/archive/html/bug-gnu-pspp/2013-10/msg00005.html
Bastián Díaz [Sun, 6 Oct 2013 22:21:18 +0000 (19:21 -0300)]
Provisional new image is added for univariate analysis.
Added a provisional icon to the univariate analysis (experimental).
The image will be updated to a new icon in the next update of
artwork (0.2.1 version).
Changes:
*analyze-univariate-analysis is added
*Smake is edited
*data-editor.ui is edited
John Darrington [Wed, 2 Oct 2013 13:14:15 +0000 (15:14 +0200)]
Replace checkbox-treeview functions with a object PsppireCheckboxTreeview
Prior to this change there existed a function which operated on
a GtkTreeView which populated it with a model and renderers such
that it would display a list of annotated checkboxes.
This change subclasses GtkTreeView and moves the function to a
method of that class.
I anticipate this will ease implementation of upcoming functionality.
John Darrington [Tue, 1 Oct 2013 07:36:06 +0000 (09:36 +0200)]
Detect absence of rl_outstream and handle accordingly.
Older versions of readline do not appear to have the variable rl_outstream. This variable,
almost certainly points to the same stream as stdout, so this change detects its absence
and uses stdout in those cases.
gui: Support for more flat icons and tag loss fixing in some menus.
→ Icons for "new syntax", "new data", "Display information in working
file and external file are added.
→ Add the reference to the new icons to Smake an *.ui files
→ Replacement of some icons (bug fixes)
It improves the esthetics and visual definition of application icon in different sizes of canvas, and adds a scalable version for desktop environments that use that value.
Ben Pfaff [Mon, 30 Sep 2013 07:12:35 +0000 (00:12 -0700)]
variable: Complete renaming of ROLE_OUTPUT to ROLE_TARGET.
Commit 47d59628a7d51a (psppire-var-sheet: Rename references to the icons
for align, measure and role icons) renamed some but not all uses of
ROLE_OUTPUT, breaking the build. This commit completes the rename.
According to Bastián Díaz, "target" is better than "output" because it
is "a broader concept for function".
Ben Pfaff [Mon, 30 Sep 2013 02:11:41 +0000 (19:11 -0700)]
sys-file-reader: Add support for long string missing values.
I assumed earlier that long string missing values used the same fields in
the system file as other missing values, but I was wrong. This commit
updates the support to match what I've seen in actual system files.
Reported by Przemek Powalko <pp.alter.ego@gmail.com>.
Ben Pfaff [Mon, 30 Sep 2013 01:55:38 +0000 (18:55 -0700)]
missing-values: Make mv_add_str() easier to use.
Both existing callers of mv_add_str() were applying their own padding to
the string value. This commit moves the padding into mv_add_str() itself.
This commit also fixes a minor to-do item in the MISSING VALUES command
whereby truncation of too-long missing values was done bytewise rather than
on the basis of full characters.
Ben Pfaff [Sat, 28 Sep 2013 23:26:08 +0000 (16:26 -0700)]
psppire-data-store: Don't try to parse strings as custom currency formats.
Custom currency formats are not usable for input, only for output, but this
code tried to use them for input if the format was changed to a custom
currency format in the GUI. This commit fixes the problem by using a
DOLLAR format, instead, for parsing.
Reported by Bastián Díaz <diaz.bastian@ymail.com>.
Ben Pfaff [Sat, 28 Sep 2013 23:03:32 +0000 (16:03 -0700)]
variable: Only notify variable width change if it really did change.
This code was notifying a width change every time, even if the width did
not really change, which is wasteful. This had a side effect of revealing
a bug in the GUI code which caused an assertion failure. The bug still
remains in the GUI code, though it is now slightly harder to trigger, and
will be fixed separately in an upcoming commit.
John Darrington [Sat, 28 Sep 2013 06:12:53 +0000 (08:12 +0200)]
Documentation: Explain locale issues in the tutorial.
Mention that explicitly setting the input format is necessary if the user wishes
to ignore the system's LC_NUMERIC setting. Otherwise, following the tutorial
strictly to the letter will result in confusing for users whose locale uses a
comma as the decimal separator.
John Darrington [Fri, 27 Sep 2013 12:21:08 +0000 (14:21 +0200)]
Use correct argument order for pool_nmalloc.
This function (and other calloc-like functions) are may not take zero as the size argument. Hence
the order is important. Reported by Przemek Powalko <pp.alter.ego@gmail.com>
Ben Pfaff [Thu, 26 Sep 2013 04:23:41 +0000 (21:23 -0700)]
gui: Avoid referencing freed data upon closing data window.
Without this commit, the following procedure always yielded Glib/GTK+
warnings or criticals for me:
1. Invoke PSPPIRE with a .sav file specified on the command line.
2. Choose Utilities|Variables...
3. Select a variable in the dialog box, then click on Cancel.
3. Close the output window using the window manager.
4. Close the data window using the window manager.
John Darrington [Mon, 23 Sep 2013 14:46:53 +0000 (16:46 +0200)]
Use the msg function to report errors wherever possible.
Previously, some errors were reported using the GNU "error" function from error.h
rather than the PSPP msg function. This wasn't too bad for the terminal user interace,
but gui users could miss important messages (since they never see stderr).
The reason for not using msg in some instances, was twofold: 1) Some
errors might occur before the messaging system had been initialised. 2) If an
error occured whilst reporting an error, an infinite loop would occur.
This change overcomes these problems by detecting re-entrancy, and uninitialised
messaging system, and falling back to fwrite if either of these conditions occur.
John Darrington [Wed, 18 Sep 2013 17:16:08 +0000 (19:16 +0200)]
Calculate Fisher Exact Test even if all cell counts >= 5
Remove the condition that one of the cell counts must be < 5
before calculating the fisher exact test. This condition seems
to be an anachronism, but still (erroneously) documented in Algorithms.
John Darrington [Sat, 7 Sep 2013 05:12:59 +0000 (07:12 +0200)]
Make one of the icon sets a wildcard set.
We currently have two icon sets: A 16x16 and a 24x24 set. Previously,
we had been using the 16x16 set for menuitems and the 24x24 set for the
toolbar. However it appeared that windows uses the symbol GTK_ICON_SIZE_SMALL_TOOLBAR
instead of GTK_ICON_SIZE_LARGE_TOOLBAR, which meant no icons appeared in the
toolbar.
This change sets the 24x24 set as a "wildcard" set meaning it will be used for
all purposes except menuitems.
John Darrington [Wed, 4 Sep 2013 17:32:33 +0000 (19:32 +0200)]
Change instances of GNM_SUPPORT to GNM_READ_SUPPORT
Commit 82c1097ab658e8c13ab3ad439970148defba6e19 used the preprocessor
symbol GNM_READ_SUPPORT but GNM_SUPPORT was the one set in the autconf
files. Hence some code was erroneously omitted.
This change uses GNM_READ_SUPPORT throughout which is consistent
with ODF_READ_SUPPORT
Ben Pfaff [Mon, 2 Sep 2013 20:00:30 +0000 (13:00 -0700)]
data-parser: A hard delimiter at end of line is not an empty field.
Until now, DATA LIST FREE(',') treated input like this:
1,2,
3,4,
as describing six fields, two of which were blank at the end of a line.
A bug report and subsequent experiments showed that in fact this is only
four fields, none of which is blank. This commit fixes the problem and
adds a new test that should avoid regression against this issue.