pspp
11 years agovar-type-dialog: Convert to a GObject.
Ben Pfaff [Thu, 9 Aug 2012 06:27:32 +0000 (23:27 -0700)]
var-type-dialog: Convert to a GObject.

The one issue I can't figure out is why this changes the look of
the dialog box so that its height is the total height of all of
the widgets in the "middlebox", rather than the maximum height
actually needed.

11 years agosrc/math/categoricals.c: Remove inappropriate const qualifier 20120811000504/pspp
John Darrington [Sat, 11 Aug 2012 06:15:59 +0000 (08:15 +0200)]
src/math/categoricals.c: Remove inappropriate const qualifier

11 years agovariable: Skip callback if new format is same as old format. 20120809000508/pspp 20120810000503/pspp
Ben Pfaff [Thu, 9 Aug 2012 06:17:36 +0000 (23:17 -0700)]
variable: Skip callback if new format is same as old format.

Seems fairly worthwhile.

11 years agoFixed one of the leaks in MEANS 20120808000503/pspp
John Darrington [Sun, 5 Aug 2012 16:00:36 +0000 (18:00 +0200)]
Fixed one of the leaks in MEANS

11 years agoFix leaks in RELIABILITY command 20120806000503/pspp 20120807000505/pspp
John Darrington [Sun, 5 Aug 2012 14:57:04 +0000 (16:57 +0200)]
Fix leaks in RELIABILITY command

11 years agoFixed leak in Chi-Squared test 20120804000503/pspp 20120805000504/pspp
John Darrington [Sat, 4 Aug 2012 05:26:07 +0000 (07:26 +0200)]
Fixed leak in Chi-Squared test

11 years agocategoricals.c (struct payload): Rename destroy to calculate
John Darrington [Sat, 4 Aug 2012 05:04:47 +0000 (07:04 +0200)]
categoricals.c (struct payload): Rename destroy to calculate

11 years agoONEWAY: call categoricals_done only once
John Darrington [Sat, 4 Aug 2012 04:48:30 +0000 (06:48 +0200)]
ONEWAY: call categoricals_done only once

11 years agoMake categoricals own its interactions
John Darrington [Fri, 3 Aug 2012 19:35:11 +0000 (21:35 +0200)]
Make categoricals own its interactions

11 years agoFix leak in render-test 20120803000505/pspp
John Darrington [Thu, 2 Aug 2012 18:54:18 +0000 (20:54 +0200)]
Fix leak in render-test

11 years agosys-file-reader.c: Fix leak in parse_mrsets 20120802000504/pspp
John Darrington [Wed, 1 Aug 2012 19:22:11 +0000 (21:22 +0200)]
sys-file-reader.c: Fix leak in parse_mrsets

11 years agoods-reader: Fix ods_file_casereader_destroy() call in open function. 20120801000505/pspp
Ben Pfaff [Wed, 1 Aug 2012 05:55:30 +0000 (22:55 -0700)]
ods-reader: Fix ods_file_casereader_destroy() call in open function.

zreader is a "struct zip_reader *" but ods_file_casereader_destroy()
takes a "struct casereader *".  However ods_file_casereader_destroy()
doesn't actually use that argument so we might as well pass NULL.

11 years agoFix leak in psppire-lex-reader.c
John Darrington [Tue, 31 Jul 2012 17:38:51 +0000 (19:38 +0200)]
Fix leak in psppire-lex-reader.c

11 years agoFACTOR: Fix warning about discarding const qualifier. 20120731000506/pspp
Ben Pfaff [Tue, 31 Jul 2012 06:16:39 +0000 (23:16 -0700)]
FACTOR: Fix warning about discarding const qualifier.

11 years agovar-type-dialog: Change entries to spin buttons, add validation.
Ben Pfaff [Mon, 30 Jul 2012 06:56:09 +0000 (23:56 -0700)]
var-type-dialog: Change entries to spin buttons, add validation.

The GtkEntry boxes used for entering and displaying width and
decimal places didn't do any validation that the width and decimal
places were valid for the selected format type, so it was possible
to enter values that couldn't actually be used.  This commit changes
the GtkEntry boxes into GtkSpinButton widgets that, as a side
effect, validate correct values through their attached
GtkAdjustments.  This is not just safer but easier to use.

