John Darrington [Thu, 2 Apr 2009 02:26:03 +0000 (10:26 +0800)]
Allow non-ascii characters to be entered as variable names.
Previously, only ascii could be used in the name of a variable,
so the variable sheet did not bother converting. Now we have
to convert the encoding.
John Darrington [Thu, 2 Apr 2009 00:46:57 +0000 (08:46 +0800)]
Use a system file's "character code" to set the encoding.
When reading a system file, use the "character code" as a
fallback to set the dictionary's character encoding. If present,
record 7, subtype 20 will override this parameter.
John Darrington [Thu, 2 Apr 2009 00:26:15 +0000 (08:26 +0800)]
New datasets to use the current default encoding.
When creating a new dataset, its dictionary is now set
to the current default encoding (which can be changed
using SET LOCALE).
John Darrington [Wed, 1 Apr 2009 01:58:49 +0000 (09:58 +0800)]
Merge commit 'origin/master' into charset
John Darrington [Wed, 1 Apr 2009 01:56:49 +0000 (09:56 +0800)]
Implemented the SET LOCALE='...' command.
Allow the user to set the default character encoding.
John Darrington [Wed, 1 Apr 2009 00:43:07 +0000 (08:43 +0800)]
Refactor locale initialisation.
Created a common i18n_init function that both
the GUI and terminal can use, instead of each
doing it their own way.
Jason H Stover [Mon, 30 Mar 2009 20:39:27 +0000 (16:39 -0400)]
design_matrix.c: New accessor functions design_matrix_get_element and
design_matrix_set_element.
covariance_matrix.c: New accessor function
covariance_matrix_get_element. Use new accessor functions
design_matrix_get_element and design_matrix_set_element.
John Darrington [Sun, 29 Mar 2009 23:59:42 +0000 (07:59 +0800)]
Merge branch 'refs/heads/charset' of ssh://jmd@git.sv.gnu.org/srv/git/pspp into charset
John Darrington [Sun, 29 Mar 2009 23:57:30 +0000 (07:57 +0800)]
Add code to read character encoding to dissect-sysfile.
John Darrington [Sun, 29 Mar 2009 23:47:38 +0000 (07:47 +0800)]
Document record 7, subtype 20 in system file format.
Add information about the character encoding record to
the developer's reference guide.
John Darrington [Sun, 29 Mar 2009 23:05:22 +0000 (07:05 +0800)]
Set the dictionary's encoding when reading postgresql data.
Jason Stover [Sun, 29 Mar 2009 15:04:31 +0000 (11:04 -0400)]
covariance-matrix.c (covariance_accumulator_to_matrix): Use sum_i and
sum_j to compute products of means. Store the sums of variables in
cov->sums, rather than storing the means.
John Darrington [Sun, 29 Mar 2009 10:13:33 +0000 (18:13 +0800)]
Set dictionary's encoding when reading gnumeric files
John Darrington [Sun, 29 Mar 2009 05:19:59 +0000 (13:19 +0800)]
Write encoding to system files.
Write the encoding to record 7(20) when saving.
John Darrington [Sun, 29 Mar 2009 04:05:09 +0000 (12:05 +0800)]
Fix crash running two consecutive examine commands.
Re-initialise list in the dynamically instead of
relying on the static initialiser. Fixes bug #25903
John Darrington [Sun, 29 Mar 2009 01:29:41 +0000 (09:29 +0800)]
Avoid calling iconv_open on each conversion.
Instead of creating a convertor each time a string
needs to be re-encoded, we now keep a hash of convertors
keyed by the permutation of input/output encodings.
Jason Stover [Sat, 28 Mar 2009 19:24:57 +0000 (15:24 -0400)]
covariance-matrix.c (get_sum): New function to compute means during
loop over covariance matrix.
covariance-matrix.c (covariance_accumulator_to_matrix): Use get_sum to
compute the means.
John Darrington [Sat, 28 Mar 2009 12:00:26 +0000 (21:00 +0900)]
Display a file's encoding in SYSFILE INFO.
Add a file's encoding to the information given by SYSFILE INFO.
John Darrington [Sat, 28 Mar 2009 11:50:51 +0000 (20:50 +0900)]
Convert encoding even if encodings are identical.
recode_string must continue, even if the source and
target encodings are identical, because invalid bytes
in the source string need to become '?' to avoid
later problems.
John Darrington [Sat, 28 Mar 2009 11:46:46 +0000 (20:46 +0900)]
Pass dict to name_to_string and label_to_string.
Oops, forgot to replace these NULLs.
John Darrington [Sat, 28 Mar 2009 06:23:12 +0000 (15:23 +0900)]
Remove LIB_CLOSE variables from linker options.
Gnulib used to define @LIB_CLOSE@ but no longer does,
so this variable is no longer needed nor appropriate.
John Darrington [Sat, 28 Mar 2009 03:24:34 +0000 (12:24 +0900)]
Convert files named on the command line to filename encoding.
Files specified on the command line must be converted to the
"filename" encoding (whatever it may be) otherwise some systems
will not know they exist. Tested by Michel Boaventura.
Partially fixes bug #26023
John Darrington [Fri, 27 Mar 2009 04:55:26 +0000 (13:55 +0900)]
Test for NULL before calling strdup
John Darrington [Fri, 27 Mar 2009 04:47:01 +0000 (13:47 +0900)]
Read dictionary encoding from data files.
If record 7 subtype 20 exists, use it to set the encoding of the
dictionary when reading a file.
Ben Pfaff [Mon, 19 Jan 2009 04:10:43 +0000 (20:10 -0800)]
Fix memory leak in wilcoxon_execute().
Ben Pfaff [Fri, 27 Mar 2009 04:11:12 +0000 (21:11 -0700)]
Fix error message for bad characters in syntax files.
Before this commit, on systems where "char" is a signed type,
formatting a char with %o would sign-extend to the width of "int",
so that a typical error message would look like:
Bad character in input: `\
37777777605'.
With this commit, the value gets zero-extended, producing the more
sensible error mesage:
Bad character in input: `\205'.
John Darrington [Fri, 27 Mar 2009 02:51:35 +0000 (11:51 +0900)]
Made var_is_valid_name more permissive.
Allowed lex_is_id1 and lex_is_id2 to match non-ascii characters,
in addition to the others it tests for.
John Darrington [Fri, 27 Mar 2009 02:46:21 +0000 (11:46 +0900)]
Redesign the character re-encoding code.
Remove the statically allocated convertors,
instead, assume that the encoding of variables,
data and associated metadata is stored in the dictionary.
John Darrington [Thu, 26 Mar 2009 23:19:27 +0000 (08:19 +0900)]
Removed some unused features from src/libpspp/i18n.c and src/libpspp/i18n.h
John Darrington [Wed, 25 Mar 2009 01:48:31 +0000 (10:48 +0900)]
Added the "Display Data File Information" item.
Added a menuitem to the File menu which calls either
DISPLAY DICTIONARY or SYSFILE INFO per spss.
John Darrington [Tue, 24 Mar 2009 11:17:09 +0000 (20:17 +0900)]
Set the text import dialog's default button.
Grab the focus of the appropriate button of the
text import dialog, when a new page is prepared.
This makes it much easier to use without a mouse.
John Darrington [Mon, 23 Mar 2009 22:04:52 +0000 (07:04 +0900)]
Merge branch 'master' of ssh://jmd@git.sv.gnu.org/srv/git/pspp
John Darrington [Mon, 23 Mar 2009 11:12:30 +0000 (20:12 +0900)]
Fix bug in text-import-dialog
John Darrington [Mon, 23 Mar 2009 08:44:05 +0000 (17:44 +0900)]
Convert filename on confirmation dialog
John Darrington [Mon, 23 Mar 2009 08:22:18 +0000 (17:22 +0900)]
Show error dialog if syntax file is not readable.
Popup a dialog box, if a syntax file cannot be
opened for any reason.
John Darrington [Mon, 23 Mar 2009 07:39:06 +0000 (16:39 +0900)]
Convert filename encodings when opening files.
On w32, filenames have to be converted from utf8 to
the libc encoding before passing to the lexer.
John Darrington [Mon, 23 Mar 2009 06:42:38 +0000 (15:42 +0900)]
Initialise description on init.
Windows' description parameter must not be
NULL. So initialize it to the empty string.
John Darrington [Sun, 22 Mar 2009 08:37:42 +0000 (17:37 +0900)]
Allow non-ascii characters to be entered into the variable and data sheets.
Convert strings from utf8 to the pspp (data) localeĀ“s encoding before passing
to the model.
John Darrington [Sun, 22 Mar 2009 04:19:12 +0000 (13:19 +0900)]
Avoid potential bugs with setlocale's return value.
Use strdup to copy all return values from setlocale,
since it's statically allocated.
John Darrington [Sat, 21 Mar 2009 06:12:47 +0000 (15:12 +0900)]
Fix crash when running under windows with non-english locale
Fixed a bug which manifested itself when running a Mingw compiled
binary with a non-english locale. setlocale returns a statically
allocated string, so it's valid only until the next call to setlocale.
Thanks to Michel Boaventura for reporting and helping to diagnose this
problem.
John Darrington [Thu, 19 Mar 2009 22:10:31 +0000 (07:10 +0900)]
Added missing '#include <config.h>' lines.
Added these missing #includes at top of *.c files.
Thanks to Michel Boaventura for reporting this.
John Darrington [Wed, 18 Mar 2009 22:22:17 +0000 (07:22 +0900)]
Change name of config parameter
John Darrington [Wed, 18 Mar 2009 08:21:00 +0000 (17:21 +0900)]
Rename the "model" property to "dictionary"
John Darrington [Tue, 17 Mar 2009 23:44:32 +0000 (08:44 +0900)]
Fixed crash which occured when deleting dictionaries which had variable labels
John Darrington [Tue, 17 Mar 2009 12:14:12 +0000 (21:14 +0900)]
Merge branch 'master' of ssh://jmd@git.sv.gnu.org/srv/git/pspp
John Darrington [Tue, 17 Mar 2009 12:13:26 +0000 (21:13 +0900)]
Fix bug saving window positions
John Darrington [Tue, 17 Mar 2009 11:58:51 +0000 (20:58 +0900)]
Add a popup menu to the PsppireDictView object.
Currently this menu contains only one item, which
lets you choose between labels or values.
John Darrington [Tue, 17 Mar 2009 10:34:54 +0000 (19:34 +0900)]
Remove some unnecessary #includes
John Darrington [Tue, 17 Mar 2009 10:22:21 +0000 (19:22 +0900)]
Namespace police duty.
Changed a number of instances of G_TYPE_ to PSPPIRE_TYPE_
John Darrington [Tue, 17 Mar 2009 10:13:48 +0000 (19:13 +0900)]
Delete extraneous characters from comment.
Thanks to Ben Pfaff for pointing this out.
John Darrington [Tue, 17 Mar 2009 10:11:20 +0000 (19:11 +0900)]
New object PsppireDictView
Created a new object PsppireDictView, which derives
from GtkTreeView for the purpose of displaying a
dictionary. Replaces much of the functionality in
dict-display.c
John Darrington [Mon, 16 Mar 2009 23:22:15 +0000 (08:22 +0900)]
Remove preprocessor condition
John Darrington [Mon, 16 Mar 2009 22:01:15 +0000 (07:01 +0900)]
Make psppire_sheet_get_attributes a private function
John Darrington [Mon, 16 Mar 2009 21:37:11 +0000 (06:37 +0900)]
Use GtkHPaned in variable info dialog
Moved variable info dialog spec from psppire.glade into
its own file. Added a "sliding" property to PsppireDialog
which causes Gtk[VH]Paned to be used instead of Gtk[VH]Box.
Set the sliding property for the variable info dialog.
Jason H Stover [Mon, 16 Mar 2009 21:32:51 +0000 (17:32 -0400)]
covariance-matrix.c: Add matrices to store valid sample sizes and
products of means in struct covariance_matrix.
covariance-matrix.c (update_ssize): New function
covariance-matrix.c (covariance_accumulator_to_matrix): Store valid
sample sizes and products of means, then use them to compute the
entries of the covariance matrix after passing through the
hash. Return void.
John Darrington [Mon, 16 Mar 2009 09:02:24 +0000 (18:02 +0900)]
Indicate filtered cases in data sheet.
Add feature to indicate filtered out cases
on data sheet. Closes bug #20828
John Darrington [Mon, 16 Mar 2009 00:31:21 +0000 (09:31 +0900)]
Prevent wierd focusing issues when changing cell
John Darrington [Sun, 15 Mar 2009 22:50:58 +0000 (07:50 +0900)]
Emit variable callback even if label is null.
When a label was set to null, previously no callback
was emitted. Fixes bug #25872
John Darrington [Sun, 15 Mar 2009 22:15:00 +0000 (07:15 +0900)]
Focus var/data sheet after switching tabs
John Darrington [Sun, 15 Mar 2009 21:58:34 +0000 (06:58 +0900)]
Config option to prefer variable labels vs. names
Added user config option to select whether dictionary
treeviews in dialog boxes should prefer variable labels
over names. Default is names.
John Darrington [Sat, 14 Mar 2009 23:24:12 +0000 (08:24 +0900)]
Merge branch 'master' of ssh://jmd@git.sv.gnu.org/srv/git/pspp
John Darrington [Sat, 14 Mar 2009 22:59:49 +0000 (07:59 +0900)]
Save windows' maximized status as well as their geometry.
Jason H Stover [Fri, 13 Mar 2009 21:28:37 +0000 (17:28 -0400)]
covariance-matrix.c (is_origin): New function
covariance-matrix.c (get_exact_subscript): New function
covariance-matrix.c (covariance_matrix_insert): Use get_exact_subscript.
covariance-matrix.c (is_covariance_contributor): New function.
covariance-matrix.c (covariance_accumulator_to_matrix): Iterate over
the rows and columns of the covariance matrix, and the hash table to
accumulate values for each entry of the matrix.
design-matrix.c (design_matrix_get_n_cols): New function
design-matrix.c (design_matrix_get_n_rows): New function
John Darrington [Fri, 13 Mar 2009 03:52:51 +0000 (12:52 +0900)]
Fix critical when opening fonts dialog
John Darrington [Fri, 13 Mar 2009 00:35:48 +0000 (09:35 +0900)]
Don't proxy button-open to action_data_open.
Connect to the clicked signal instead, because we
don't want the icon, label etc. to assume that of
the action. Closes bug #25817
John Darrington [Thu, 12 Mar 2009 23:19:25 +0000 (08:19 +0900)]
Fixed problems getting accelerator keys to work in data editor
John Darrington [Thu, 12 Mar 2009 23:09:23 +0000 (08:09 +0900)]
Split data-editor.glade into two files.
Seperated the glade specification of the data editor
widgets from those of the popup dialogs in the
variable sheet.
John Darrington [Thu, 12 Mar 2009 22:17:26 +0000 (07:17 +0900)]
Re-arrange data-editor widgets.
Made the data editor somewhat more HIG
compliant.
John Darrington [Wed, 11 Mar 2009 23:44:16 +0000 (08:44 +0900)]
Fix generation of email address
John Darrington [Wed, 11 Mar 2009 21:57:42 +0000 (06:57 +0900)]
Remove repeated '@setfilename' lines from Texinfo source.
Remove lines '@setfilename ignored' from .texi files.
The Texinfo manual doesn't mention that more than
one @setfilename argument is allowed, and having
more than one seems to produce confusing docbook
output.
John Darrington [Wed, 11 Mar 2009 13:47:24 +0000 (22:47 +0900)]
A simpler way to avoid one makeinfo bug
John Darrington [Wed, 11 Mar 2009 10:29:31 +0000 (19:29 +0900)]
Convert manual to docbook and load that in yelp.
Instead of yelp loading info files, have it load
docbook xml files instead.
John Darrington [Tue, 10 Mar 2009 22:27:44 +0000 (07:27 +0900)]
Include gtk-builder-convert to process .glade files
The gtk-builder-convert shipped with some older versions
of gtk+ has proved problematic. This change includes a
"known good" version, and builds using it.
John Darrington [Tue, 10 Mar 2009 07:22:46 +0000 (16:22 +0900)]
Use double precision floats throughout psppire-axis-*
Change some instances of float to double, to avoid
loss of precision when calculating pixel positions.
Closes bug #25099
John Darrington [Sun, 8 Mar 2009 06:52:54 +0000 (15:52 +0900)]
Allow make clean to work without perl-module/Makefile
John Darrington [Sat, 7 Mar 2009 11:54:21 +0000 (20:54 +0900)]
Default response to be same as Cancel
John Darrington [Sat, 7 Mar 2009 11:24:21 +0000 (20:24 +0900)]
Made the save-before-quit dialog more HIG compliant.
Thanks to jeff<kiddo> for the suggestion. Closes patch #6749
John Darrington [Sat, 7 Mar 2009 09:08:49 +0000 (18:08 +0900)]
Rename identifier and add timestamp for unsaved flag.
John Darrington [Sat, 7 Mar 2009 08:54:16 +0000 (17:54 +0900)]
Better abstraction of the unsaved window status.
Implementations can now only set unsaved to true.
Only the abstract base class can set it to false,
which it does when the window is saved.
John Darrington [Sat, 7 Mar 2009 03:23:07 +0000 (12:23 +0900)]
Add libpspp-core as a dependency of the perl module
John Darrington [Fri, 6 Mar 2009 12:37:49 +0000 (21:37 +0900)]
Remove some unnecessary casts
John Darrington [Fri, 6 Mar 2009 12:27:24 +0000 (21:27 +0900)]
Remove some unused variables
John Darrington [Fri, 6 Mar 2009 02:35:47 +0000 (11:35 +0900)]
Tab key now moves to next row, upon end of line.
This change alters the behaviour of the tab key
in the variable and data sheet. When using the
tab key, if the last cell in a row is encountered,
it will now cause the active cell to move to the
first cell in the next row. Fixes bug #25168
John Darrington [Fri, 6 Mar 2009 01:33:59 +0000 (10:33 +0900)]
Add new dependency to gui-tools
John Darrington [Thu, 5 Mar 2009 09:14:45 +0000 (18:14 +0900)]
Fix problem focusing variable sheet
John Darrington [Thu, 5 Mar 2009 05:35:25 +0000 (14:35 +0900)]
Refactor Data and Syntax Loading
John Darrington [Wed, 4 Mar 2009 13:19:47 +0000 (22:19 +0900)]
Improve behaviour of recent file lists.
The code now deletes an item from the recent list, after
an unsuccessfull attempt to open it.
They are now sorted in most recently used order.
John Darrington [Wed, 4 Mar 2009 05:03:08 +0000 (14:03 +0900)]
Added some spacing between widgets
John Darrington [Wed, 4 Mar 2009 01:15:18 +0000 (10:15 +0900)]
Convert variable name to utf8 before displaying in tooltips
John Darrington [Wed, 4 Mar 2009 00:54:58 +0000 (09:54 +0900)]
Save and recall window geometry for dialog boxes
John Darrington [Wed, 4 Mar 2009 00:22:46 +0000 (09:22 +0900)]
Convenience functions for setting/retrieving window geometry.
Created a pair of convenience functions in psppire-conf.c to
perform saving and loading of window geometry. Updated
psppire-window.c to use them.
John Darrington [Tue, 3 Mar 2009 11:47:40 +0000 (20:47 +0900)]
Added a simple singleton object for user preference storage.
John Darrington [Mon, 2 Mar 2009 22:40:30 +0000 (07:40 +0900)]
Added stock icon to About menuitem
John Darrington [Mon, 2 Mar 2009 22:12:26 +0000 (07:12 +0900)]
Merge branch 'master'; commit 'origin/stable'
Conflicts:
src/math/linreg.h
src/ui/gui/psppire-data-editor.c
John Darrington [Mon, 2 Mar 2009 11:56:30 +0000 (20:56 +0900)]
Set icon for text import assistant window
John Darrington [Mon, 2 Mar 2009 11:51:04 +0000 (20:51 +0900)]
Remove reference to 'struct data_editor' which is a type which no longer exists
John Darrington [Mon, 2 Mar 2009 11:47:59 +0000 (20:47 +0900)]
Remove preprocessor condition which could no longer be satistified
John Darrington [Mon, 2 Mar 2009 11:17:18 +0000 (20:17 +0900)]
Added a .desktop file.
Added a desktop file for the benefit of operating systems which use them.
Thanks to James R. Van Zandt for providing this.
John Darrington [Mon, 2 Mar 2009 10:47:07 +0000 (19:47 +0900)]
Rewrote the recent file manager stuff
John Darrington [Mon, 2 Mar 2009 07:58:01 +0000 (16:58 +0900)]
Rename get_object_assert to get_action_assert