Commit Graph
100 Commits
Author SHA1 Message Date
John Ralls 89336269d8 Check the right variable in the right version of gdk to test for a Mac build. 2017-07-31 07:29:42 +01:00
John Ralls 0276367461 Merge Guido Falsi's 'fix-typo-and-indent' branch. 2017-07-23 16:20:19 -07:00
John Ralls b60057dbeb Merge Bob Fewell's 'gtk3-update3' branch. 2017-07-23 16:04:19 -07:00
John Ralls e41410ef25 [Mac] use gtk-mac-integration-gtk3 now that we're building with gtk3. 2017-07-23 15:51:48 -07:00
John Ralls 18ef968ff1 Detect and flag MinGW64
Got lost in the rebase and merge somehow.
2017-07-22 13:29:28 -07:00
John Ralls 2ceaba371d Merge Sumit Bhardway's 'gdate-day-buffer' fix for gcc-7. 2017-07-21 17:38:54 -07:00
John Ralls d41c9fd508 Turn off GncAddSchemeTargets debugging messages. 2017-07-21 17:24:55 -07:00
John Ralls bc646b54ed Remove obsolete throw specifications.
C++11 deprecates throw specifications.
2017-07-20 15:36:43 -07:00
John Ralls 3efd063a08 Merge branch 'maint' 2017-07-17 20:06:47 -07:00
John Ralls f80058bc27 Version-check some webkit properties.
Avoids error messages about undefined properties in tracefile.
2017-07-16 12:47:23 -07:00
John Ralls b8fc9df87b Relax handling of bad numeric values in the DOM parser.
string_to_gnc_numeric returns a nullptr if the GncNumeric string
constructor decides that the denominator is 0. The 2.6 version of the
function didn't check for this and occasionally stored error values.
Convert that to gnc_numeric_zero to allow the file to be processed.
2017-07-15 17:05:10 -07:00
John Ralls 72f95238fb Prevent infinite loop in to_decimal if numerator becomes 0.
Also immediately return 0 if this is 0.
2017-07-15 15:10:57 -07:00
John Ralls 9948ee6235 Merge Bob Fewell's Gtk3-Update2 branch. 2017-07-15 15:09:40 -07:00
John Ralls 0745cb9af5 Enable AQBanking by default in CMake build. 2017-07-14 14:21:07 -07:00
John Ralls 5195c42107 Adjust autotools build for gnc-html-webkit changes.
Fixing Travis failure (I hope).
2017-07-14 09:22:29 -07:00
John Ralls f28ea50aaf Conditionally build for Webkit1 on Win32 and Webkit2 everywhere else. 2017-07-13 16:40:52 -07:00
John Ralls 8655dbc55c Check for package webkitgtk-3.0 (webkit1 API) on Windows.
Webkit2 isn't supported on Windows.
2017-07-13 16:40:51 -07:00
John Ralls 85d868f826 Use GStatBuf to match newer GLib API 2017-07-13 16:40:50 -07:00
John Ralls cb06e0e763 Include winsock2.h before windows.h to silence a compile warning. 2017-07-13 16:40:49 -07:00
John Ralls b9cb2a22d5 Disable Guile's GnuLib broken redefinition of 'close'.
To a GnuLib function that isn't built or installed.
2017-07-13 16:40:48 -07:00
John Ralls 1f31ca620e Change the dll lookup directory when building with CMake on Win32. 2017-07-13 16:40:47 -07:00
John Ralls 3d12dd9cf9 Win32 doesn't use the fake backend links, it just uses the regular dlls. 2017-07-13 16:40:46 -07:00
John Ralls 9f844fe362 Link libws32 to the DBI backend on MINGW64 2017-07-13 16:40:44 -07:00
John Ralls 890f69933f Set deprecated-declarations to no-error for WIN32 so that it will work with Guile2. 2017-07-13 16:40:43 -07:00
John Ralls 55a30978b3 Replace use of CMAKE_PREFIX_PATH
Because it was assumed that it contains only a single path; it's specified
to be a semi-colon-separated list of paths.
2017-07-13 16:40:42 -07:00
John Ralls 9d2a4b2ef0 [Mingw64] Set command variables correctly for Guile2 compilation.
Mingw-w64 linker uses $PATH instead of $LD_LIBRARY_PATH for finding
shared libraries. Both the linker and Guile itself need MSys/Unix style
paths with the drive letter as a top-level directory, forward slashes,
and separated with ':' while CMake wants Windows-style paths separated
with ';'.
2017-07-13 16:40:41 -07:00
John Ralls 92549209c0 Fix ENDIF() parameter.
CMake 3.8 complains.
2017-07-13 13:46:45 -07:00
John Ralls 4774332fcb Add CMake files and .gitattributes to lf-only files. 2017-07-13 13:46:45 -07:00
John Ralls 489d0513e0 Adjustments to build on mingw-64.
Note that there may be some changes here that need to be wrapped with ifdef.
2017-07-13 13:46:44 -07:00
John Ralls a6678e6a49 Allow compilation with either Webkit2Gtk-4.0 or WebKit2Gtk-3.0.
WEBKIT1 for windows is a placeholder, it will need a pkgconfig check too.
2017-07-08 15:08:07 -07:00
John Ralls 90f706c651 Adjust Makefile.am for pixmap hierarchy change in 4aea4c5. 2017-07-08 14:07:13 -07:00
John Ralls f3b60c3a71 Don't warn about all of the deprecated Gtk functions we're using. 2017-07-08 14:04:51 -07:00
John Ralls c8402ad62e Merge CMake Distcheck from 'maint'.
Conflicts:
	CMakeLists.txt
	src/app-utils/CMakeLists.txt
	src/backend/sql/test/CMakeLists.txt
	src/backend/xml/test/CMakeLists.txt
	src/gnome-utils/CMakeLists.txt
	src/import-export/aqb/CMakeLists.txt
	src/import-export/csv-imp/CMakeLists.txt
	src/import-export/csv-imp/test/Makefile.am
	src/import-export/ofx/CMakeLists.txt
	src/import-export/qif-imp/CMakeLists.txt
	src/libqof/CMakeLists.txt
	src/register/ledger-core/CMakeLists.txt
	src/register/register-core/CMakeLists.txt
	src/register/register-gnome/CMakeLists.txt
	src/report/business-reports/CMakeLists.txt
	src/report/locale-specific/us/CMakeLists.txt
	src/report/report-gnome/CMakeLists.txt
	src/report/standard-reports/CMakeLists.txt
	src/report/stylesheets/CMakeLists.txt
