Commit Graph
100 Commits
Author SHA1 Message Date
John Ralls 26b82b56e0 Fix Travis 'dangling else' warning. 2017-12-27 06:32:54 -08:00
John Ralls 8ae330c804 Another attempt to make Travis's g++ happy about compiler warnings. 2017-12-26 21:38:59 -08:00
John Ralls 44fc5b0555 Fix CXX Flags for g++. 2017-12-26 18:23:09 -08:00
John Ralls bbd2df6a3b Bug 791848 - GC 2.6.x does not handle ISO dates introduced with GC 2.7.
Set a feature to prevent versions older that 2.6.20 from loading a
database from which they cannot read the dates. Ideally we would do this
only if the database is written to, but the current persistence design
includes committing back to the database during the load so the net
effect is that the flag would be set anyway.
2017-12-26 15:18:43 -08:00
John Ralls 91727525b9 Enforce -Werror on C++ files and fix resulting errors. 2017-12-26 15:18:43 -08:00
John Ralls a6a46d7cdc Test struct tm* returns from gnc_gmtime and gnc_localtime
To ensure that we don't crash for dereffing a nullptr.
2017-12-26 15:10:05 -08:00
John Ralls a17bc85a02 Enable reading undelimited YYYYMMDDHHMMSS time strings.
For backwards compatibility with 2.4 and 2.6 SQLite3 databases.
2017-12-23 15:40:21 -08:00
John Ralls 19412de221 Fix use of guile function introduced in 2.0.10, not available in Ubuntu14.04.
Also generalize KVP type detection so that signed and unsigned values\nare appropriately converted.
2017-12-22 11:25:19 -08:00
John Ralls 6e9025d2f9 Don't build borrowed/gwengui-gtk3 if its provided by gwenhywfar. 2017-12-22 10:26:31 -08:00
John Ralls e0300d3a62 Replace the gnc:numeric pair with normal Scheme rationals.
This allows direct conversion between Scheme numbers and gnc_numeric
without the performance or accuracy penalties arising from using doubles
as an intermediary.
2017-12-21 15:33:15 -08:00
John Ralls 7061803596 Remove SIGFIG rounding from price calculation.
Prices shouldn't be rounded except for display.
2017-12-21 15:33:15 -08:00
John Ralls 7c57ad18cd Fix date offset error in datetime test. 2017-12-19 14:34:10 -08:00
John Ralls baad2097a7 Add tests for GMT and GMT+7 timezones. 2017-12-18 10:15:05 -08:00
John Ralls 5af21dfad8 Fix timezone constructor crash when zone file has no transitions. 2017-12-18 09:48:17 -08:00
John Ralls 0026b10851 Merge branch 'maint' into unstable 2017-12-17 13:00:00 -08:00
John Ralls c1b5e6c8df Release 2.6.19 2017-12-16 15:28:56 -08:00
John Ralls 70fe66c9fd Fix python tests when building from tarball. 2017-12-16 15:11:14 -08:00
John Ralls 5da9e2f4c9 Update Dutch and Serbian translations from the Translation project. 2017-12-16 11:28:24 -08:00
John Ralls 8efc0e7bdc Merge Rob Gowin's Partial Fix for Bug 787497 into maint. 2017-12-16 10:54:03 -08:00
John Ralls 51fab91ffe Add test-flat-bayes to autotools build. 2017-12-16 10:38:07 -08:00
John Ralls 4ce47b898d Add minimum version to feature and fix copy-paste error in test-flat-bayes.
As recommended by Geert Janssens.
2017-12-16 10:35:07 -08:00
John Ralls e1d3385428 Handle mid-pacific timezones in date-sensitive tests. 2017-12-15 10:13:41 -08:00
John Ralls ac0d335c4f Revert post-construction adjustment of ldt for DST.
It was incorrect.\nMake corresponding adjustment to far eastern offset in neutral time adjustment.
2017-12-15 10:12:01 -08:00
John Ralls a5134f91e1 Fix neutral time for consistent dates in mid-pacific time zones.
Echoes a change made some time ago in 2.6 where the time is adjusted from 10:59Z in time zones where that won't be the same date.
2017-12-12 21:02:11 -08:00
John Ralls aeb2e65ff1 Fix posted-date scrub incrementing the day in central pacific timezones. 2017-12-12 21:02:11 -08:00
John Ralls 1c8c53a861 Remove (unused because of an error) parse-to-tm string timespec construction. 2017-12-12 21:02:11 -08:00
John Ralls 6db0820771 Fix offset handling in GncDateTime struct tm ctor, gnc_mktime, & gnc_timegm.
Tests now pass in all TZa from Honolulu to New Zealand.
2017-12-12 21:02:11 -08:00
John Ralls 9dc66c0b7d Fix the Mac install_name_dir to point at CMAKE_INSTALL_FULL_LIBDIR.
Instead of CMAKE_INSTALL_LIBDIR; it needs to be an absolute path.
2017-12-10 13:01:32 -08:00
John Ralls c0659c8e2b Bug 791422 - gnucash 2.7 no longer opens sqlite3...
as it doesn't load proper backend.
The cause was that the libdbi-driver path in CMakeLists.txt was wrong
and GNC_DBD_DIR was being set unconditionally in etc/gnucash/environment
with an invalid path.
2017-12-10 12:51:24 -08:00
John Ralls ec9f60d3fd Test more thoroughly gnc-timezone's parsing of the zoneinfo database.
Then fix the resulting problems.
2017-12-09 15:37:16 -08:00
John Ralls 66817bb997 Rework directory determination in CMake builds.
Sets paths for finding componenents depending on the state of ENABLE_BINRELOC,
GNC_UNINSTALLED, GNC_BUILDDIR and whether any install paths have been set
outside of CMAKE_INSTALL_PREFIX.

