To cover all combinations we need to test across the combo's and also
the table entries when appropriate columns are set. Also need to force
a reparse if any of the options change.
Use commodity print name to show in the combo's and use a hidden field
to sort the list grouping by namespace. Also alter the way these
settings are saved.
Added a setting type to distinguish between TRANS and PRICE settings so
it can load a specific settings type and added the price save and load
options.
These changes are to align with the changes to column types and also the
basic setup of the new commodity from and currency to combo's. More
changes will follow to make the saving and loading work properly.
Added two combo's to allow user to specify a Commodity from and Currency
to for the whole file. Also reduced the property types to four and
aligned all the commodity and currency variables.
WITH_OFX, WITH_SQL and WITH_AQBANKING handling is fixed. The
dist files for these features are always included in the dist
tarball.
I added code for WITH_GNUCASH=OFF to error out when trying to
create a dist tarball. Not fully tested because WITH_GNUCASH=OFF
itself does not build.
Still need to backport fixes from unstable for WITH_PYTHON=OFF.
Where possible in the Python SWIG code use the builtin SWIG conversion
code over custom code. This ensures appropriate overflow/type checking.
With this I have enabled GncNumeric from longs and tested for correct
overflow handling.
Note: This could be extended to GUILE but I am not familiar enought to
safely enable this.
At current the Python GncNumeric has issues with type conversion eg.
* GncNumeric(1.3) = 1.00
* GncNumeric("1.3") is OK but any future methods error
This behaviour was relied on for the Account tests to pass as it used
GncNumeric(0.5) == GncNumeric(1.0) but this is not what many users would
expect.
This fix alows GncNumeric to be constructed from a (int, int)
numerator/denominator pair or int/float/str where double_to_gnc_numeric
and string_to_gnc_numeric from C is used.
Only string values should be quoted in queries; in particular NULL
isn't a string value and must not be quoted.
Note that this is a less than perfect solution because it doesn't use
the Database's quoting function and so doesn't escape quotes, linefeeds,
or carriage returns inside the string. That's because the SQL generating
logic is independent of the connection class and can't easily get to it.