11 years agovar-type-dialog: Reduce redundancy further.
Ben Pfaff [Mon, 30 Jul 2012 06:09:09 +0000 (23:09 -0700)]
var-type-dialog: Reduce redundancy further.

set_format_from_treeview() and set_format_type_from_treeview() were
mostly common code.

11 years agovar-type-dialog: Reduce redundancy.
Ben Pfaff [Sat, 28 Jul 2012 21:18:40 +0000 (14:18 -0700)]
var-type-dialog: Reduce redundancy.

var_type_dialog_set_state() and on_toggle_2() had considerable
redundant code.  This reduces it by adding a new function
on_active_button_change() that generalizes the two functions.  I
also personally found the previous way of showing and hiding widgets
to be hard to follow; I think that the bitmap approach used here
is more straightforward.

This also consolidates the two separate signal handlers for each
button into one, and replaces the similar functions
select_treeview_from_format() and select_treeview_from_format_type()
by three functions find_format(), find_format_type(), and
select_treeview_at_index() that total less code.

11 years agovar-type-dialog: Properly adjust formats when switching buttons.
Ben Pfaff [Fri, 27 Jul 2012 06:21:54 +0000 (23:21 -0700)]
var-type-dialog: Properly adjust formats when switching buttons.

The var-type-dialog based the default new format on the variable's
existing format when a button was clicked, and attempted to adjust
the width and decimals into valid range, but the adjustment wasn't
always correct, so in some cases it could pick an invalid format.

This commit uses fmt_fix_output() instead, which will always choose
a valid output format.

11 years agoFixed a second ONEWAY leak 20120730000505/pspp
John Darrington [Sun, 29 Jul 2012 18:59:12 +0000 (20:59 +0200)]
Fixed a second ONEWAY leak

11 years agoFix one of the leaks in ONEWAY
John Darrington [Sun, 29 Jul 2012 18:54:16 +0000 (20:54 +0200)]
Fix one of the leaks in ONEWAY

11 years agoFix memory leak in Chisquare
John Darrington [Sun, 29 Jul 2012 13:12:26 +0000 (15:12 +0200)]
Fix memory leak in Chisquare

11 years agoFix memory leak in AGGREGATE command
John Darrington [Sun, 29 Jul 2012 12:49:32 +0000 (14:49 +0200)]
Fix memory leak in AGGREGATE command

11 years agoFix memory leak in dictionary.c
John Darrington [Sun, 29 Jul 2012 11:37:41 +0000 (13:37 +0200)]
Fix memory leak in dictionary.c

11 years agoFix leaks in ODS reader
John Darrington [Sun, 29 Jul 2012 09:22:13 +0000 (11:22 +0200)]
Fix leaks in ODS reader

11 years agoFixed a memory leak in sparse-xarray-test.c
John Darrington [Sun, 29 Jul 2012 06:05:00 +0000 (08:05 +0200)]
Fixed a memory leak in sparse-xarray-test.c

11 years agoREADME.Git - Update the gnulib commit number to include memory leak fix
John Darrington [Sun, 29 Jul 2012 04:55:14 +0000 (06:55 +0200)]
README.Git - Update the gnulib commit number to include memory leak fix

11 years agoFixed some of the leaks in REGRESSION 20120729000504/pspp
John Darrington [Sat, 28 Jul 2012 16:27:22 +0000 (18:27 +0200)]
Fixed some of the leaks in REGRESSION

11 years agoFixed memory leaks in FACTOR
John Darrington [Sat, 28 Jul 2012 15:00:32 +0000 (17:00 +0200)]
Fixed memory leaks in FACTOR

11 years agoFix leak in u8-istream-test.c
John Darrington [Sat, 28 Jul 2012 11:13:08 +0000 (13:13 +0200)]
Fix leak in u8-istream-test.c

11 years agoFix typo in include-path.c which was causing memory leaks.
John Darrington [Sat, 28 Jul 2012 10:44:26 +0000 (12:44 +0200)]
Fix typo in include-path.c which was causing memory leaks.

11 years agoFix memory leak in encoding-guesser-test
John Darrington [Sat, 28 Jul 2012 08:33:44 +0000 (10:33 +0200)]
Fix memory leak in encoding-guesser-test