GNUInstallDirs changes the name of CMAKE_INSTALL_LIBDIR depending on the
operating system and distro. When CMAKE_INSTALL_PREFIX is /usr,
/usr/local, or any subdirectory of /opt it also changes
CMAKE_INSTALL_FULL_SYSCONFDIR to /etc. An earlier commit by Aaron Laws
mirrors the name of CMAKE_INSTALL_LIBDIR to the build library directory.

It's possible for builders to set any of the install directories
anywhere they please.

Setting any directory outside of CMAKE_INSTALL_PREFIX breaks Binreloc so
the toplevel CMakeLists.txt now detects that and disables Binreloc.

If Binreloc is enabled then all path queries use it to find paths. This
works in the build directory because the gnucash executable and all of
the test programs are in build_directory/bin and LIBDIR, DATADIR, and
SYSCONFDIR can be found in the same root path.

If Binreloc is disabled then in order to build or run programs from the
build directory one must set GNC_UNINSTALLED and set GNC_BUILDDIR to the
absolute path of the build directory. When those are set GNC_BUILDDIR
replaces CMAKE_INSTALL_PREFIX in all paths that are subdirectories of
CMAKE_INSTALL_PREFIX; paths that are not in CMAKE_INSTALL_PREFIX are
appended whole to GNC_BUILDDIR. This process is constent between CMake
and gnc_path_get_foo. GnuCash is unlikely to run from a DESTDIR without
Binreloc.
2017-12-05 17:25:52 -08:00
John Ralls 84929c8e5b One more stray header in libexec. 2017-12-02 10:34:07 -08:00
John Ralls ad11afefb4 LIBDIR is not lib--two more CMakeLists.txt. 2017-12-01 20:31:44 -08:00
John Ralls e319a16747 Remove gnucash/test.
The only purpose of which was to test overrides/gnucash-env.
2017-12-01 20:10:55 -08:00
John Ralls fcb4bdac9e Some fixes to complete removing gnucash/overrides. 2017-12-01 19:46:09 -08:00
John Ralls 2be5642a7d Fix autotools build after removing gnucash/overrides. 2017-12-01 15:25:28 -08:00
John Ralls 0a8e50069c Remove overrides directory as being obsolete.
Also don't install qof test headers to libexec.
2017-12-01 13:56:52 -08:00
John Ralls 9b0a8723a4 More GNUInstallDirs path fixes. 2017-12-01 13:56:52 -08:00
John Ralls a120c48fb1 Fix the fixed path to compiled guile files. 2017-12-01 08:59:51 -08:00
John Ralls 062851a8fe Fix path to compiled guile files in environment.in.
Thanks to Rob Gowin for the catch.
2017-11-30 20:15:54 -08:00
John Ralls 4a84fca9b1 Add GLIB_CFLAGS and srcdir to SWIG includes. 2017-11-30 13:32:57 -08:00
John Ralls 5ca129d82d Remove unset variable SWIG_ARGS from Makefile.am 2017-11-30 13:31:23 -08:00
John Ralls 41656c920e Fix python test failure on Travis.
It seems that there are two possible exceptions depending on OS.
2017-11-28 17:57:00 -08:00
John Ralls c6ae007bda Merge branch 'PyGncNumeric' into unstable 2017-11-28 17:09:38 -08:00
John Ralls 5aa048e01d Fix null pointer dereference segfault.
Reported via PR 21y by github user ethaden.
This is a simpler fix than the one in the PR.
2017-11-28 15:39:41 -08:00
John Ralls a5bf4e00a4 Merge Aaron Laws's 'unneeded-build-flag' into unstable 2017-11-28 15:16:36 -08:00
John Ralls 5204100d53 Use GNUInstallDirs in CMake Builds
Provides correct file layout when building distribution tarballs.
Fixes Bugs 790840 and 790841.
2017-11-28 14:25:35 -08:00
John Ralls e92a1b3723 Fix python tests in tarball builds. 2017-11-28 14:25:24 -08:00
John Ralls 831640b546 Remove common/test-core/unittest_support.py from git.
It's a SWIG-generated file accidentally added during directory
rearrangement.
2017-11-28 09:53:06 -08:00
John Ralls 0afef080a7 Release 2.7.2 2017-11-25 16:35:44 -08:00
John Ralls 13657ee1bb Merge branch 'maint' into unstable 2017-11-25 15:35:24 -08:00
John Ralls 50874d89da Correct GUILE_LOAD_COMPILE_PATH to include Guile's own modules as well as ours. 2017-11-25 14:55:03 -08:00
John Ralls d8c2f52447 Correct quoting for SQL backends.
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.
2017-11-25 14:46:31 -08:00
John Ralls 9c4635e393 Bug 784623 - GNUCash does not work with sql backend.
Wherin the problem is that MySQL's TIMESTAMP has a date range of
1970-01-01 00:00:01 to 2038-01-19 03:14:07 and is unable to handle
time_t of 0. MySQL's TIMESTAMP also assumes that input is in the server's
timezone and adjusts it to UTC. GnuCash has already done that conversion.
2017-11-23 11:41:09 -08:00
John Ralls 937f8c5083 Set GncSqlObjectBackend::m_version to the appropriate TABLE_VERSION.
For each subclass, getting rid of GNC_SQL_OBJECT_BACKEND_VERSION which
was a bit misguided.

