Commit Graph

16661 Commits

Author SHA1 Message Date
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
John Ralls
0b55c746c8 Link libgtest to test-kvp-value on Fedora. 2015-05-04 15:54:07 -07:00
John Ralls
42cca36445 Merge branch 'boost-date'
Some fixes plus GncDate::format().
2015-05-04 15:06:54 -07:00
John Ralls
90f0d9952c Set gmock_root to gmock_src_path if the latter is detected.
Otherwise configure thinks gmock isn't installed.
2015-05-04 15:05:53 -07:00
John Ralls
725622f613 Ensure we compile C for at least C99. 2015-05-04 15:05:53 -07:00
John Ralls
ccbfeb3799 Reimplement qof_date print functions with GncDate::format() 2015-05-04 15:05:52 -07:00
John Ralls
269bb510fb Implement GncDate::format()
Analog of GncDateTime::format().
2015-05-04 15:05:52 -07:00
John Ralls
2b84dfae8d Remove some noisy comments.
That duplicate the Doxygen comments in the header.
2015-05-04 15:05:52 -07:00
John Ralls
e1e4391b03 Remove unused gnc_timezone function. 2015-05-04 15:05:52 -07:00
John Ralls
f4451ff57d Remove gnc_gdate_range_check.
Since GncDate and GncDateTime will have the same limits it's not
necessary.
2015-05-04 15:05:52 -07:00
Benjamin Melançon
7c42908b13 Update README to refer to Git rather than SVN 2015-05-03 16:13:20 -07:00
John Ralls
9ea1dd0fac Merge branch 'boost-date'
First merge, which replaces GDateTime with GncDateTime. GncDateTime is
implemented as a PImpl to a wrapper class for boost::date_time. A skeleton
implementation of GncDate is included. More work on that will go into the
next merge.
2015-05-02 17:40:33 -07:00
John Ralls
280589a33e Adjust some tests for 64-bit.
The libc time functions are apparently not too smart about applying
timezones to date-times, using the current TZ info rather than the
one that applies to the date.

Formatting is a bit variable as well when localization is applied,
so test with the locale format when appropriate.
2015-05-02 17:39:05 -07:00