11 years agoFix memory leak in format-guesser-test.c
John Darrington [Sat, 28 Jul 2012 07:52:46 +0000 (09:52 +0200)]
Fix memory leak in format-guesser-test.c

11 years agoFix memory leak in datasheet-test.c
John Darrington [Sat, 28 Jul 2012 07:52:09 +0000 (09:52 +0200)]
Fix memory leak in datasheet-test.c

11 years agodict_clone: Fix memory leak. 20120728000505/pspp
John Darrington [Fri, 27 Jul 2012 19:59:54 +0000 (21:59 +0200)]
dict_clone: Fix memory leak.

The encoding is already set in dict_create, so this assignment is
redunant and leaks memory.

Reviewed-by: Ben Pfaff.
11 years agodatasehhet.c: Fix memory leak 20120724000504/pspp 20120725000503/pspp 20120726000503/pspp 20120727000502/pspp
John Darrington [Mon, 23 Jul 2012 20:45:57 +0000 (22:45 +0200)]
datasehhet.c: Fix memory leak

11 years agoscan-test.c: Fix memory leak 20120723000505/pspp
John Darrington [Sun, 22 Jul 2012 16:26:06 +0000 (18:26 +0200)]
scan-test.c: Fix memory leak

11 years agoFixed memory leaks coming from file-handle-def.c
John Darrington [Sun, 22 Jul 2012 16:20:36 +0000 (18:20 +0200)]
Fixed memory leaks coming from file-handle-def.c

11 years agovar-type-dialog: Use fmt_date_template() to reduce duplication. 20120718000506/pspp 20120719000503/pspp 20120720000504/pspp 20120721000505/pspp 20120722000503/pspp
Ben Pfaff [Tue, 17 Jul 2012 06:44:52 +0000 (23:44 -0700)]
var-type-dialog: Use fmt_date_template() to reduce duplication.

I believe that it should be possible to merge more code together
later.

11 years agoformat: Make fmt_date_template() human-friendly, respect field width.
Ben Pfaff [Tue, 17 Jul 2012 06:36:30 +0000 (23:36 -0700)]
format: Make fmt_date_template() human-friendly, respect field width.

The strings that fmt_date_template() returned were almost but not
quite the kind of strings that humans expect to see.  For one, they
always used "yy", even though the code uses 4-digit years ("yyyy")
when the field width is sufficient.  Similarly, they never included
seconds (i.e. omitted ":SS").  Finally, FMT_MOYR had an "X" where
one would expect a space.

This commit corrects all of the above issues.  Future commits will
make more use of fmt_date_template().

11 years agovar-type-dialog: Use G_TYPE_INT to store an int.
Ben Pfaff [Tue, 17 Jul 2012 05:28:44 +0000 (22:28 -0700)]
var-type-dialog: Use G_TYPE_INT to store an int.

It seems more straightforward to store an int by value than by
pointer.

11 years agovar-type-dialog: Fix possible memory leaks.
Ben Pfaff [Tue, 17 Jul 2012 05:28:14 +0000 (22:28 -0700)]
var-type-dialog: Fix possible memory leaks.

gtk_tree_model_get_value() documentation says:

    When done with value, g_value_unset() needs to be called to free
    any allocated memory.

but none of the users in this file did that.

11 years agovar-type-dialog: Avoid string copy setting up currency treeview.
Ben Pfaff [Tue, 17 Jul 2012 05:20:42 +0000 (22:20 -0700)]
var-type-dialog: Avoid string copy setting up currency treeview.

The return value of fmt_name() is perfectly suitable here.

11 years agoFixed leak in aggregate dialog 20120717000504/pspp
John Darrington [Mon, 16 Jul 2012 20:02:45 +0000 (22:02 +0200)]
Fixed leak in aggregate dialog

11 years agoPsppireWindow and PsppireDialog: Use correct the parent structures.
John Darrington [Mon, 16 Jul 2012 19:10:40 +0000 (21:10 +0200)]
PsppireWindow and PsppireDialog: Use correct the parent structures.

This change makes the structure declarations agree with the class definition.

