histogram tick drawing - added format generation for optimum tick drawing
Fixes bug #45192 which showed up in the gtk3 branch on MacOS.
It replaces the decimal_xxx computations with a routine that computes a
formatting string and a scale factor for a given axis range and number of
bins. The formatting will switch between normal and scientific depending on
the length of the displayed label text. The formatting is such that no
rounded numbers like 3.9999999 when in fact 4 is expected is shown.
Differences between bins remain visible in the tick labels.
In addition the width of the rendered labels is compared with the width
of the bins in the display such that the labels will automatically
switch between horizontal and 45 degree display.
gtk3 - adapted draw routine to gtk_cairo_should_draw_window. gtk-criticals with undefined drag window disappeared. The gtk-criticals showed up in debian 8.
fixed initial show of names in header window. Variable names only showed up after switching between variable and data window. The reason is that the buttons of the columns are not created. This is due to interdependency between the size allocation and the button creation. I removed the need_button mechanism.
Switch the order in which scatterplot axes appear in the graphic's caption.
Hulliger Beat <beat.hulliger@fhnw.ch> Reported that scatterplots were titled 'x vs. y'
where x and y were opposite to what is conventional. This change fixes that.
Ben Pfaff [Tue, 10 Mar 2015 02:45:32 +0000 (19:45 -0700)]
help-pages-list: Distribute.
Otherwise "make distcheck" will have to regenerate it, which means
that it will have to regenerate doc/pspp.xml (because it depends on
help-pages-list) but that's not possible under "make distcheck"
because it makes the source directory read-only.
Ben Pfaff [Sun, 8 Mar 2015 20:34:10 +0000 (13:34 -0700)]
configure: Create "doc" directory in build directory.
Otherwise we get build failures from the autobuilder when the rule
in gui/automake.mk tries to create doc/help-pages-list. Problem
introduced in commit 531de52e961c (PsppireDialog: New property:
help-page).
Developers probably didn't notice this problem because they probably
already had doc/ directories in their build directories due to
building PDF versions of the documentation at one time or another, or
because they do builds in the source directory.
John Darrington [Fri, 23 Jan 2015 18:23:43 +0000 (19:23 +0100)]
Ensure that example_dir is relocatable.
commit be1157c5591142920a95d587acf97f5eaf3d04fe added a reference to the
installed data directory. Unfortunately I forgot to allow for relocatable
installations. This change fixes that.
John Darrington [Tue, 6 Jan 2015 06:25:21 +0000 (07:25 +0100)]
New module to perform decimal floating point arithmetic for charts.
This change adds a small module to perform floating point arithmetic
with a decimal base, and uses it to calculate the graticule marks for
charts.
Rationale: Graticule marks want to be displayed in decimal. However
not all decimal values can be represented in a double precision
floating point binary. This approach pushes the precision loss from
the value of the mark, to the position on the chart - we don't
particularly care if a tick mark is a fraction of a pixel out of place,
but we do care if 4.0 is displayed as 3.9999999999
John Darrington [Wed, 7 Jan 2015 19:03:09 +0000 (20:03 +0100)]
Syntax Window: Simplify the Edit|Paste callback.
Apparently pasting into the Syntax Window under Windoze didn't work.
This change makes the EditPaste callback simpler and apparently it
fixes the problem.
Thanks to Alan Mead for reporting the problem and to Harry Thissen
for testing the fix.
Ben Pfaff [Sun, 4 Jan 2015 19:13:01 +0000 (11:13 -0800)]
psppire-output-view: Fix segfault during printing.
psppire-output-view tried to make use of a special feature in the
cairo output driver that allowed the cairo_t to be omitted to avoid
actually rendering anything, for pagination purposes, but the cairo
code had changed and this feature had not been carefully maintained,
resulting in a segfault. This commit stops trying to use that
feature, since it seems like it could easily get broken again in the
future and doesn't have much benefit anyhow.
John Darrington [Sat, 3 Jan 2015 10:37:11 +0000 (11:37 +0100)]
Correct documentation example and add a corresponding test.
The tutorial section of the manual contained an example which
did not correspond to real results. This change corrects the
example and adds a test for it.
Ben Pfaff [Sun, 28 Dec 2014 16:49:36 +0000 (08:49 -0800)]
configure: Drop -Wdeclaration-after-statement.
We keep getting new instances of this warning in the tree, and it's
not really necessary these days since even MSVC supports mid-block
declarations now.
John Darrington [Sun, 14 Dec 2014 00:51:44 +0000 (01:51 +0100)]
File Export: Added a "plain text" option.
In the File|Export menu of the output window, enabled unicode box characters for
the "Text" output, and added a "Text (plain)" menuitem without this feature.
Ben Pfaff [Mon, 8 Dec 2014 06:36:36 +0000 (22:36 -0800)]
doc: Add section on how to exit PSPP to the tutorial.
Daniel Schlieper reported that he had trouble figuring out how to
exit. The FINISH command was already documented, but it wasn't
mentioned in the tutorial, so perhaps this will help.
Ben Pfaff [Mon, 8 Dec 2014 06:34:21 +0000 (22:34 -0800)]
command: Fix delayed execution of FINISH.
PSPP delayed the execution of FINISH until it read the first token
of the next command. This commit changes it to execute immediately,
as one would expect..
Ben Pfaff [Mon, 8 Dec 2014 06:13:44 +0000 (22:13 -0800)]
README.Git: Upgrade recommended Gnulib version.
Harry Thijssen reported that the older version of Gnulib failed to
build (in msvc-inval.c) on Windows, but that the newer version built
fine with the exception of the error that should have been fixed by
the previous commit.
Ben Pfaff [Mon, 8 Dec 2014 06:10:54 +0000 (22:10 -0800)]
lexer: Include <unistd.h> to ensure 'read' is consistently replaced.
On some platforms, Gnulib #defines read to rpl_read. The lexer uses
an unreleated function pointer member named 'read' in struct
lex_reader_class. It doesn't really matter whether this name gets
replaced with rpl_read as long as it always happens consistently.
Adding "#include <unistd.h>" to lexer.h should ensure that.
Ben Pfaff [Sat, 18 Oct 2014 19:11:34 +0000 (12:11 -0700)]
cairo: Add .5pt gutter around table rules.
Commit d3fef25674baf4f4 (output: Add footnote support.) removed the 3-pt
gutter around table rules, instead putting a margin around cell contents.
This usually worked out fine, but for some tables in the GUI it caused the
rightmost rule in the table to disappear. This is probably some kind of
off-by-one error in table size computation or clipping. We may have to
eventually resolve that. However, this commit seems like an adequate
temporary fix: instead of fixing the off-by-one error, add a thin gutter
around the rules, so that the actual content of the rule doesn't get
clipped off.
Ben Pfaff [Sat, 18 Oct 2014 19:06:11 +0000 (12:06 -0700)]
pspp-dev.texi: Add authors as @author arguments.
With a blank @author, makeinfo complains.
Without @author at all, the title page in TeX output looks funny.
So this commit simply names the authors, as determined by "git log" on
the doc/dev directory.
Ben Pfaff [Sat, 18 Oct 2014 17:38:53 +0000 (10:38 -0700)]
psppire-output-view: Properly render the first few items of output.
Commit 18f9e37c8bc5 (psppire-output-view: Only render output items once the
window is realized.) fixed a crashing bug, but when I tested it I didn't
carefully look at the output. In fact, any output items that were rendered
before the window was realized were not displayed, because the widgets
created for them were never shown or properly initialized. This commit
fixes the problem.