2017-07-04 18:36:35 -07:00
John Ralls b073f1d25c Merge branch 'maint' 2017-07-02 09:45:14 -07:00
John Ralls 319375fd15 Some more translations from the TP. 2017-07-02 09:25:17 -07:00
John Ralls bb2ee92961 Re-release 2.6.17
This time with the version number in CMakeLists.txt updated too.
2017-07-01 17:10:09 -07:00
John Ralls 261a64e3eb Release 2.6.17 2017-07-01 11:20:17 -07:00
John Ralls c046d2c5e4 Update translations from the translation project. 2017-06-30 15:16:50 -07:00
John Ralls 118dd41759 Bug 782274 - Transactions produced by Transfer Funds or Process...
Payment dialogs sort to beginning of day and do not honor NUM field for
custom sorting.

Do a two-step, first retrieving a GDate from the date_edit then use
gdate_to_timespec to convert it to a time64: gdate_to_timespec calls
gnc_dmy2timespec_neutral while gnc_date_edit_get_date_ts gets a
begining-of-the-day time.
2017-06-25 15:45:56 -07:00
John Ralls 99a732cb6a Bug 782897 - Stock Split Assistant crashes GnuCash if you enter a New...
Price and that already exists in the Price DB

Should have crashed regardless: The pricedb takes ownership of the
price object and unreffing it is going to cause trouble eventually.