11 years agoWorkaround runtime problem in cygwin 20120717001839/pspp 20120718001829/pspp 20120719001858/pspp 20120720001935/pspp 20120721002011/pspp 20120722001859/pspp 20120723001850/pspp 20120724002050/pspp 20120725002030/pspp 20120727001907/pspp 20120728001854/pspp 20120729001853/pspp 20120730001945/pspp 20120731001846/pspp 20120801001829/pspp 20120802002006/pspp 20120803001908/pspp 20120804001850/pspp 20120805001854/pspp 20120806001836/pspp 20120807001852/pspp 20120808001825/pspp 20120809001828/pspp 20120810001910/pspp 20120811001842/pspp 20120813001920/pspp 20120814001913/pspp 20120815001914/pspp 20120816002007/pspp 20120818002007/pspp
John Darrington [Mon, 16 Jul 2012 11:17:48 +0000 (13:17 +0200)]
Workaround runtime problem in cygwin

11 years agoGET DATA: Fix memory leak 20120716000503/pspp
John Darrington [Sun, 15 Jul 2012 12:59:30 +0000 (14:59 +0200)]
GET DATA: Fix memory leak

11 years agoFix memory leak in odt driver
John Darrington [Sun, 15 Jul 2012 12:59:11 +0000 (14:59 +0200)]
Fix memory leak in odt driver

11 years agoFix some of the memory leaks in MEANS
John Darrington [Sun, 15 Jul 2012 09:19:44 +0000 (11:19 +0200)]
Fix some of the memory leaks in MEANS

11 years agoDO REPEAT: Fix memory leak
John Darrington [Sun, 15 Jul 2012 09:09:06 +0000 (11:09 +0200)]
DO REPEAT: Fix memory leak

11 years agotext-data-import-dialog: Convert input lines to UTF-8 upon read. 20120715000502/pspp
Ben Pfaff [Sat, 14 Jul 2012 18:17:59 +0000 (11:17 -0700)]
text-data-import-dialog: Convert input lines to UTF-8 upon read.

Otherwise we can try to display, e.g., ISO 8859-1 with Pango, which
only supports UTF-8, and we get a Gtk-CRITICAL as a result.

Reported by "Alain-F. Nizard" <Alain.Nizard@ac-creteil.fr>
via Jeremy Lavergne <jeremy@lavergne.gotdns.org>.

11 years agou8-istream: Retry read upon EINTR.
Ben Pfaff [Sat, 14 Jul 2012 18:17:07 +0000 (11:17 -0700)]
u8-istream: Retry read upon EINTR.

This seems unlikely to be a problem, since we're normally dealing
with regular files, for which reads are uninterruptible, but it
can't hurt.

11 years agoFixed bug where psppire crashed after selecting custom currency type. 20120715002133/pspp 20120716001851/pspp
John Darrington [Sat, 14 Jul 2012 17:38:46 +0000 (19:38 +0200)]
Fixed bug where psppire crashed after selecting custom currency type.

Reviewed-by: Ben Pfaff
11 years agoData file reader: Avoid crash after failing to open file
John Darrington [Sat, 14 Jul 2012 12:18:08 +0000 (14:18 +0200)]
Data file reader: Avoid crash after failing to open file

11 years agocairo.c (apply_options): Fix potential memory leak
John Darrington [Sat, 14 Jul 2012 11:42:00 +0000 (13:42 +0200)]
cairo.c (apply_options): Fix potential memory leak

This function may be called more than once.  So we need to deallocte the old values before
creating new ones

11 years agoPlug some memory leaks 20120714001927/pspp
John Darrington [Fri, 13 Jul 2012 19:51:57 +0000 (21:51 +0200)]
Plug some memory leaks

11 years agoREADME: Remove sentance about being first release with a GUI 20120714000503/pspp
John Darrington [Fri, 13 Jul 2012 17:06:02 +0000 (19:06 +0200)]
README: Remove sentance about being first release with a GUI

This is no longer true.

11 years agopsppire-button-editable.c: Move dispose to finalize
John Darrington [Fri, 13 Jul 2012 07:28:17 +0000 (09:28 +0200)]
psppire-button-editable.c: Move dispose to finalize

This function is releasing memory, so is inappropriate for dispose

