Commit Graph

1435 Commits

Author SHA1 Message Date
Geert Janssens
e3cd9f88c9 Merge branch 'unstable-TR-progress' of https://github.com/christopherlam/gnucash into unstable 2018-02-17 23:22:23 +01:00
Geert Janssens
07c3162a73 Fix a few leftovers from work on main.scm
- Load proper file in gnucash-bin.c
- Load string.scm (now in gnucash subdir) to make reports and qif-import work again
2018-02-17 21:09:07 +01:00
Geert Janssens
de4b72dc11 Drop install rule for previously removed (scm) config file 2018-02-17 20:09:36 +01:00
Christopher Lam
b261eb18b3 Revert options.scm lookup-options renaming
and use (gnc:error) as advised
2018-02-17 08:17:01 +08:00
Christopher Lam
276a7d24d2 REWRITE income-gst-statement.scm
This commit rewrites income-gst-statement.scm to be a derivation
of transaction.scm, modifying the options database and passing
custom arguments to the trep-renderer.

This should hopefully reduce risk of errors.
2018-02-17 08:17:01 +08:00
Christopher Lam
88b3446299 ADD-API: gnc:option-make-internal!, gnc:unregister-option
This commit adds 2 additional helper calls, primarily useful for
derived reports.

gnc:option-make-internal! will hide an existing option. e.g.
a derived report can set the value for a Display/* option and
hide it from the user.

gnc:unregister-option will unregister option. This is primarily
useful for derived options e.g. another report copies from
transaction.scm and removes some options and recreates them with
different parameters.

For example, unregister existing option from section "Accounts"
name "Accounts", and recreate with different parameters e.g.
limited account types.
2018-02-17 08:16:23 +08:00
Christopher Lam
12f3099f59 (infobox)->(gnc:render-options-changed) in options.scm
This commit will change (infobox) to a general-purpose
renderer for "all options changed by user" in options.scm
and can be inserted into any report. It reduces the
number of strings required.
2018-02-17 08:16:23 +08:00
John Ralls
cd8f2b7c7e Rename libgnucash/scm/main.scm to utilities.scm
Because it hasn't been "main" since GnuCash became a C program.
2018-02-16 15:52:19 -08:00
John Ralls
32f6958ebb We're done modularizing. About 16 years ago. 2018-02-16 15:41:47 -08:00
John Ralls
8b0d9425e9 Remove some obsolete and unused Scheme files. 2018-02-16 15:37:46 -08:00
John Ralls
26e51339a6 Rework the Scheme target dependencies.
Should fix Bug 793122 - 2.7.3: ninja build fails
along with the nagging parallel-build problems.
2018-02-16 14:28:46 -08:00
John Ralls
04408650c1 Fix double free, caused test to crash on Mac. 2018-02-15 11:04:15 -08:00
John Ralls
6b49b3ba4c Bug 792763 - deleting a transaction can cause a SIGSEGV
Prevent a NULL transaction from crashing xaccTransCountSplits and
prevent gnc_plugin_business_update_menus from calling it with a
NULL transaction.
2018-02-02 13:05:20 -08:00
Geert Janssens
59fb8efaf9 Merge branch 'maint' into unstable 2018-02-02 18:57:24 +01:00
Geert Janssens
0d4f6e054d Improve gnc_data_home verification and creation
- Don't attempt to create a subdirectory of a non-existing home directory (use tmpdir as base directory in that case)
- Make sure all tests run in an environment with GNC_BUILDDIR and GNC_UNINSTALLED set. Otherwise
  the one-shot old .gnucash to new GNC_DATA_HOME migration may already have run at build time,
  preventing us from informing the user a run time.
- Re-enable the userdata-dir with invalid home test (linux only).
2018-02-02 10:24:04 +01:00
Geert Janssens
0f5bb35166 Disable the proper test... 2018-02-01 22:31:27 +01:00
Geert Janssens
90517b69ce Temporarily disable test that breaks on travis only
It needs some more tweaking to cope with the false
assumption the builder can't create a temporary directory on /
2018-02-01 20:43:49 +01:00
Geert Janssens
2f16b092f5 Simplify filepath init code
It will no longer attempt to use /home/janssege/.gnucash. That was
requiring lots of extra conditions.
It will also default to a base directory (gnc_data_home) in the
build dir if it detects the code is run during building or testing.
That again allows to simplify it as there's no need for temp dir
juggling in case the build environment doesn't have a writable home dir.
2018-02-01 19:17:17 +01:00
Geert Janssens
3c13f565d3 Merge branch 'unstable-fix-business-reports' of https://github.com/christopherlam/gnucash into unstable 2018-01-31 18:44:04 +01:00
Geert Janssens
ff24970f5f Add GENERATE_SWIG_WRAPPERS option to control the generation of swig wrappers independently of whether we're building from git
The swig wrappers don't really depend on git (but rather on swig) and there can be
situations the builder wants to generate the wrappers also from a tar ball.
2018-01-31 16:16:59 +01:00
Christopher Lam
862956a760 BUGFIX: invoice posted-date is no longer 0 for unposted invoices
This commit fixes business reports caused by 91f4b19039
whereby the posted-date for unposted invoice was changed
from 0 to MAXINT. Now we need to use (gncInvoiceIsPosted)
or (gncInvoiceDateExists) instead.
2018-01-30 19:29:04 +08:00
Geert Janssens
49a936c1fd Rewrite gnc_add_swig_guile_command to work in dist tarball as well
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
2018-01-29 19:46:44 +01:00
Geert Janssens
36cb167b68 Rewrite gnc_add_swig_python_command to work in dist tarball as well
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
2018-01-29 19:46:44 +01:00
Geert Janssens
ec213360f3 Review which built files are really needed in the dist tarball
Several were only there because they used to be generated via autogen.sh
and hence had to be included because autogen.sh was not supposed to be run
in a tarball based build.
A few others aren't clear so I have left them in for now:
- gnucash.1 (man page)
- gnucash-design.info (because it's unclear what we want to do with that one)

These files should clearly be in the tarball:
- gnucash.pot -> for our translators
- ChangeLog -> can't be generated outside of a git repo
- gnc-vcs-info.h -> can't be generated outside of a git repo
- guile/python bindings -> to avoid a swig dependency when building from tarball
2018-01-29 19:46:44 +01:00
Geert Janssens
4317d8a8f6 Improve handling of generated distributable files
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
  no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
  reason they were defined as targets was to ensure they got built
  before the dist tarball. This is now properly handled by the
  dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
  was not the way to do it according to that property's help page)
2018-01-29 19:46:44 +01:00
Geert Janssens
3dff4e5211 Fix make dist on a clean checkout
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.

This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).

Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
2018-01-29 19:46:44 +01:00
Geert Janssens
18feaa16a7 Remove support code to load qof backend in autotools based build environment 2018-01-26 18:26:06 +01:00
Geert Janssens
00396db560 Remove the .in extension from test-real-data.sh and stop configuring it for autotools
We have dropped support for autotools and cmake invokes this script using /bin/bash <script>
So the exact shebang value is not relevant any more
2018-01-26 18:26:06 +01:00
Geert Janssens
0f4a72b49f Remove unused file 2018-01-26 18:26:06 +01:00
Geert Janssens
85bfbd8e82 Some minor cleanups after the autotools removal
This includes removal of the now unused make-gnucash-potfiles.in,
checking for CMakeLists.txt rather than Makefile.am in gnc-vcs-info,
upating the HACKING file,
and generally updating references to autotools.

I have kept "Makefile.*" exclude patterns in our CMakeLists.txt files
because they may still be lingering in the source directory from
previous autogen.sh runs. At some point these should probably be
removed as well still, together with the gitignore references to them.
2018-01-26 18:22:48 +01:00
John Ralls
43ad7accda Remove stray addition from 34cc103e94. 2018-01-25 14:17:23 -08:00
John Ralls
a7cfedb9dd Remove overview links to nonexistant articles. 2018-01-25 13:45:02 -08:00
John Ralls
34cc103e94 Add doxygen target. 2018-01-25 13:45:02 -08:00
Geert Janssens
52b0c06d30 Merge branch 'maint' into unstable
Conflicts:
- gnucash/gnome-utils/gnc-main-window.c
  I have chosen to ignore the changes pulled in from maint. The same change will
  be reimplemented in a followup commit.
- po/ru.po
  Same here. The translation conflicted too much and there's a
  translation update available for unstable I will pull in soon.
2018-01-25 10:24:53 +01:00
John Ralls
1fc46fe140 Fix some dependency-checking failures.
Thanks to Robert Merkel for reporting them.
* Build gnucash-design.info if makeinfo is available, but don't complain
  if it isn't.
* Fail Cmake if LibXSLT and xsltproc aren't found. Those are required to
  build the gschemas and GnuCash won't work without them.
* Fix the WebKit detection so that it isn't faked out into thinking it has
  WebKit2Gtk-4.0 when it's WebKit2Gtk-3.0 and cmake is run with a
  CMakeCache.txt present.
2018-01-23 16:04:28 -08:00
Christopher Lam
ca22d5531b Change gnc_pricedb_convert_balance_nearest_price from timespec to time64. 2018-01-20 16:40:45 -08:00
John Ralls
74ddb671e4 Merge Chris Lam's and Aaron Laws's branch 'time64-ftw' into unstable. 2018-01-20 12:40:32 -08:00
John Ralls
91f4b19039 Convert python bindings from timespec to time64. 2018-01-20 12:35:04 -08:00
John Ralls
6ffb77de20 Merge branch Rob Gowin's 'bye_bye_autotools' into unstable. 2018-01-18 12:02:56 -08:00
Geert Janssens
2364c5607f Merge branch 'maint' into unstable
Resolved conflicts:
	gnucash/gnome-search/dialog-search.c
	gnucash/gnome-utils/gnc-splash.c
	gnucash/import-export/aqb/gnc-plugin-aqbanking.c
	gnucash/import-export/import-account-matcher.c
	po/de.po
	src/report/standard-reports/budget-barchart.scm
	src/report/standard-reports/budget.scm

Note the de.po conflict was resolved by dropping all changes
and merging the file again with gnucash.pot (generated after
the merge but before committing).
2018-01-17 18:08:05 +01:00
John Ralls
26fa2acfd5 Use a more appropriate comparison for doubles. 2018-01-16 17:24:29 -08:00
John Ralls
8f96882ead Remove tests checking members of deleted objects.
GLib's scribbling of freed memory is enabled on Arch so attempting to
read the deleted members of inst and book crash instead of reaturning
invalid results. These weren't really useful tests anyway.
2018-01-16 17:24:29 -08:00
John Ralls
8900b19da3 Bug 790845 - 2.7.3: massive test failures on some architectures (reopened).
Fix some test failures caused by erroneous size assumptions.
2018-01-14 16:31:22 -08:00
Rob Gowin
54ac7f23e0 Remove Autotools 2018-01-13 12:52:57 -06:00
Christopher Lam
cc097a3f35 [mod|inc|dec]date64 API rename back to date
This commit mass renames new t64 API back to the original names.
2018-01-11 21:07:02 +11:00
John Ralls
ebbcd30f39 Save Changes Bug 792106 - Wrong dates displayed
The first attempt to fix this, a17bc85a, doesn't work because the
boost::date_time constructor gets enough information in most cases to
generate a date, just not the one we expect. This change looks for '-' in
the fourth position and if it's there assumes iso-extended format, otherwise
it assumes delimiter-less ISO without the 'T', i.e. %Y%m%d%H%M%S.
2018-01-09 14:58:43 -08:00
John Ralls
fcf88262ca Extract function tz_from_string.
Also changes from calculating the Bug 767824 offset to using
boost::date_time::local_time_in() and provides unit tests.
2018-01-09 14:08:42 -08:00
John Ralls
be02abc866 Merge branch 'remove-portfolio-dist' of https://github.com/codesmythe/gnucash into unstable 2018-01-09 09:49:45 -08:00
Christopher Lam
ee8f9053e8 REMOVE-TIMEPAIR: libgnucash/app-utils/app-utils.scm & date-utilities.scm
This commit removes timepair API functions defined in date-utilities.scm
2018-01-08 22:56:50 +11:00
Christopher Lam
465c9e1f21 ADD-TIME64-API: libgnucash/engine/gnc-pricedb.[ch]
gnc_pricedb_lookup_nearest_in_time64
gnc_pricedb_lookup_nearest_in_time_any_currency_t64
2018-01-08 22:56:49 +11:00
Christopher Lam
fb2ed010e7 TP->T64: libgnucash/scm/price-quotes.scm 2018-01-08 22:56:49 +11:00
Christopher Lam
dda0695285 ADD-TIME64-API: libgnucash/engine/gnc-pricedb.[ch] 2018-01-08 22:56:49 +11:00
Christopher Lam
46c9fcc8f8 TP->T64: libgnucash/engine/test/test-split.scm 2018-01-08 22:56:49 +11:00
Christopher Lam
fefea400ce TP->T64: libgnucash/engine/engine-interface.scm 2018-01-08 22:56:49 +11:00
Christopher Lam
b53aa85660 TP->T64: libgnucash/engine/test/test-extras.scm 2018-01-08 13:01:29 +11:00
Christopher Lam
d41ad85f0a TP->T64 COMPATIBILITY SHIM: gnucash/libgnucash/app-utils/options.scm
This commit adds a compatibiliy shim. Although the rest of gnucash
can be converted to time64, this shim allows a Gnucash session to
load reports saved with timepairs.
2018-01-08 13:01:29 +11:00
Christopher Lam
7550ccf537 date-utilities.scm: optimize leapyear calc 2018-01-08 13:01:29 +11:00
Christopher Lam
33a7bb73db Bugzilla 790526 Correct weeknum calculator
This change will fix 'num-of-weeks-since-1/jan/1970' which formerly used quotient to remove
the fractional part of the division. For negative values of num-of-weeks, the number is truncated
in the wrong direction (i.e. towards 0). This change uses floor instead to ensure the num-of-weeks
found is the nearest integer LESS than the fractional number.
2018-01-08 13:01:29 +11:00
Christopher Lam
335165104b ADD-TIME64-API: libgnucash/app-utils/app-utils.scm & date-utilities.scm 2018-01-08 13:01:29 +11:00
lmat
e6ee060121 Adding bill term time64 function 2018-01-08 13:01:29 +11:00
lmat
6dc982c2c6 Some time64 corrections
The build system isn't always catching changed files, so these showed up
later.
2018-01-08 13:01:29 +11:00
lmat
1f050fd1e5 Transaction members Timespec->time64 2018-01-08 13:01:29 +11:00
lmat
9a86dd222b gncInvoice uses time64 2018-01-08 13:01:29 +11:00
lmat
598cb6d861 gncEntry members timespec->time64 2018-01-08 13:01:29 +11:00
lmat
5dd12119b7 Converted timespec_to_dom_tree to time64 2018-01-08 13:01:29 +11:00
lmat
f77369bb96 Removing timspec from some xml parsing
And several other sprawling references that are connected in one
way or another.
2018-01-08 13:01:29 +11:00
lmat
7390396af9 added gnc-dmy2time64* functions 2018-01-08 13:01:29 +11:00
lmat
588fcb6ed2 Transaction getVoidTime uses time64. 2018-01-08 13:01:29 +11:00
Christopher Lam
978ec61f98 Further scheme conversion to gdate to use time64
Add missing time64_to_gdate
2018-01-08 13:01:29 +11:00
lmat
0bf0989aa7 Add time64 functions for gncEntry 2018-01-08 13:01:29 +11:00
lmat
dbd1473730 Adding time64 alternatives 2018-01-08 13:01:29 +11:00
lmat
b5aad8c7bb Renaming time64 function for consistency 2018-01-08 13:01:29 +11:00
lmat
61d4aaaf08 Adding some time64 alternatives 2018-01-08 13:01:29 +11:00
lmat
2f89e4595b timespec->time64 for gnc_budget_get_period... 2018-01-08 13:01:29 +11:00
lmat
95e31f982b Date option absolute now takes time64. 2018-01-08 13:01:29 +11:00
lmat
7d51089501 Changing scheme conversion to gdate to use time64 2018-01-08 13:01:29 +11:00
lmat
d36742d941 Removing uses of timespec 2018-01-08 13:01:29 +11:00
lmat
e947214960 Removing uses of timespec 2018-01-08 13:01:29 +11:00
lmat
168f6d6740 Removing unused timespec function 2018-01-08 13:01:29 +11:00
lmat
ee56f5df78 Adding some time64 API functions 2018-01-08 13:01:29 +11:00
John Ralls
502001cd7c Fix travis test failure: It seems the boost bug is fixed. 2018-01-07 16:46:25 -08:00
Rob Gowin
bee2925ecc Remove gnc-value-portfolio references from dist lists.
File itself was removed in c0fd3b3.
2018-01-05 10:09:40 -06:00
John Ralls
c0fd3b3165 Remove all references to the now-defunct Yahoo! quote retrieval
And make Alphavantage the default.
2018-01-02 10:43:49 -08:00
John Ralls
320c5211b0 Fix extra instance of test-test-extras* in install_manifest.txt
Allows xargs rm < install_manifest.txt to complete without error.
2017-12-31 16:34:48 -08:00
John Ralls
5823f1b2bb Prevent "Save before closing" dialog from appearing at startup.
Caused by simply loading the transaction report, which called
gnc-get-current-book and that it in turn creates a session if one
doesn't already exist.
2017-12-30 13:41:00 -08:00
John Ralls
d06ed7c1a8 Fix -Wsign-compare error. 2017-12-30 13:39:55 -08:00
John Ralls
3d2682ac04 Merge branch 'maint' into unstable 2017-12-30 13:39:21 -08:00
Geert Janssens
fd9474b55f Merge branch 'unstable-TR-plus' of https://github.com/christopherlam/gnucash into unstable 2017-12-29 22:47:44 +01:00
John Ralls
26b82b56e0 Fix Travis 'dangling else' warning. 2017-12-27 06:32:54 -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
Christopher Lam
43cbe65282 REFACTOR:Move Void-status filter to filter tab
Also upgrade lookup-value Void Transactions now in Filter tab
2017-12-24 00:13:39 +08:00
Christopher Lam
8990553e2e ENH: Move Account matcher to Filter tab
This commit moves the Account matcher into the Filtering tab in preparation for further options
2017-12-24 00:13:39 +08:00
Christopher Lam
d93d4f68b0 options.scm: upgrade lookup-value to learn section changes 2017-12-24 00:13:39 +08:00
Geert Janssens
2f96b19c77 Merge branch 'fix_bayes' of https://github.com/limitedAtonement/gnucash into unstable 2017-12-23 15:10:48 +01:00
Geert Janssens
ddfd38d8c3 Remove cmake hoop to change file permissions
As we are using cmake's own configure_file command, it will just copy
the permissions of the input file, which is what we want here.
2017-12-23 14:07:25 +01:00
Geert Janssens
f11eab36d9 Replace GNC_CONFIGURE(2) with configure_file 2017-12-23 14:07:25 +01: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
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
lmat
a80318ec5f Adding to version info to feature string 2017-12-21 13:19:01 -05:00
lmat
a23438d5fb Correct string cache code
string cache replace was incorrect and covered by gpointer casting.
2017-12-21 07:39:33 -05:00
lmat
805549ba24 Rename qofinstance function
This function was supposed to be renamed a while back. I had named it
this way for debugging purposes.
2017-12-21 07:39:33 -05:00
lmat
fbf4843f31 Changed bayes import map design
This commit introduces a new feature flag:
GNC_FEATURE_GUID_FLAT_BAYESIAN. It signifies that the bayes import map
data are stored flat and by guid. Any time bayes import map data are
accessed, they are converted if necessary.
2017-12-21 07:39:33 -05:00
lmat
f782be1a51 Code review responses
Using Aliases to represent cmplicated types
Corrected variable-sized array on stack
Using PascalCase for type names and aliases
2017-12-21 07:39:33 -05:00
lmat
3312fe2dcd Changed some constants to constexpr 2017-12-21 07:39:33 -05:00
lmat
29ad8ff9b0 Remove unused kvp function 2017-12-21 07:39:33 -05:00
lmat
4a88f05d11 kvp string: allocate enough space
We need to allocate enough space for the terminating null character.
Also, I double-checked the documents for std::basic_string::c_str () and
verified that it does guarantee the terminating null, so I put a comment
in the code that depends on that.
2017-12-21 07:39:33 -05:00
lmat
5b03182963 Correct kvp to_string typo 2017-12-21 07:39:33 -05:00
lmat
f260a01bfd Keep tokens as they are, don't translate them
Before, it was necessary to remove '/' from tokens so that they won't be
divided up within kvp. Now that kvp doesn't parse tokens, it's okay to
pass '/', and it's better not to translate user-provided tokens if at all
possible.
2017-12-21 07:39:33 -05:00
lmat
551549598a Corrected memory management issue 2017-12-21 07:39:33 -05:00
lmat
d9eebd332b Renaming functions to get rid of temporary name
_var_ was used to make sure I caught all references, but isn't intended
as a permanent name.
2017-12-21 07:39:33 -05:00
lmat
5636afc4a2 Kvp no longer parses entries looking for delimiters 2017-12-21 07:39:32 -05:00
lmat
2cda65e012 Added test for and corrected get_bayes_info 2017-12-21 07:39:32 -05:00
lmat
9d7ec35ce5 Removed qof_instance_set_kvp, qof_instance_get_kvp
And replaced them with versions that take lists of key path elements.
This is in an effort to eliminate the parsing of kvp keys.
2017-12-21 07:39:32 -05:00
lmat
eb6dad86e3 Fixed conversion problem
The conversion assumed there were only three levels to bayes import
map kvp: IMAP token, user-supplied token, GUID/account name. In
actuality, since user-supplied tokens could have the delimiter in them,
there could be several. This fix takes that into account like so:
IMAP token, potentially several user-supplied tokens, GUID/account name.

The import map is undergoing two conversions at the same time: account names
to guids and an hierarchical representation to a flat representation in KVP.
2017-12-21 07:39:32 -05:00
lmat
b3667c76fc Implement flat bayes kvp
The bayes data are stored in the KVP store. Before this commit, they are
stored under /import-map-bayes/<token>/<account guid>/count (where count
is the datum that "matters" in bayes matching).

The problem with this is that any token including the kvp delimiter
(currently '/') gets divided, and is not found correctly during bayes
kvp searching. The quickest solution to this is to replace all "/"
characters with some other character. That has been done, along with a
re-structuring of the bayes matching code to take advantage of c++
features to make the code more concise and readable.

Also modified some test functions to fix leaks and double-frees: the
same kvp value can't be in the kvp tree twice.

Also, when I added code to clean up after the tests, some things started
breaking due to double-delete. Apparently const_cast was hiding some
programming errors. Really? You don't say? When giving a GUID* to KvpValue,
the latter takes ownership of the former.
2017-12-21 07:39:32 -05:00
lmat
08aa0104ef Change kvp string representation
The nested representation was very noisy. Now, the string representation
shows one line per value with the full prefix which is also more
expressive than the old version.
2017-12-21 07:39:32 -05:00
lmat
34e0d6cfa0 kvp frame to template and correcting failure macro
The template avoids the need to cast to and from void*, and adds flexibility to
the targeted function's signature.

test-stuff.h defines a macro, "failure" which is used as an identifier
in the standard IO library, so I moved any inclusion of test-stuff.h to
the last include position so that "failure" wouldn't be defined before
the IO library was included.
2017-12-21 07:39:32 -05:00
lmat
eb6c741bf9 Account.c to Account.cpp
Since Account.c is now Account.cpp, the function signatures look a bit
different internally. The tests rely on function signatures in error
messages. Instead of trying to figure out what the exact
function signature might be, I use a substring matching strategy to
ensure that the correct error was issued.
2017-12-21 07:39:32 -05:00
Geert Janssens
723b51a06d Add unit test for rewritten scheme error handlers 2017-12-20 14:55:40 +01:00
Geert Janssens
3d910ad2b1 Drop guile 1.8 support
And with it all quirks we still had in the code to support that version.
2017-12-20 14:55:40 +01:00
Geert Janssens
a784dd5784 Add support for guile 2.2 2017-12-20 14:55:40 +01: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
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
Geert Janssens
de4d1e9859 Add infrastructure to handle preference schema migrations and use it to replace one preference
The preference schema migration collects all schema mutations that can occur
when upgrading to a newer gnucash version. The old gconf to gsettings conversion is
integrated in this system as well. Newer schema mutations will happen based on version
number upgrades though.

The preference that got replaced is "use-theme-colors". Based on discussion in bug 746163
(https://bugzilla.gnome.org/show_bug.cgi?id=746163) and gnucash-docs PR#105
(https://github.com/Gnucash/gnucash-docs/pull/105) this has been replaced with
"use-gnucash-color-theme" with inverted meaning. The old option is kept around for one or
two major release cycles to allow seamless conversion.
2017-12-11 21:56:23 +01: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
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
Rob Gowin
e7b7974a3c Handle cases where LIBDIR is not "lib"
For example, Fedora installs to lib64, Debian to lib/<arch-tuple>
2017-12-01 19:44:35 -08:00
Rob Gowin
778b86e29e Handle cases where LIBDIR is not "lib"
For example, Fedora installs to lib64, Debian to lib/<arch-tuple>
2017-12-01 17:00:39 -06: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
5ca129d82d Remove unset variable SWIG_ARGS from Makefile.am 2017-11-30 13:31:23 -08:00
Geert Janssens
649a6a263e Fix installation destinations for overrides and quotes scripts
Mentioned by Robert Gowin and Christopher Lam
2017-11-30 17:37:32 +01:00
Guy Taylor
c9c5876431 Use glib.h over custom typedefs in Python SWIG
Use the native glib.h (mainly gint, gfloat ...) over custom typedefs in
SWIG type files. This is for Python only.
2017-11-28 16:27:50 -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
13657ee1bb Merge branch 'maint' into unstable 2017-11-25 15:35:24 -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
d44f6bc9d5 Fix missing/misspelled files for distribution.
Mostly errors from 6c01e54.
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
Geert Janssens
cd9c3807c0 Assign as payment - when random transaction is selected, reset transaction description to owner
This will make the assigned payment more in line with traditionally created business payments
2017-11-18 17:43:33 +01:00
Geert Janssens
0dfb921e86 Add functions to retrieve a copy of splits of a certain type from business transactions 2017-11-18 16:55:18 +01: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
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
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
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
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
Geert Janssens
7cb59aafe8 Fix disabling src docs build on Windows
As it was written it also prevented building source docs on other platforms, causing
cmake warnings and a failed dist build.
2017-10-26 14:05:17 +02:00
Geert Janssens
1238b9d8cd Prevent gcc from searching config.h in the current directory
This will avoid a ninja-build from picking up a config.h generated by the autotools build
(in the root build directory). Picking up the wrong config.h may lead to all kinds of
subtle issues if the autotools run was done with different options than the cmake run.
2017-10-26 14:05:17 +02:00
Carwyn Nelson
7b1d298bc6 Little refactor of account.c 2017-10-25 09:43:13 +02:00
Geert Janssens
444eb1c28e Improve gnc_numeric_boxed_copy_func based on discussion in PR#145
In essence
- guard against nullptr dereferencing
- free returned values
2017-10-23 23:05:49 +02:00
Bob-IT
53ef0c5be9 Save button active on every load
The gnc_numeric numval was being set with a valid numeric and hence was always different to the parsed amount.
2017-10-23 23:05:49 +02:00
John Ralls
70a37a24ae Don't build design docs on Windows.
To avoid requiring texinfo.
2017-10-22 11:51:48 -07:00
Geert Janssens
b83be1b8c6 Remove configure option --enable-locale-specific-tax and make gnucash always behave as if it was set 2017-10-20 20:50:33 +02:00
Jose Marino
968956d271 fix reconcile dialog always showing ending balance of zero
The reconcile account dialog always displays a value of 0.00 as the
Ending Balance, regardless of account and statement date.
This is caused by function xaccAccountGetReconcilePostponeBalance
returning the wrong value, returning TRUE when it should return FALSE,
and setting balance to the default {0,1}.

The code uses bal.denom!=0 as an indicator that a valid balance was
received in variable v. However, bal is initialized to {0,1}
making the test always true even when we didn't receive a valid
value in variable v.
Thus, this function returns TRUE with *balance={0,1} when no valid
balance was found in "reconcile-info/postpone/balance".

This patch fixes the function to return FALSE if v doesn't hold
a valid value or if bal.denom is set to 0.
2017-10-19 11:29:19 -06: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
Geert Janssens
9472e9347f Replace ambiguous 'scm' with 'vcs' in macro name
Pointed out by Frank.
2017-10-05 22:47:11 +02:00
Geert Janssens
545b24fe97 Merge branch maint into unstable
Resolved conflicts:
2017-10-05 16:29:36 +02:00
Geert Janssens
e56cb37813 Additional changes to use commit date rather than build date
This effectively replaces the use of GNUCASH_BUILD_DATE with GNUCASH_SCM_REV_DATE.
The latter is extracted from the current commit if building from some kind of vcs
(currently only works correctly for svn and git). The info extracted while building
from vcs is then also added to the dist tarball so it's available when building
from tarball as well (via the file libgnucash/core-utils/gnc-vcs-info.h).

The same date is also used to set the date in gnucash' man page document.
A practical detail: I have changed the substitution variables in the man page template
from @- -@ to ${} so we could leverage CONFIGURE_FILE in cmake. The necessary
related adjustments have also been made to Makefile.am's substitution rules.
2017-10-05 15:51:55 +02:00
Geert Janssens
d266ee346c Fix build failures if userdata_home exists but gnc_userdata_home doesn't
userdata_home is a different directory on each platform we support (default /home/janssege/.local/share on linux for example)
and gnc_userdata_home is normally userdata_home/GnuCash.
These directories may not always exist (yet) in all circumstances, so properly handle
all of these possible situations.
2017-09-26 12:37:33 +02:00
John Ralls
711cea1f4f Fix the fix from mac for test-userdata-dir.c 2017-09-16 18:09:34 -07:00
John Ralls
9dc8e6f40a Fix test-userdata-dir on Mac. 2017-09-16 14:50:33 -07:00
Geert Janssens
a8cccc00f3 Minor tweaks to the userdata_dir logic
- have gnc_validate_directory throw as well in case of a missing directory
  that it shouldn't create. This allows to remove 3 other throws
- slightly adjust the error message in case of missing directory
- never migrate when the final directory is a temporary (sub)directory
2017-09-16 22:29:29 +02:00
Geert Janssens
2ac118f80c Improve a few comments. 2017-09-16 19:33:56 +02:00
Geert Janssens
75b5a41eee Merge branch 'maint' 2017-09-15 21:51:50 +02:00
Geert Janssens
37ecf56fbb Merge branch 'maint'
Resolved conflicts:
	bindings/python/tests/CMakeLists.txt
2017-09-12 13:48:01 +02:00
John Ralls
465f24af2e Link libgncmod-app-utils-python to libgncmod-app-utils.
Instead of building libgncmod-app-utils-python as a stand-alone library
because gncmod-app-utils.c can be compiled only with guile thanks to
declaring scm_init_sw_app_utils_module. Linux linkers will just mark it
'U' but the MacOS linker errors out.
2017-09-10 18:24:39 -07:00
Geert Janssens
556f7037ad Merge branch 'maint' 2017-09-10 19:16:38 +02:00
John Ralls
43c81b6ebb Add include of Foundation framework for NSString and NSBundle. 2017-09-06 22:28:13 -07:00
Geert Janssens
118af3e9e9 Fix gtest-gnc-timezone test on Windows 2017-09-05 14:14:01 +02:00
Geert Janssens
333edb1900 Fix gnc-rational test on Windows 2017-09-05 13:54:50 +02:00
Geert Janssens
449d3ca32d Windows: check permissions actually used on the platform
The code assumed these would be the same as on all other platforms which turns out not to be the case
2017-09-05 00:07:17 +02:00
Geert Janssens
d96bb3ebd5 Amend previous commit
The utf8 conversion is only used in the Windows specific section so there's no
need to define an overloaded function on std::string in this case.
Also CMakeLists.txt doesn't require the MingW specific library name setting
for boost::filesystem. Just removing the hardcoded one allows the build to
pick the right name up from the Boost_LIBRARIES variable.
2017-09-04 23:03:08 +02:00
Geert Janssens
d6677ff39f Convert boost::filesystem path strings to utf8.
Fixes windows build.
2017-09-04 13:37:46 -07:00
Geert Janssens
1b3a0e56ff Use boost::filesystem's built-in conversion between character encodings.
This should fix the wide character mixup on Windows
2017-08-31 12:20:08 -07:00
John Ralls
e2386253ca Move Win32 additions to engine_SOURCES to before first use.
It doesn't do anything where it is.
2017-08-31 12:20:07 -07:00
Geert Janssens
74b6ef8ab3 Merge branch 'kvpvaltostring' of https://github.com/limitedAtonement/gnucash 2017-08-31 10:10:45 +02:00
Geert Janssens
a670783eb6 Merge branch 'prices-out2' of https://github.com/Bob-IT/gnucash 2017-08-29 22:24:43 +02:00
lmat
a9cc488cbf Should return std::string
This is only used in C++, so there is no need to g_strdup in here. Also,
this fixes a memory leak in KvpFrameImpl.
2017-08-29 14:12:25 -04:00
Geert Janssens
bbea5061a3 Extend environment file parsing to also parse environment.local
This latter file can be created by the administrator next to the environment
file in order to override parameters set in environment file.
The reason for this is the environment file is always overwritten
during installation, while environment.local is never touched by
the installers. So making the changes in there ensures they persist
acros gnucash updates.
2017-08-26 21:38:21 +02:00
Geert Janssens
045ee429bf Check GNC_DATA_HOME environment to override default userdata location.
This replaces GNC_DOT_DIR as it was called in older gnucash releases.
2017-08-26 21:38:21 +02:00
Geert Janssens
a153412e5a Use platform dependent locations for gnucash user's data (gnc_userdata_home)
- Linux: use whatever the xdg spec dictates
- Windows: use AppData(Roaming)
- OS X/Quarz: use NSApplicationSupportDirectory special directory, which
              typically resolves to $HOME/Library/Application Support

If the preferred directory can't be used the code will fallback to
$HOME/.gnucash (the old location) if it exists. It won't create it
however. Instead if missing it will fall back to the platform's
temporary directory.

Code is added also to automatically migrate all data from the old
location to the new (only the first time).
2017-08-26 21:38:21 +02:00
Geert Janssens
ae75bc963f Rewrite several file path routines to use boost::filesystem
This is a basis for moving .gnucash to a more modern location for
application specific user data (following the xdg spec).
2017-08-26 21:38:21 +02:00
Mike Alexander
29a92431cb Fix sigfigs(n) rounding to work when the input is bigger tnan 10**n.
For example rounding 1234567/1 to 6 significant figures would fail.
2017-08-22 00:47:08 -04:00
Mike Alexander
57638161f2 Fix numerator overflow constructing GncNumeric from 96.16 2017-08-22 00:35:10 -04:00
Mike Alexander
00c7089ecb Add tests for converting doubles 96.16 and 9616000000.0 to GncNumeric. 2017-08-22 00:30:28 -04:00
Geert Janssens
4b3db97ba1 Merge branch 'maint'
Resolved conflicts:
	gnucash/report/report-system/html-document.scm
2017-08-21 21:53:27 +02:00
John Ralls
115d61e7f3 Remove test for transaction set-date diagnostic message.
Since we removed the diagnostic, testing for it fails.
2017-08-20 23:25:56 +02:00
John Ralls
71e3703087 Use time64 GncDateTime constructor instead of struct tm constructor.
It's substantially faster and we do a lot of time64->gdate conversions.
2017-08-20 21:49:04 +02:00
John Ralls
f7ce8bcbb3 Disable creating a date string to maybe use in a PINFO message.
Creating a date string occupied nearly all of the time required to
set a date on a transaction, generally to no benefit at all.
2017-08-20 21:31:07 +02:00
John Ralls
1e0a9a0ef8 Parse date strings into a struct tm and construct GDateTime with that.
Instead of using the more generic string constructor. The struct tm
constructor is several times faster and this change speeds up
transaction loading by 2x.
2017-08-20 21:28:09 +02:00
John Ralls
82d891a202 Test features to see if they're already set before setting them.
Setting a feature writes to KVP which in the SQL backend causes the book
to be written out, which is rather expensive. Doing this in a loop (as
is the case in convert_imap_account, is quite slow, and this change
afforded a 4x speedup.
2017-08-20 21:24:02 +02:00
Robert Fewell
6ca85450a8 Move gnc-gdate-utils functions to gnc-date and remove files.
Also update related files to reflect move of gnc-gdate-util functions
2017-08-20 14:07:30 +01:00
Robert Fewell
b485206378 Change tabs to spaces and remove some blank lines 2017-08-20 14:07:30 +01:00
Robert Fewell
047bc8d69b Rename gnc_pricedb_remove_old_prices_keep_last
Rename gnc_pricedb_remove_old_prices_keep_last to reflect that there is
an option to keep none so new name is gnc_pricedb_process_removal_list
2017-08-20 14:07:23 +01:00
Robert Fewell
a7abc312a9 Rename save_cloned_price to clone_price
Renamed save_clone_price to clone_price and changed to pass the address
of the cloned_price variable instead of returning it.
2017-08-20 14:06:10 +01:00
Robert Fewell
89dbc09410 Added second if clause for completeness. 2017-08-20 14:06:09 +01:00
Robert Fewell
c3466b79ef Move gnc-gdate-utils.c/h from app-utils to engine 2017-08-20 14:05:05 +01:00
Robert Fewell
42915a42d1 Modify the unit tests to reflect changes. 2017-08-20 09:50:31 +01:00
Robert Fewell
667f175757 This change modifies the way old prices can be removed.
There are now options to specify which commodities to remove prices
from as well as options to leave none or the last one for the week,
month, Quarter, year and a scaled option.
2017-08-20 09:50:31 +01:00
John Ralls
4fc61b2ac8 Commit imap conversions once per account instead of per import map slot.
Commits are expensive in the SQL backend; this resulted in a >40x
speedup in loading a database with 3400 import map slots (>2 hours to 3
minutes).
2017-08-19 20:25:57 +02:00
John Ralls
c6a72cc596 Revert "Fix mac looking in wrong directory for libgncmod-backend-dbi.dylib."
This reverts commit 6a359f86a0.
2017-08-19 20:25:04 +02:00
John Ralls
7e7d42847c Fix load string KVP memory error. 2017-08-19 17:15:49 +02:00
John Ralls
6a359f86a0 Fix mac looking in wrong directory for libgncmod-backend-dbi.dylib. 2017-08-19 17:15:49 +02:00
Geert Janssens
f943ba61ae Rename directory for code from external projects
'lib' is also being used by the cmake build, so there was a
theoretical risk for file conflicts. The new name is 'borrowed'.
2017-08-17 15:25:49 +02:00
Geert Janssens
7fd38c88a5 Improve a comment
My Ingrish is pretty poor at times...
2017-08-17 12:36:48 +02:00
Geert Janssens
a96a68fd4e Add as many values as there are fields in the list
This wasn't causing trouble, but it looks more correct this way.
2017-08-17 12:33:08 +02:00
Geert Janssens
0946b0315f Use another way to fix backend loading on OS X 2017-08-17 10:10:50 +02:00
John Ralls
cc39a04f6f Fix mac looking in wrong directory for libgncmod-backend-dbi.dylib. 2017-08-16 23:17:07 +02:00
John Ralls
e9ac71c0f9 Fix time-string format in backend for GncDateTime(std::string).
Also provide a simple test of that ctor.
2017-08-16 23:17:07 +02:00
John Ralls
43df1ccc3a Fix the most serious backend memory leaks. 2017-08-16 23:17:07 +02:00
Geert Janssens
1883d8ec31 Fix a number of test mismatches between cmake and autotools
cmake:
- add test-app-utils
- rename test-link-module to test-link-module-app-utils
- add gtest-import-map
autotools:
- move gtest-import-map from TEST_PROGS to TESTS (autotools) so it shows up in the colored results list
2017-08-16 12:40:38 +02:00
Geert Janssens
53afd36de1 Keep the test modules from gnc-module outside of the normal GNC_MODULE_PATH
They interfere with other tests and pollute the build logs in cmake.
2017-08-16 11:59:27 +02:00
Geert Janssens
3e3eead3c5 Eliminate plugins directory
bi-import and customer-import have been put with the other importers
example is moved to gnc-module as, well, an example
2017-08-14 18:17:13 +02:00
Geert Janssens
dfe8ea4536 Add conditional source files to dist tarball
They should be added even if not used on the system being used to create the dist tarball
2017-08-11 22:51:14 +02:00
Geert Janssens
0c6da2f001 Cleanup some more obscure references to no longer existing 'src' directory 2017-08-11 22:44:50 +02:00
Geert Janssens
afecab330a Move accounts, checks and pixmaps into a data directory
At the same time move the art directory into contrib to unclutter the top level
2017-08-11 22:42:15 +02:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00