tock Split Assistant crashes GnuCash if you enter a New Price and that
already exists in the Price DB
2017-06-24 18:06:42 -07:00
John Ralls 7e8b66faac Fix Travis Failure
Merge put back the define of _(), removed in 582edc1. Ninja didn't complain.
2017-06-20 10:56:24 -07:00
John Ralls 4b73bb5c50 Merge branch 'maint' 2017-06-20 10:26:47 -07:00
John Ralls b5b0f60396 Correctly store time64 0 in the SQL backend.
The SQL backend ignored time64 0 when saving dates. time64 is a perfectly
valid timestamp (1970-01-01 00:00:00) and should be stored.
2017-06-16 15:57:52 -07:00
John Ralls 5f8f9b9a84 Clamp time64 values passed to GDateTime functions to the valid range.
Fixes a bug reported on the mailing list wherein a date of 0000-00-00
in a MySql database would crash GnuCash. Such dates may come from a bad
conversion of 1970-01-01 or from a crash.
2017-06-16 15:31:49 -07:00
John Ralls 881a39d2eb Bug 783095 - gnucash-2.6.16 segfaults on startup
Null tip_list after freeing it the first time to prevent double-free,
then don't iterate over it if contents is NULL. Don't even try to open
dialog if tip_count < 1. Protect from dereferencing a NULL tip_list in
gnc_new_tip_number.
2017-05-26 11:34:00 -07:00
John Ralls 582edc1b31 CMakeLists.txt: Remove Apple architecture settings.
Those should be passed in as part of CFLAGS/CXXFLAGS.
2017-04-29 17:53:10 -07:00
John Ralls e79d9b5cba Updated ar.po from ashalash@msn.com
After removing duplicate translator email addresses and reference to the
Translation Project's Arabic team.
2017-04-29 17:53:10 -07:00
John Ralls b2b32e29fa Work around googletest bug 920.
https://github.com/google/googletest/issues/920, already addressed in configure.ac.
2017-04-17 11:52:44 -07:00
John Ralls 82c9367503 Merge branch 'PR140' into maint 2017-04-16 16:59:35 -07:00
John Ralls bf3052206e Merge branch 'pr141' 2017-04-16 07:20:15 -07:00
John Ralls 81fa7d76c4 Adjust CMAKE_C_FLAGS for better release/debug behavior. 2017-04-15 10:26:52 -05:00
John Ralls d632abaa96 Get links working. 2017-04-14 19:21:35 +02:00
John Ralls bb0376240d Get WebKit2Gtk basics compiling and working.
Copy and register links don't work.
2017-04-14 19:21:35 +02:00
John Ralls 15ef317968 Revert "Fix query period in test-account-get-trans-type-splits-interval."
This reverts commit e66dd12aa9. Because
the test only seems to fail crossing a DST boundary.
2017-04-14 19:21:34 +02:00
John Ralls bf86524884 Correct gnc-html-webkit.c indentation. 2017-04-14 19:21:34 +02:00
John Ralls 89021dde39 Remove if-0-ed out code from gnc-html-webkit.c 2017-04-14 19:21:34 +02:00
John Ralls aa6854fb1b Use the Mac Locale to find the account templates only when building with quartz. 2017-04-10 15:23:25 -07:00
John Ralls 5ff319205d Revert "Some instrumentation output..."
This reverts commit 2035806db7 that I
didn't want to push in the first place.
2017-04-08 09:27:15 -07:00
John Ralls 8ec92f2fe3 Change GTest annotations to use the right class name for GncInt128 tests. 2017-04-08 09:18:34 -07:00
John Ralls 2035806db7 Some instrumentation output for how much the numerator or denominator is shifted. 2017-04-07 12:39:47 -07:00
John Ralls fd6234f58f Better manage truncation in GncRational::round_to_numeric.
Mike Alexander brought this up with a test case that failed to round down
sufficiently; he found that reducing the rounding denominator by 2 sufficed
to make his test case pass.

In fact the sizing of the replacement denominator by shifting the larger of
the numerator or denominator by an arbitrary 62 bits was not correct most
of the time, so instead we begin with a shift of the full lower leg worth,
try to do the conversion, and if the conversion is still “big” shift the
larger value one more and try the operation again, repeating until the
result will fit in a GncNumeric.
2017-04-07 12:38:55 -07:00
John Ralls a467d0d397 Fix GncInt128 maxbits to account for the flag bits. 2017-04-07 12:29:04 -07:00
John Ralls de1c56b53d Fix carrying to the wrong end of the lower leg in left shift. 2017-04-07 12:27:59 -07:00
John Ralls e55b78614c Fix a magic number in GncInt128. 2017-04-07 12:26:51 -07:00
John Ralls e20009a08d Save Changes Bug 780889 - Split-register transactions result in invalid...
price:type "transaction".