Also remove the bogus test the skipped loading a table if its version
didn't match GNC_SQL_OBJECT_BACKEND_VERSION which was even more misguided.
2017-11-21 18:15:37 -08:00
John Ralls 1674eb0bd4 Fix python build and test errors on Mac. 2017-11-21 13:30:17 -08:00
John Ralls d44f6bc9d5 Fix missing/misspelled files for distribution.
Mostly errors from 6c01e54.
2017-11-19 17:32:12 -08:00
John Ralls 961cb5a829 Bug 790550 - FTBFS: missing __init__.py 2017-11-19 17:32:12 -08:00
John Ralls d648b29d0d Fix distribution paths for resource files.
glib-compile-resources lists the resource files as absolute paths,
but SET_LOCAL_DIST expects relative paths; the result was that the
tarball code was looking for ${CMAKE_SOURCE_DIR}/${CMAKE_CURRENT_SOURCE_DIR}/foo.
This change strips off ${CMAKE_CURRENT_SOURCE_DIR} from the filenames
before passing them to SET_LOCAL_DIST.
2017-11-19 17:32:12 -08:00
John Ralls 9444c1e300 Fix bad string construction in adjust_sql_options. 2017-11-19 17:32:12 -08:00
John Ralls af1bc45021 A better way to handle MySQL's 0000-00-00 invalid date indicator. 2017-11-19 11:41:08 -08:00
John Ralls 23f25d74d9 Don't try to unref a NULL GDateTime*. 2017-11-19 11:41:08 -08:00
John Ralls 61316648b8 Bug 789608 - Compilation problems when linking libraries.
Fix using a preproc macro in a different file from where it was declared
and more-strict template resolution of error_handler<> by gcc-7.x.
2017-11-09 13:47:08 -08:00
John Ralls 1895ae280c Merge branch 'maint' into unstable 2017-11-09 13:45:45 -08:00
John Ralls f888eb88f0 Fix with_Python build in cmake. 2017-11-09 11:22:02 -08:00
John Ralls 45bab93613 Bug 789928 - FTBFS with libdbi 0.9.0-5 on Debian
Commit 88b8477 on libdbi calls the error handler if one attempts to run
off the end of a result set. Since we often loop on
dbi_result_next_row() returning 0 this breaks our logic in several
places. This change simply returns from the error handler on a
DB_ERROR_BADIDX allowing the logic to work as before.
2017-11-07 18:06:04 -08:00
John Ralls f9d5436adc Merge J. Marino's 'fix-negative-colors' into unstable. 2017-11-07 15:47:57 -08:00
John Ralls 6c01e54042 Convert shell-executed scheme tests to run directly from Guile.
I.e., remove the shell invocation and with it the need to set the shebang.

