Commit Graph

16623 Commits

Author SHA1 Message Date
John Ralls
50bb5c162a Remove "FIXME" comments about KvpFrame in SX-ttinfo.c.
SX splits and regular splits have different requirements for Kvp. A
regular split's Kvp contains information that applies to that one split
alone so it would be a mistake to propagate it into SX. Meanwhile the SX
split puts its formulas in Kvp, and we certainly don't want those going
into regular splits.
2015-07-03 17:13:11 -07:00
John Ralls
cadd1976df Remove kvp-utils.
No longer required.
2015-07-03 17:13:11 -07:00
John Ralls
c941a52a9f Copy GHash/KVP functions from kvp-util to the one place they're used. 2015-07-03 17:13:11 -07:00
John Ralls
c2d44b89fb Replace Scrub2 direct KVP access with Split lot-guid accessors. 2015-07-03 17:13:11 -07:00
John Ralls
d86a0b2378 Replace the lot-split and peer_guid properties with accessor functions.
The properties weren't backwards compatible with existing books, nor
would they work in the multiple-peers case.
2015-07-03 17:13:11 -07:00
John Ralls
db5317f80f Rewrite the gnc_kvp_bag functions in qofinstance.
They were over general and were used in only one place not in QOF.
2015-07-03 17:13:11 -07:00
John Ralls
1bd6afe384 Move KVP_TYPE_BOOLEAN to the end of the enum.
So that it doesn't change the numeric values of other entries, which
would introduce a database incompatibility.
2015-07-03 17:13:11 -07:00
John Ralls
ac29ad3cef Remove direct query of KVP.
Wasn't actually used anywhere, and it's not something we want to
support.
2015-07-03 17:13:11 -07:00
John Ralls
45e41a07b1 Convert gnc-budget, gnc-lot, and gncJob to qof_instance_foo_kvp. 2015-07-03 17:13:11 -07:00
John Ralls
39c521512b Provide qof_instance_has_kvp(); used for feature testing. 2015-07-03 17:13:11 -07:00
John Ralls
97b44a71ec Convert all Split kV operations to use qof_instance_foo_kvp().
Except for clearing the KVP Frame, which we do by calling qof_instance_dispose().
2015-07-03 17:13:11 -07:00
John Ralls
97031fa62a Correct the kvpvalue type for lot-split in test_xaccSplitOtherSplit. 2015-07-03 17:13:11 -07:00
John Ralls
eccdfd0aa3 Convert all Transaction KVP operations to use qof_instance_foo_kvp. 2015-07-03 17:13:11 -07:00
John Ralls
542557724c Convert almost all Account KVP operations to use qof_instance_foo_kvp.
Can't do the import-matcher stuff, it's a bit too hard-wired to KVP.
2015-07-03 17:13:10 -07:00
John Ralls
c9785be334 Provide qof_instance_copy_kvp, qof_instance_swap_kvp, and qof_instance_compare_kvp.
To facilitate abstracting all kV operations to libqof/qof.
2015-05-08 13:31:56 -07:00
John Ralls
32d4fff366 Implement KVP_TYPE_BOOLEAN
In terms of KVP_TYPE_STRING such that TRUE->"true" and FALSE->NULL. This
provides compatibility with the existing boolean KVP in Account.c.
2015-05-07 16:12:54 -07:00
John Ralls
31cfa0a9f0 Merge branch 'maint' 2015-06-30 12:42:36 -07:00
John Ralls
3d8b58a1be Change gtkmacintegration-gtk2 include directory back to gtkmacintegration.
As of gtk-mac-integration-2.0.8.
2015-06-30 12:33:25 -07:00
Alex Aycinena
5fdf14f8cb Book-Currency Feature Step 3
Add an option to the File->Properties dialog to select a Currency Accounting Method, and to specify the book-currency and a default gains/loss policy if the 'book-currency' method is selected.
Revert some changes made in prior commits. Other than storing and retrieving the
book-currency and policy in book KVPs, the behavior of gnucash has not been
affected by these changes. The changes made are:

     engine/policy.c & .h - define valid policies and their descriptions
         and hints; define functions gnc_get_valid_policy_list and
         gnc_valid_policy
     engine/engine.i - include policy.h; define 'CURRENCY-ACCOUNTING',
         'BOOK-CURRENCY', and 'DEFAULT-GAINS-POLICY' as option names
     engine/test/utest-Split.cpp - revert prior commit that modified test
         function for trading accounts
     engine/test/utest-Transaction.c - revert prior commit that modified test
         function for trading accounts
     libqof/qof/qofbookslots.h - revert prior commit that defined Currency
         Accounting Method; modify definitions of Currency Accounting and Book
         Currency; add definition of default gains policy; keep the previous
         Trading Accounts definition
     libqof/qof/qofbook.cpp & .h - reverted function to determine currency
         accounting method; add function to get book-currency, revert
         previously committed changes to function to determine if book uses
         trading accounts; add function to get gains policy; modify gobject
         properties accordingly
     libqof/qof/test/test-qofbook.c - revert prior modification to test
         function for trading accounts; define tests for book-currency and
         default gains policies
     app-utils/options.scm - define make-currency-accounting-option and
         required support functions
     app-utils/options-util.c & .h - make support functions of
         make-currency-accounting-option available in c code
     app-utils/test/test-options-util.c - include tests for using book-currency
     app-utils/gnc-ui-util.c & .h - define gnc_book_use_book_currency,
         gnc_book_get_book_currency and gnc_book_get_default_gains_policy
         functions
     app-utils/test/test-gnc-ui-util.c - set up tests for new gnc-ui-util
         functions
     app-utils/test/test-app-utils.c - include test-gnc-ui-util.c
     app-utils/test/Makefile.am - include test-gnc-ui-util.c
     app-utils/app-utils.scm - define and export book options for Currency
         Accounting, Book-Currency and Default Gains Policy; export required
         currency-accounting-option support functions
     app-utils/business-prefs.scm - replace the Trading Accounts boolean option
         with a currency-accounting-option and rearrange the order of the
         options
     gnome-utils/dialog-options.c - define functions for set-ui-widget,
         set-ui-value, and get-ui-value for 'currency-accounting' option and
         various other support functions