Add 'transaction' to the schema and document it in gnc-pricedb.h.
2017-04-03 21:16:43 -07:00
John Ralls 6e7334fe88 Add some tests looking for a GncInt128 divide overflow problem.
Problem mentioned in mail from Mike Alexander; this test doesn't find it.
2017-04-02 16:33:01 -07:00
John Ralls 844a6db32b Bug 780845 - link in github repo README file needs correction/editing 2017-04-02 09:22:16 -07:00
John Ralls 5a58b93a71 Bug 780845 - link in github repo README file needs correction/editing 2017-04-02 09:21:03 -07:00
John Ralls f9d23de8c0 Merge Ueli Neiderer's swift-transactiontxt branch into maint. 2017-03-30 12:42:59 -07:00
John Ralls b3eb9d0d8a Use qof_instance_set/get instead of g_object_set/get. 2017-03-28 11:53:05 -07:00
John Ralls baef4029b2 Merge branch 'maint' 2017-03-28 11:49:50 -07:00
John Ralls 509ce16add Release 2.6.16 2017-03-25 17:23:18 -07:00
John Ralls 3109fc5cc4 Reduce the gate on get_random_gnc_numeric.
Fixing Bug 779217 increased the maximum denominator by 10, and that led
to overflows when converting large numbers' denominators from 100 to the
new max.
2017-03-25 17:15:37 -07:00
John Ralls a4ea79122d Update translations ca, nl, and sr from the translation project. 2017-03-25 15:39:04 -07:00
John Ralls 3367e191c8 Bug 670731 - Future Value not working with Loan Scheduled transaction
Correct the cell save routine so that the "numeric" kvp is correctly
overwritten in all instances when an edit changes its value for both
credit and debit splits. The both part is accomplished by extracting the
overwrite function.

Also provide a scrub to correct all of the incorrect files.
Unfortunately the necessary calculation function is in app-utils so
running the scrub from the backend as usual isn't possible, so we run it
from gnc_post_file_open in gnome-utils/gnc-file.c instead.
2017-03-24 16:39:30 -07:00
John Ralls cd07876a68 Revert "Fix query period in test-account-get-trans-type-splits-interval."
This reverts commit e66dd12aa9. Because
the test only seems to fail crossing a DST boundary.
2017-03-24 09:00:12 -07:00
John Ralls 41a346cbd8 Bug 776247 - PriceEditor thinks Currency XXX is an actual currency...
and tries to retrieve prices for it.

Add check for "XXX" mnemonic when filtering the currency list.
2017-03-23 13:44:05 -07:00
John Ralls 52bb6b52fc Save Changes Bug 776517 - Trial Balance Report:...
Total Debits Issue re $0 Commodity Accounts and Price Source Mode Set to
"Nearest in Time" or "Most Recent"

There was a silent error from gnc-numeric-sub-fixed in
collect-unrealized-gains because a 0 value wasn't getting its
denominator set in the gnc-numeric-mul call in
gnc:exchange-by-pricedb-helper. While this is ultimately a flaw in
gnc-numeric, this commit works around it by forcing the value to the
correct denom in gnc:make-commodity-collector.
2017-03-21 17:58:15 -07:00
John Ralls 70a97ee03d Bug 778208 - Scheduling 2nd, 3rd or 4th Wed doesn't seem to work.
Remove incorrect week adjustments for determining n for nth weekday
from a recurrence date when day % 7 == 0. Adjustment is only needed
in nth_weekday_compare because that function then adds 7 to the result.
2017-03-21 10:33:13 -07:00
John Ralls e9a27f0eb7 Merge en_GB budget->Budget into maint. 2017-03-18 16:01:53 -07:00
John Ralls 14fde85a5d Revert "Fix query period in test-account-get-trans-type-splits-interval."
This reverts commit 23da0f858c.
Although the period test failed on maint on my system--both Mac and
Ubuntu 14.04 VM--the fix fails on Travis-CI.
2017-03-18 13:11:16 -07:00
John Ralls 23da0f858c Fix query period in test-account-get-trans-type-splits-interval.
The query runs from 00:00:00 on the start date to 23:59:59 on the end
date, effectively one day more than the number specified.
2017-03-18 12:05:35 -07:00
John Ralls c4e5941323 Merge new Finnish translation into maint. 2017-03-18 12:05:03 -07:00
John Ralls 0d48588e66 Update GnuCash version and PO date for Finnish translation. 2017-03-18 12:04:36 -07:00
John Ralls 66e81040cb Fix DST calculation error.
The symptom was that in 2017 the PDT->PST transition was set a week
late. The cause was that the timezone lookup function went the wrong
way, finding the *next* timezone rule instead of the desired one because
timezone rules are stored for the year that they start rather than when
they end. Fix reverses the search to find the correct timezone rule.