11 years agopsppire-button-editable.c: Added stub for "editing-canceled" property
John Darrington [Fri, 13 Jul 2012 07:10:42 +0000 (09:10 +0200)]
psppire-button-editable.c: Added stub for "editing-canceled" property

We don't use this, but it avoids a GtkCritical saying that we haven't
implemented it.

11 years agovar-type-dialog: Move UI into separate .ui file.
Ben Pfaff [Fri, 13 Jul 2012 06:41:52 +0000 (23:41 -0700)]
var-type-dialog: Move UI into separate .ui file.

Putting the UI for a .c file into its own .ui file seems like a good
practice.  It leads to fewer merge conflicts, for example.

11 years agovar-type-dialog: Avoid static variables.
Ben Pfaff [Fri, 13 Jul 2012 06:32:19 +0000 (23:32 -0700)]
var-type-dialog: Avoid static variables.

I guess these static variables were OK when there was only one
datasheet and therefore only one dialog, but now there can be more
than one of each.

11 years agopsppire-var-sheet: Refresh var sheet when variables change. 20120711001900/pspp 20120712001839/pspp 20120713001847/pspp
Ben Pfaff [Wed, 11 Jul 2012 05:08:25 +0000 (22:08 -0700)]
psppire-var-sheet: Refresh var sheet when variables change.

Otherwise changes made through popup dialogs in the variable sheet
don't necessarily show until the mouse moves across the row that
changed.

Reported by John Darrington.

11 years agoMerge "master" into "psppsheet" to obtain bug fixes from "master".
Ben Pfaff [Wed, 11 Jul 2012 04:48:01 +0000 (21:48 -0700)]
Merge "master" into "psppsheet" to obtain bug fixes from "master".

11 years agoPsppireVarStore: Fix memory leak 20120711000504/pspp 20120712000504/pspp 20120713000505/pspp
John Darrington [Tue, 10 Jul 2012 17:02:47 +0000 (19:02 +0200)]
PsppireVarStore: Fix memory leak

11 years agoPsppireDataEditor: No longer keep a reference to the data window.
John Darrington [Tue, 10 Jul 2012 16:41:31 +0000 (18:41 +0200)]
PsppireDataEditor: No longer keep a reference to the data window.

11 years agopsppire-window-base: Avoid memory leak in get_window_id(). 20120710000508/pspp
Ben Pfaff [Tue, 10 Jul 2012 04:54:39 +0000 (21:54 -0700)]
psppire-window-base: Avoid memory leak in get_window_id().

g_object_get() returns a string copy, so the caller has to free it,
but gtk_widget_get_name() gets the same string without a copy.

Found by valgrind.

11 years agopsppire-data-window: Destroy dataset from finalize.
Ben Pfaff [Tue, 10 Jul 2012 04:47:02 +0000 (21:47 -0700)]
psppire-data-window: Destroy dataset from finalize.

One rule of thumb for "destroy" is that it should just unref
GObjects.  This commit fixes that up for
psppire_data_window_dispose().  Previously, this could not be done
because of a reference leak in psppire_data_window_finish_init()
that caused doing the dataset destroy in finalize to crash, but
that problem was fixed in the previous commit.

11 years agopsppire-data-window: Avoid reference leak to PsppireDict.
Ben Pfaff [Tue, 10 Jul 2012 04:36:31 +0000 (21:36 -0700)]
psppire-data-window: Avoid reference leak to PsppireDict.

psppire_var_store_new() takes its own reference to PsppireDict so
the original reference owned by psppire_data_window_finish_init()
wasn't getting tracked anywhere.

11 years agoFixed memory leak in cairo driver.
John Darrington [Mon, 9 Jul 2012 20:44:13 +0000 (22:44 +0200)]
Fixed memory leak in cairo driver.

11 years agopsppire-data-editor: Unref old data_window upon change. 20120709000503/pspp
Ben Pfaff [Mon, 9 Jul 2012 06:27:52 +0000 (23:27 -0700)]
psppire-data-editor: Unref old data_window upon change.

Otherwise there's a reference leak.

Found by inspection; I haven't looked for clients that actually
change the data window after setting it.

11 years agopsppire-data-window: Delete dataset when closing window.
Ben Pfaff [Sun, 8 Jul 2012 06:44:37 +0000 (23:44 -0700)]
psppire-data-window: Delete dataset when closing window.