2015-06-27 16:06:56 -07:00
John Ralls
757a50c9ec Release 2.6.7 2015-06-27 11:31:44 -07:00
John Ralls
df6326f7f3 Get latest translations from the Translation Project. 2015-06-27 10:44:44 -07:00
John Ralls
06d5d0a20a Change the Glib version test for C-standard to a compile check.
The actual problem occurred in only a couple of Glib releases before
being reverted.
2015-06-18 15:02:30 -07:00
Geert Janssens
e67e512501 Bug 681225 - income statement displays blank base currency entries when trading account transactions are present during the report period
Skip splits in trading accounts when calculating
average cost price source.
2015-06-16 21:38:14 +02:00
Geert Janssens
8dc91cf764 Bug 739271 - pt_BR translation wrong word "limpesa". Should be "limpeza" 2015-06-15 23:00:49 +02:00
Geert Janssens
aa8af8a196 Bug 744858 - Update exchange rate on bill only possible once per session (after unpost/repost)
New behaviour is that each time a bill is (re)posted
all the needed exchange rates will be asked.
If an exchange rate was already known, it is suggested
to the user, so s/he can simply confirm it if still ok.
2015-06-15 22:28:36 +02:00
Mark Haanen
f0079e8b4d Updated Dutch translations
From the translation project
2015-06-13 17:54:02 +02:00
Geert Janssens
81dace1751 Bug 746792 - process payment in foreign currency leads to broken equation
To avoid confusion the payment dialog will now display the currency
to interpret the amount fields in.
2015-06-13 17:54:01 +02:00
Geert Janssens
ec8ed38860 Bug 746792 - process payment in foreign currency leads to broken equation
The payment dialog was inconsistent in interpreting amounts and values.
By clicking on documents the document's amount is added to the Payment field
suggesting it's in the owner's currency. However the post-processing code
took that amount as being the amount in the transfer accounts currency
and calculated the rest backwards.
This will now become: the amount fields are interpreted in the owner's currency
and the exchange rate asked will be from owner's currenty to transfer
account's currency.
2015-06-13 17:54:01 +02:00
John Ralls
9343ebe9e4 Merge branch 'maint' 2015-06-09 14:51:21 -07:00
John Ralls
9914a046d7 src/app-utils/gfec.a requires _XOPEN_EXTENDED, defined by -std=gnu99. 2015-06-07 11:59:05 -07:00
Mike Evans
240e36f73b Bug 734183 - Set value to zero before calling gnc_exp_parser_parse. 2015-06-02 10:33:35 +01:00
John Ralls
fefec86f64 Remove stray quote that ate all the CFLAGS. 2015-05-31 17:45:07 -07:00
Geert Janssens
f160937681 Bug 746163 - Custom register colors (table rows) not recognized from .gtkrc-2.0.gnucash file
Change the preference label and description to avoid confusion.
Translators: this patch introduces two updated strings.
2015-05-31 10:08:03 +02:00
Joe Hansen
073c7a69ad Updated Danish translation
Copied from the translation project
2015-05-29 22:46:57 +02:00
John Ralls
80034b39bc Refine forcing C11 to handle case where AC_PROG_CC_C99 doesn't set -std= 2015-05-25 11:06:50 -07:00
John Ralls
b9de55c871 Change gtkmacintegration-gtk2 include directory back to gtkmacintegration.
As of gtk-mac-integration-2.0.8.
2015-05-24 18:05:04 -07:00
John Ralls
54bf84af0e Force -std=c11 when compiling against GLib-2.44 or greater.
Required for new G_DECLARE_INTERFACE macro.
2015-05-24 18:02:24 -07:00
John Ralls
8232927204 Fix compile failures on latest version of MinGW. 2015-05-22 20:59:06 -07:00
John Ralls
847e2c2717 Ensure BOOST_CPPFLAGS are included for boost test.
Necessary on Windows due to non-standard installation paths for dependencies.
2015-05-22 13:26:38 -07:00
Geert Janssens
79139c8869 Fix hidden panes in lot viewer 2015-05-16 10:44:59 +02:00
John Ralls
8a77e139ce Better check for C++11 compile error in custom_time_zone.hpp
It turns out that F20's boost-1.53 already has this fixed, so set the
boost version to 1.53 and test for the actual problem.
2015-05-11 16:55:15 -07:00
John Ralls
d0fc57a5a7 Change minimum boost version to 1.55
There was a C++11 compilation bust in
date_time/local_time/custom_time_zone.hpp, which was fixed in that
version. Since we also require C++11, that makes it the minimum
necessary.
2015-05-11 12:32:24 -07:00
John Ralls
e68c7eb959 Fix narrowing error with 32-bit time_t. 2015-05-10 16:52:35 -07:00
John Ralls
03d2ff1d44 Fix errant deletion of -I. 2015-05-08 15:24:20 -07:00
Geert Janssens
5a4a8ac5d6 Bug 746873 - Gnucash asks sql passwords before wallet password
Work around a bug in libsecret. Under certain conditions
libsecret will silently fail to find a password even though
it is stored. The workaround uses another interface call
to force unlocking the secret store which works around the bug.
This workaround should be removed once a fix for
https://bugzilla.gnome.org/show_bug.cgi?id=748625
will be commonly available.
2015-05-08 21:44:00 +02:00
Geert Janssens
f604348d9b Bug 746873 - Gnucash asks sql passwords before wallet password
If libsecret is available use it to search for both
libsecret based passwords as gnome-keyring based ones.
This catches the situation where a password was stored
earlier using gnome-keyring, while the user is now trying
to retrieve it on a system that only has libsecret available.
This used to fail because gnucash depended on gnome-keyring
to be present in that situation.
2015-05-08 21:29:34 +02:00
Mike Alexander
0017aa6edc Support version 3 tzfile format which is almost the same as version 2.
See ftp://ftp.iana.org/tz/code/tzfile.5.txt.
2015-05-07 03:15:28 -04:00
Mike Alexander
541c779a13 Use the correct size for time offsets when parsing a tzfile.
A version 1 tzfile alwasy has 4 byte offsets and a version 2 has
8 byte offsets in the second half of the file.
2015-05-07 03:15:21 -04:00
John Ralls
d4c537a9a5 Merge branch 'boost-date'
Fix a couple more bugs which manifest on Fedora.
2015-05-04 15:54:45 -07:00
John Ralls
577aa3fe02 Catch out-of-range exception at beginning and end of TZFile on Fedora. 2015-05-04 15:54:07 -07:00