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