When the user closes the window it means that he wants to close the
underlying dataset also.  Otherwise the dataset essentially leaks
(in theory it's still there in the list of datasets but in practice
that takes a DATASET ACTIVATE <name> WINDOW=FRONT command to show
it).

This also fixes a Gtk-CRITICAL and following crash in the following
scenario brought up by John Darrington:
1. Start psppire
2. File | Open and load x.sav (dataset1)
3. File | New | Data (a new data window will appear: dataset2)
4. Using the window manager close the window for dataset1
5. In dataset2:  File | Open and load x.sav

I'm not 100% certain of the reason that this fixes it but I think
that there's some lingering association between the dataset and the
window that this change eliminates, by eliminating the dataset along
with the window.

The code added to psppire_data_window_dispose() in this commit
should probably go in a "finalize" function instead but there seems
to be a separate problem with references to PsppireVarSheet such
that if this new code is in "finalize" then dataset_destroy() will
call dict_clear() which will invoke the callbacks for PsppireDict
which will try to access the destroyed window.  On the other hand,
with this code in "dispose" the window isn't fully destroyed yet so
while the same code path gets followed it isn't fatal.

11 years agopsppire-var-store: Chain up to correct parent method from "dispose".
Ben Pfaff [Mon, 9 Jul 2012 06:04:49 +0000 (23:04 -0700)]
psppire-var-store: Chain up to correct parent method from "dispose".

I'm pretty sure that "dispose" should not chain up to "finalize".

11 years agoMerge "master" into "psppsheet" to obtain bug fixes from "master". 20120709001830/pspp 20120710001843/pspp
Ben Pfaff [Mon, 9 Jul 2012 05:18:20 +0000 (22:18 -0700)]
Merge "master" into "psppsheet" to obtain bug fixes from "master".

11 years agopsppire-dict: Make PsppireDict not own its "struct dictionary".
Ben Pfaff [Sat, 7 Jul 2012 20:00:19 +0000 (13:00 -0700)]
psppire-dict: Make PsppireDict not own its "struct dictionary".

I see two places where PsppireDict are created.  The first is in
psppire-data-window.c.  In this case, the PsppireDataWindow is
borrowing a dictionary owned by a "struct dataset" for use in its
PsppireDict.  When it destroys the PsppireDict, therefore, the
dictionary must not be destroyed because the dataset still owns it.
However, this is not what actually happens, and doing the
following:

1. Start psppire
2. File | Open and load x.sav (dataset1)
3. File | New | Data (a new data window will appear: dataset2)
4. Using the window manager close the window for dataset1
5. In dataset2:  File | Open and load x.sav

or similar will cause a use-after-free error.

The second use is in text-data-import-dialog.c.  This code does own
the struct dictionary, but it can simply free it itself at the same
time as the PsppireDict.

There is still some underlying issue with the above scenario,
because it still reports a GtkCritical, but valgrind no longer
reports a use-after-free error.

Reported by John Darrington.

11 years agogui: Fix Glib-GObject-WARNING when closing the active dataset.
Ben Pfaff [Mon, 9 Jul 2012 05:12:49 +0000 (22:12 -0700)]
gui: Fix Glib-GObject-WARNING when closing the active dataset.

The DATASET CLOSE command, when it acts on the active dataset, just
removes the active dataset's name, changing it to the empty string.
(This is the documented behavior.)  However, the GUI relies on
every dataset having a name, so this caused the following warning:

GLib-GObject-WARNING **: value """" of type `gchararray' is invalid
or out of range for property `id' of type `gchararray'

This commit fixes the problem by giving any unnamed dataset a name
after running syntax.

11 years agoFix compiler warnings
John Darrington [Sun, 8 Jul 2012 10:39:12 +0000 (12:39 +0200)]
Fix compiler warnings

11 years agoPsppireDataEditor: Add comment emphasising lack of final unref of old_vbox_widget
John Darrington [Sun, 8 Jul 2012 10:25:26 +0000 (12:25 +0200)]
PsppireDataEditor: Add comment emphasising lack of final unref of old_vbox_widget

11 years agoPsppSheetView unrealize: Call parent method before any other operation
John Darrington [Sat, 7 Jul 2012 07:39:21 +0000 (09:39 +0200)]
PsppSheetView unrealize: Call parent method before any other operation

If this is not done, then gtk_widget_get_realized returns true, during
the unrealize execution, leading to mutual recursion.

11 years agoDelete module customentry
John Darrington [Sat, 7 Jul 2012 07:34:18 +0000 (09:34 +0200)]
Delete module customentry

This is no longer used, so am removing it completely.

11 years agoPsppireDataWindow: Deal with ui_manager in dispose routine
John Darrington [Sat, 7 Jul 2012 07:30:17 +0000 (09:30 +0200)]
PsppireDataWindow: Deal with ui_manager in dispose routine

11 years agoPsppSheetView resize handler: Do nothing if the widget is not realized
John Darrington [Sat, 7 Jul 2012 05:14:53 +0000 (07:14 +0200)]
PsppSheetView resize handler:  Do nothing if the widget is not realized

This seems to avoid the occasional GtkCritical that I get.

11 years agoReduce the flicker when redrawing the toolbar and menubar.
John Darrington [Thu, 5 Jul 2012 21:17:48 +0000 (23:17 +0200)]
Reduce the flicker when redrawing the toolbar and menubar.

11 years agopspp-sheet-view.c: Separate destroy method into finalize and dispose.
John Darrington [Thu, 5 Jul 2012 19:53:17 +0000 (21:53 +0200)]
pspp-sheet-view.c: Separate destroy method into finalize and dispose.

This still needs work to disentangle them completely, but I think this
is an improvement.

11 years agoPsppireDataStore: Move datasheet_destroy from dispose to finalize
John Darrington [Thu, 5 Jul 2012 18:33:58 +0000 (20:33 +0200)]
PsppireDataStore: Move datasheet_destroy from dispose to finalize

This actually destroys stuff, not merely unreffing.  So it belongs in finalize.

11 years agoPsppireVarSheet: Keep reference to the return value of _get_ui_manager
John Darrington [Thu, 5 Jul 2012 17:55:52 +0000 (19:55 +0200)]
PsppireVarSheet: Keep reference to the return value of _get_ui_manager

I changed the var_sheett to keep a reference to the uim object which it
returns from the _get_ui_manager objects.  This avoids a problem where
the object was getting its last reference unreffed by another object.

11 years agoPsppireVarSheet: Replace Destroy with Dispose
John Darrington [Thu, 5 Jul 2012 17:36:08 +0000 (19:36 +0200)]
PsppireVarSheet: Replace Destroy with Dispose

Also, use a statically allocated array for signal handler ids, since
it just complicates things to have a dynamically allocated one.

11 years agoPsppireCellRendererButton: Replace destroy with dispose
John Darrington [Thu, 5 Jul 2012 17:03:08 +0000 (19:03 +0200)]
PsppireCellRendererButton: Replace destroy with dispose

The destroy method did nothing except drop references, so was
appropriate for dispose.

11 years agoPsppireDataSheet: Reference handler improvements.
John Darrington [Thu, 5 Jul 2012 16:46:33 +0000 (18:46 +0200)]
PsppireDataSheet: Reference handler improvements.

Changed the destroy method to dispose, because all it does is drop
references.  Also, keep a reference to the object returned by _get_ui_manager
since this seems to be causing issues elsewhere.

11 years agopsppire-data-editor: Avoid ' modifier with g_string_append_printf(). 20120708001829/pspp
Ben Pfaff [Sat, 7 Jul 2012 18:39:47 +0000 (11:39 -0700)]
psppire-data-editor: Avoid ' modifier with g_string_append_printf().

On Windows, g_string_append_printf() does not understand the '
modifier, so use ds_put_format() instead, which does.

Reported by John Darrington.

11 years agopo: Update Slovenian translation from translationproject.org. 20120708000503/pspp
Ben Pfaff [Sat, 7 Jul 2012 17:28:47 +0000 (10:28 -0700)]
po: Update Slovenian translation from translationproject.org.

11 years agoFixed crash in two sample npar tests with (paired)
John Darrington [Fri, 6 Jul 2012 14:30:14 +0000 (16:30 +0200)]
Fixed crash in two sample npar tests with (paired)

This change fixes a bug where an assertion would
fire if a two sample npar test was given where
a variable appeared twice in a variable list.

11 years agoDocumentation: correct punctuation and grammar
John Darrington [Wed, 4 Jul 2012 20:28:25 +0000 (22:28 +0200)]
Documentation: correct punctuation and grammar

11 years agoUse text_aa instead of solid black for sheet grid lines. 20120704001842/pspp 20120705001852/pspp 20120706001843/pspp
John Darrington [Tue, 3 Jul 2012 17:52:39 +0000 (19:52 +0200)]
Use text_aa instead of solid black for sheet grid lines.

Use the widget's text_aa graphics context instead of black_gc to give a softer
appearance (and to ensure they are visible for themes which use black as their
background).

12 years agoNew Slovenian localisation from http://translationproject.org 20120702000514/pspp 20120703000504/pspp 20120704000504/pspp 20120705000505/pspp 20120706000503/pspp
John Darrington [Sun, 1 Jul 2012 11:25:31 +0000 (13:25 +0200)]
New Slovenian localisation from  translationproject.org

Updated po/sl.po from http://translationproject.org/latest/pspp/sl.po

12 years agopsppire-var-store: Remove. 20120625204929/pspp 20120626001903/pspp 20120627001918/pspp 20120628001950/pspp 20120629001900/pspp 20120630002026/pspp 20120701001910/pspp 20120702001907/pspp 20120703001900/pspp
Ben Pfaff [Tue, 27 Mar 2012 06:21:28 +0000 (23:21 -0700)]
psppire-var-store: Remove.

PsppireVarStore used to provide a model to allow GtkSheet to display
a dictionary.  Now, it is just a superfluous wrapper for
PsppireDict, so this commit removes it in favor of using PsppireDict
directly.

12 years agogoto-case-dialog: Avoid gtk critical for invalid case number.
Ben Pfaff [Fri, 23 Mar 2012 05:04:38 +0000 (22:04 -0700)]
goto-case-dialog: Avoid gtk critical for invalid case number.

I noticed this when Go To Case was invoked with an empty data
sheet, in which case the default case number is the invalid case
number 0.

12 years agogui: Speed up initial file load with many columns
Ben Pfaff [Sat, 12 Nov 2011 23:06:23 +0000 (15:06 -0800)]
gui: Speed up initial file load with many columns

This makes a huge difference in startup time when there are hundreds of
columns, by setting up the data sheet before showing the window that
contains it.

Files opened from File|Open were already opened this way.  I was a little
surprised that File|Open was so much faster than specifying a file on the
command line until I figured out the difference.

12 years agogtk-contrib: Remove GtkSheet-derived PsppireSheet.
Ben Pfaff [Tue, 20 Mar 2012 04:41:35 +0000 (21:41 -0700)]
gtk-contrib: Remove GtkSheet-derived PsppireSheet.

This code is no longer used.

12 years agogui: Redo var sheet, data sheet, text import with PsppSheetView.
Ben Pfaff [Tue, 24 Apr 2012 05:27:54 +0000 (22:27 -0700)]
gui: Redo var sheet, data sheet, text import with PsppSheetView.

This commit replaces the existing variable and data sheets in the
GUI by new ones based on PsppSheetView.

Thanks to John Darrington and Michel Boaventura for helpful testing,
bug reports and suggestions.

12 years agoReadme.Git: Update gnulib SHA to include fixes for windows tempfile issues 20120621000503/pspp 20120622000503/pspp 20120623000503/pspp 20120624000504/pspp 20120625000504/pspp 20120625203456/pspp 20120626000502/pspp 20120627000503/pspp 20120628000505/pspp 20120629000503/pspp 20120630000506/pspp 20120701000504/pspp
John Darrington [Wed, 20 Jun 2012 21:54:32 +0000 (23:54 +0200)]
Readme.Git: Update gnulib SHA to include fixes for windows tempfile issues

12 years agotext-data-import-dialog: Allow user to choose input encoding.
Ben Pfaff [Wed, 20 Jun 2012 06:09:25 +0000 (23:09 -0700)]
text-data-import-dialog: Allow user to choose input encoding.

Otherwise only automatically detected encodings can be used.

Debian bug #676371.
Reported-by: Gunther Furtado <gunfurtado@gmail.com>