Commit Graph

1335 Commits

Author SHA1 Message Date
Christopher Lam
8f845df934 Factor out make_period_[data|note]_path 2022-03-02 07:36:59 +08:00
Christopher Lam
919f392c7a Use kvp C++ interface rather than GValue 2022-03-02 07:36:59 +08:00
Christopher Lam
6c4c2512db Use C++ STL instead of GLib 2022-03-02 07:36:59 +08:00
Christopher Lam
9088acabd8 [gnc-budget.cpp] convert to c++ 2022-03-02 07:13:24 +08:00
Christopher Lam
8bc080b96d [gnc-budget] store budget kvp data onto memory upon first call.
then each getter will retrieve from memory rather than backend's kvp.
2022-01-17 09:34:46 +08:00
Christopher Lam
ef8d812d3f [utest-Budget] test data retention when modifying budget num_periods 2022-01-17 09:31:28 +08:00
Christopher Lam
c3eaff9bb2 [account.cpp] gnc_account_and_descendants_empty: don't copy children 2021-12-13 21:48:44 +08:00
Kevin M. Buckley
1e22632687 Bug 798382 - Typo corrections in comments 2021-12-12 09:50:48 -08:00
John Ralls
95b973f792 Bug 798352 - Decimal Precision when Entering Mutual Fund Transaction
Let xaccParseAmount parse up to 12 decimal places instead of 8.
2021-12-09 15:55:37 -08:00
Christopher Lam
33b6dfc6ce [options.scm] addendum ca6604c93 gnc:make-budget-option
selection-budget changed from budget object to guid, handle other uses
as appropriate.
2021-12-04 20:35:04 +08:00
Christopher Lam
ca6604c93c [options.scm] Addon previous commit... need to initialize with guid 2021-12-04 08:59:14 +08:00
Christopher Lam
d740ac1cb0 Merge branch 'budget-option-stores-guid' into maint PR #1207 2021-12-04 08:24:10 +08:00
John Ralls
5c7967c4a5 Revert "Merge Stefan Bayer's 'SepaInternalTransfer' into maint."
This reverts commit 17a3f7fef2, reversing
changes made to b8458d0732.
2021-12-03 13:58:07 -08:00
John Ralls
ae7eaad018 Merge Chris Good's 'maintBug797678OfxAppend' into maint. 2021-12-03 13:44:50 -08:00
John Ralls
17a3f7fef2 Merge Stefan Bayer's 'SepaInternalTransfer' into maint. 2021-12-03 13:11:28 -08:00
Christopher Lam
5a812ca1eb [options.scm] gnc:make-budget-option stores guid instead of object
because object may become stale if UI is used to delete it, leading to
stale pointer and segfault. storing guid is safer, and will return
null if budget is deleted.
2021-12-04 01:37:08 +08:00
John Ralls
ff04ad3785 Bug 798346 - crashes when running check & repair
Don't scrub trading accounts for imbalances, see the comment in
the commit for why.
2021-11-08 18:06:29 -08:00
Christopher Lam
984d816a58 Merge branch 'maint' 2021-11-06 21:41:17 +08:00
Christopher Lam
79d8ef0299 Revert b5f5129f7 using gnc_list_length_cmp 2021-11-02 23:34:26 +08:00
Christopher Lam
3dfdf60608 [gnc-glib-utils] Define and export gnc_list_length_cmp 2021-11-02 23:34:25 +08:00
Christopher Lam
b5f5129f7d Shortcut g_list_length comparison against small numbers
It's more efficient to test node && node->next etc when testing GList
length against small numbers
2021-10-30 22:29:17 +08:00
Christopher Lam
f813f7cd14 [gnc-autoclear] Move autoclear algorithm into gnome-utils 2021-10-28 21:41:46 +08:00
goodvibes2
8ad29feaba Bug797678 OFX import should append not replace, existing Notes & Desc
Add an "Append" checkbox to the bottom of the "Generic import
transaction matcher" window to the left of the "Reconcile after match"
checkbox.
When ticked, this causes the imported Description/Notes to be appended
to the matched transaction Description/Notes respectively.
The selected ticked/unticked state of the "Append" checkbox is saved in
a key value pair for the import account, so the next import for that
account will automatically default it to the saved state.
As these mods are limited to the code for the matcher window, this
should work for all the imports that use it - ie ofx & csv file imports
(both tested) & aqbanking (cannot test).
2021-10-28 10:58:07 +11:00
Geert Janssens
bdb06479e8 GSettings - fix GObject warning when old prefs-version is unset
This will happen when current master (future 5.0) has been run
at least once.
2021-10-27 10:35:11 +02:00
John Ralls
5a8cbf4193 Bug 798325 - New Currency for Venezuela (VED)
Add latest Venezuelan revaluation of the Bolivar Soberano, following
the ISO notation replacing VES (which the Venezualan central bank is
keeping) with VED and the exchange code (ditto) with 926.
2021-10-23 12:27:11 -07:00
Christopher Lam
f40dbb8c28 Avoid unnecessary g_list_length in equality functions 2021-10-21 17:56:15 +08:00
Christopher Lam
f0970c8eb4 [gnc-features] don't repeatedly g_strconcat gchars* 2021-10-20 19:29:32 +08:00
Christopher Lam
31a0300abe [Recurrence.c] avoid repeated calls to g_list_length 2021-10-20 19:29:26 +08:00
Christopher Lam
b480600dc8 [gnc-pricedb] gnc_price_list_equal: avoid 4 g_list_length calls 2021-10-18 22:41:44 +08:00
Christopher Lam
23e528f51a [utest-gnc-pricedb] add tests for gnc_price_list_equal
Also need to change PWARN which causes test failure, to PINFO
2021-10-18 22:25:21 +08:00
Geert Janssens
09b3ce2382 Revert "Add structure to map migrated preferences to old ones"
This reverts commit c6103a5c17.
2021-10-16 19:02:17 +02:00
Geert Janssens
806d0b3157 Revert "GSettings - make most of the api private"
This reverts commit 26b2d7ca78.
2021-10-16 19:02:10 +02:00
Geert Janssens
1d4673ed2a Revert "GSettings - rework internal helper functions to use more C++"
This reverts commit 24fa289952.
2021-10-16 19:02:04 +02:00
Geert Janssens
24fa289952 GSettings - rework internal helper functions to use more C++ 2021-10-16 10:49:05 +02:00
Geert Janssens
26b2d7ca78 GSettings - make most of the api private
All preference calls should happen via the gnc_prefs_... apis.
The gnc_gsettings_... apis are an internal implementation of this.
2021-10-16 10:49:04 +02:00
Geert Janssens
c6103a5c17 Add structure to map migrated preferences to old ones
This can be used to keep both in sync in the period between
initial migration and eventual obsolence.
Note only non-obsoleted, migrated preferences are tracked.
We don't want to resync preferences that have been
obsoleted (reset). That would nullify the whole idea
of making them obsolete for future removal.