Commit includes new tests to detect the problem.
2017-03-17 15:22:34 -07:00
John Ralls e66dd12aa9 Fix query period in test-account-get-trans-type-splits-interval.
The query runs from 00:00:00 on the start date to 23:59:59 on the end
date, effectively one day more than the number specified.
2017-03-17 15:22:34 -07:00
John Ralls 2b4137c566 Fix up building on MinGW with autotools. 2017-03-14 21:27:12 -07:00
John Ralls 3cb044c8fc Adjust locale test so that it works on both Ubuntu and MacOS. 2017-03-14 21:26:20 -07:00
John Ralls f795d7ff59 Fix missing fi in configure.ac. 2017-03-13 12:16:25 -07:00
John Ralls 744fc29680 Require ICU.
Note that Boost::regex and Boost::locale must also be built with ICU
support.
2017-03-13 11:56:33 -07:00
John Ralls a44c621f2b Change 'uint' to 'uint32_t'.
'uint' is a non-standard typedef not supported by MinGW.
2017-03-13 11:56:32 -07:00
John Ralls 80e64a1296 Fix failed unit test from previous commit. 2017-03-10 14:23:20 -08:00
John Ralls 3889606dd6 Bug 779217 - Transactions rounded to 5 decimal places when opening file.
xaccSplitSetValue and xaccSplitSetAmount round to the denominator found by
get_currency_denom and get_commodity_denom. The problem was that if the
commodity was unfindable because either the split’s parent or account hadn’t
been set (as is the case during loading, because the parent isn’t yet complete)
the returned denominator would be 100000, smaller than the max supported.
That would cause the value/amount to be prematurely rounded.
2017-03-10 13:21:02 -08:00
John Ralls bc50f3da00 Bug 777949 - Accounts implicitly created in ledger attempt creation twice
Guard against recursively calling the account doesn’t exist query or creation
dialog if one is already in the account creation dialog.

The underlying problem is that creating the dialog forces a UI update that
in turn sets the cell value and checks for the existence of the account.
In basic view the cell being displayed (“transfer”) isn’t the one being
changed (“account”) so the account check isn’t invoked, but in
multi-split view the “account” cell *is* displayed so the check is invoked
again.
2017-03-10 10:54:22 -08:00
John Ralls 97598c4306 Bug 776564 - Creating a scheduled transaction from an existing...
transaction does not include the notes field.

In fact, notes support was entirely missing from scheduled transactions.
2017-03-09 11:38:42 -08:00
John Ralls 75e6a41bd7 Prevent localizing the decimal point in gcc<5.
Apparently gcc V4.8 provides a defective implementation of
std::locale which first doesn't support std::numpunct and second
throws the wrong exception type.

Unfortunately boost::locale isn't a solution because it uses the
gcc facets.

So for now, we don't compile that bit if gcc is too old.
2017-02-20 16:51:06 -08:00
John Ralls cbe52dad34 Merge fetaure-branch 'numeric', provides GncNumeric C++ API. 2017-02-20 16:05:30 -08:00
John Ralls e322457e45 Fix Geert’s code review comments.
Except the big one about string IO not being flexible enough.
2017-02-20 15:50:32 -08:00
John Ralls a193b9a2c1 Fix documentation errors. 2017-02-20 15:50:32 -08:00
John Ralls 0b09b58cf6 Relax comparison test for GncRational::round_to_numeric
To allow for a difference of 1 on very large numbers (>1e16). At the
same time made the test harder with a wider range, skipping cases where
the result overflows. Use GncRational::valid() instead of testing
components for both overflow and NaN.
2017-02-20 15:50:32 -08:00