Surprisingly this required some build-system modifications particularly
for cmake in order to correctly set the environment.
2017-11-07 15:04:16 -08:00
John Ralls f412795ef2 Remove extraneous parameters from GNC_ADD_SCHEME_TARGETS 2017-11-07 15:04:16 -08:00
John Ralls 4f9716362c Merge branch J. Marino's fix-report-colors into unstable 2017-10-31 17:31:33 -07:00
John Ralls a6f4ea65e9 Merge J. Marino's 'fix/report-net-barchart' into unstable 2017-10-31 17:24:44 -07:00
John Ralls a840748409 [Gwenhywfar] Use the new getpassword API only on the gwen5 branch. 2017-10-31 14:31:00 -07:00
John Ralls be44db2ef8 Provide for report/report-system/test/test-extras to be built before other tests. 2017-10-31 12:06:02 -07:00
John Ralls cbd8764780 Ensure that report unit tests dependencies are built with target. 2017-10-31 10:59:12 -07:00
John Ralls 039dda5294 Merge J. Marino's cashflow-barchart updates into unstable. 2017-10-31 10:20:50 -07:00
John Ralls 49c70795c3 Remove X11 error handler
And with it the only direct X11 dependency.
2017-10-31 08:53:20 -07:00
John Ralls 9669bd6b6c Release 2.7.1 2017-10-29 14:01:15 -07:00
John Ralls 09bcb515a1 Set relative path to icon file in Windows resource script.
No idea why this is necessary for tarball builds, but it is.
Also update the copyright date in the same file.
2017-10-29 13:59:51 -07:00
John Ralls e959822817 Don't copy ChangeLog on a tarball build.
There's no reason to and besides it breaks in-source builds
because trying to copy onto itself raises an error.
2017-10-28 14:21:39 -07:00
John Ralls b92a41b608 Pass a NULL parent to gnc_options_dialog_new_modal in assistant-hierarchy.
In this case the dialog isn't a dialog, it's a notebook page, so it
doesn't need to have a parent at creation.
2017-10-28 09:56:58 -07:00
John Ralls d22b098dff Set a parent window for the options dialogs.
So they pop up centered on the GnuCash window instead of
on the wrong monitor.
2017-10-27 16:23:02 -07:00
John Ralls 5157d8b50a Merge branch Christopher Lam's Transaction Report Improvements into unstable. 2017-10-27 12:06:52 -07:00
John Ralls e64e73b655 Merge branch J. Marino's cashflow-barchart report into unstable. 2017-10-27 11:31:46 -07:00
John Ralls 115c0bf4a4 Merge Aaron Law's branch 'buildfix' to unstable. 2017-10-27 10:13:06 -07:00
John Ralls 04642fc42a [SQL] Check return of string_to_guid, bail if false. 2017-10-27 09:46:47 -07:00
John Ralls d17c24b770 Bug 789298 - Prompt for file history update leads to crash during startup. 2017-10-27 09:46:47 -07:00
John Ralls 77ab04100c Bug 789297 - Account Tax Related Information - 2.7.0 is not backwards compatible 2017-10-26 16:23:44 -07:00
John Ralls 82dec9a231 Fix NEWS errors reported by Chris Lam 2017-10-26 15:51:18 -07:00
John Ralls 4be826055a Revert "Partial fix to exception crashes on Windows."
This reverts commit 4746054635.
a300384 is the correct fix for this problem.
2017-10-26 13:08:36 -07:00
John Ralls a300304354 Fix Windows crash-on-throw.
Thanks to https://stackoverflow.com/questions/46688200/mixing-c-and-c-causing-exceptions-to-terminate
2017-10-26 12:38:50 -07:00
John Ralls 4746054635 Partial fix to exception crashes on Windows.
There seems to be more than one problem that causes the exception handler ("catch") to
get lost on Windows:
* Throwing from a constructor called from a member function of another object of the same
class. That's fixed here for the GncNumeric string constructor, but there's at least one other
instance I'm still working on in GncNumeric::to_decimal.
* Hidden memory allocation in a stack-allocated object like std::string, std::istringstream,
or boost::smatch: The throw causes the object to go out of scope which calls its destructor
and in that case the catch reference is either lost or never compiled in.