This commit only adds the mapping, synching will follow in a future
commit.
2021-10-16 10:49:04 +02:00
John Ralls
2f4438ab28 Bug 798335 - No longer possible to change trading account
Strip trading splits only if "Use Trading Accounts" is enabled
for the book so that users who want to manage trading accounts by
hand may do so.
2021-10-14 17:22:32 -07:00
Christopher Lam
9eaa3eb23a Merge branch 'maint' 2021-10-14 09:34:28 +08:00
John Ralls
7c9c2eba3c Bug 798320 - Error message indicating a crash of GNUcash when closing...
application - MacOS 10.15.7 (19H1419)

Destruction order problem: The SX template accounts can't be destroyed
until after the template splts and transactions are.

Register them before the transactions and splits, as destruction occurs
in reverse order of registration.
2021-10-08 14:17:28 -07:00
Geert Janssens
e64bcfe620 Merge branch 'maint' 2021-10-01 14:51:04 +02:00
Geert Janssens
9a465fc359 GSettings - add 'deprecate' and 'obsolete' conversions for user preferences
'deprecate' is technically a noop. It serves to remind maintainers
the 'deprecated' preference is to be obsoleted in the next major
release.
'obsolete' goes one step further in that it will cause gnucash to reset
the preference, effectively clearing the value stored in the preferences
backend. This is the final phase of a preference. Following this it
will be completely removed from the GSettings schema in the next
major release.

Notes
* 'deprecate' and 'migrate' are related. Both are a reminder the
preference is to be obsoleted in the next major release. 'deprecate'
does only that though while 'migrate' will also trigger a copy of
the old value to a new location in the databse.

* This commit readds a couple of preferences that had been removed
in the past to be able to properly obsolete them (and to test
the obsoleting code)
2021-10-01 14:46:55 +02:00
Geert Janssens
64576f7d27 GSettings - widen scope from 'migration' to 'transformation'
This commit mostly changes descriptions and variable names to
use the more generic terms 'transformations' or 'conversions'.
'migration' is only one possible transform, future commits will
add others.
There are no functional changes in this commit other than
a logic inversion in parse_one_release_node. It now checks
for nodes named 'migrate' rather than for nodes not named
'migrate' (the code is adapted accordingly to match this
logic change).
2021-10-01 13:59:55 +02:00
John Ralls
29e7b07ed3 Remove superflous schema_source left over from pasting. 2021-09-28 17:17:23 -07:00
John Ralls
8bfa5a63f2 [gsettings] Avoid crash from settings schema not being registered. 2021-09-28 11:00:05 -07:00
Christopher Lam
10c1223df2 Merge branch 'maint-progress' into maint #1150 2021-09-27 08:10:02 +08:00
Geert Janssens
2a7566cc40 Win32 - drop conditional code never reached
We had hardcoded HAVE_HTMLHELPW to always be true so the fallback
code that's only reached when it is false was never reached.
Time to drop this dead code.
2021-09-26 22:58:08 +02:00
John Ralls
67191203ae Merge branch 'maint' 2021-09-26 10:46:06 -07:00
Christopher Lam
d82bb7b8a2 [Transaction.c] use is_unset static to denote uncached readonly_reason
tests in 128c8d6f88
2021-09-26 09:40:32 +08:00
Christopher Lam
128c8d6f88 [utest-Transaction] add tests for xaccTransGetReadOnly 2021-09-25 13:27:56 +08:00
Geert Janssens
8ea52ae212 GSettings - run data model transations while setting up
This makes sure all schema changes are in effect before
the first consumer can query them. For example this will
prevent a one-time re-occurrence of the tip of the day dialog
the first time the new migrations are run.
2021-09-22 15:44:30 +02:00