This change ifdefs out the creation of detailed exception messages on Windows to avoid
the destruction of the std::istringstream and its attached std::string, creates a series of
helper functions to ensure that the boost::smatch is in a non-throwing scope, and puts the
computed values directly into the member variables instead of delegating the construction
to a temporary and then copying out the values. The last item is more correct anyway, as
C++ constructor delegation is supposed to happen in the member initialization part rather
than the function body.
With these changes the exceptions from the GncNumeric string constructor are handled
correctly.
2017-10-26 11:33:50 -07:00
John Ralls 70a37a24ae Don't build design docs on Windows.
To avoid requiring texinfo.
2017-10-22 11:51:48 -07:00
John Ralls 7b44e280e8 Add fixed bugs for 2.7.0 to NEWS. 2017-10-20 15:37:06 -07:00
John Ralls e8e43b33d6 Merge branch 'unstable' 2017-10-17 18:34:48 -07:00
John Ralls 5e7c2106ec Re-release 2.7.0 2017-10-17 09:32:03 -07:00
John Ralls b6d3c0e581 Disable inclusion of transaction text for OFX transactions in the description.
OFX puts rather useless information in the transaction text that makes
the description overly long with the important part at the end.
2017-10-16 14:28:43 -07:00
John Ralls 25e3b22a4a Use file:/// when constructing a tempdir uri on Windows.
g_get_temp_dir doesn't provide the leading /.
2017-10-16 14:27:15 -07:00
John Ralls 99a2888868 Merge branch 'unstable-fix-spelling' of https://github.com/christopherlam/gnucash into unstable 2017-10-16 12:04:17 -07:00
John Ralls 2184cb347a Install libgwengui-gtk3.dll on Windows. 2017-10-16 11:22:55 -07:00
John Ralls 91a2ee4525 [MacOS] Change CMake installed names to absolute paths from @rpath/...
gtk-mac-bundler can't access the executable's rpath list so it can't
follow dependencies if they're not in $install_dir/lib from @rpath.
Autotools always sets absolute path install names so this should have no
adverse affects on other Mac builds.
2017-10-15 13:22:29 -07:00