Commit Graph

1866 Commits

Author SHA1 Message Date
Geert Janssens
99506d331a Reduce GncImportMatchMap to just the account
There is no added value in storing the book and account together
The book is easily retrieved from the account (as was
illustrated in the gnc_account_imap_new function).

I looked through the commit history to understand why this struct
was originally created and a long time ago it also had
a reference to a kvp frame.
2023-02-04 16:53:20 +01:00
Geert Janssens
51706f289c Minor corrections in comments 2023-02-04 16:43:46 +01:00
Christopher Lam
119356752f Merge branch 'maint' 2023-01-30 09:56:13 +08:00
Geert Janssens
894f8241e1 Revisit invoice payment in multi-currency context
- Show proper amount in dialog when applying or editing an existing transaction as payment
- Be more careful not to waste the existing payment split
- If the user changed the payment amount while starting from an existing transaction
  unreconcile the changed payment split
- Avoid needlessly changing transaction currency (only do so if the user chose
  a new transfer account and the old currency is neither the new transfer account's
  currency nor the post account's currency)
2023-01-29 23:09:06 +01:00
John Ralls
44f4b55927 Merge Richard Cohen's 'fix-memleaks' into master. 2023-01-26 12:52:21 -08:00
Richard Cohen
846e75146a Fix some typos so that the correct tests are run
- test_gnc_txn_to_float_txn_cut_semantics
- test_dbi_business_store_and_reload
2023-01-26 15:42:13 +00:00
Richard Cohen
a2ffc7fe75 Fix memory leak in binreloc function _br_find_exe()
Ironically, it seems to be in a code path that
is only followed when using valgrind
2023-01-26 14:36:43 +00:00
luzpaz
67ab9e90d2 Fix some typos 2023-01-26 13:48:58 +01:00
Christopher Lam
17820ec261 Merge branch 'maint' 2023-01-26 18:40:44 +08:00
John Ralls
f4c6d65395 Merge Bob Fewell's 'nofree' into maint. 2023-01-24 13:25:02 -08:00
John Ralls
f6919e60a7 Merge Richard Cohen's 'cleanup' into master. 2023-01-24 12:05:47 -08:00
John Ralls
46f9fb01c9 Simplify gnc_commodity equality and compare functions.
gnc_commodity_compare is used for sorting and so needs to have a less-than
return value. The only place it's used presents nothing to the UI; a GncGUID
ordering is fast and stable.

GnuCash allows only one commodity per book for any namespace/mnemonic pair, so
the exhaustive string comparisons are superflous. While the current engine
design allows only one instance of any object, meaning that a pointer comparison
is sufficient to determine equality, that may not be true in the future, but the
GncGUID is guaranteed to sufficiently identify a single commodity. Note that
gnc_commodity_equiv is used to enforce that single-commodity rule and so cannot
use GncGUID comparison.
2023-01-24 10:46:01 -08:00
Richard Cohen
6927535a0a Remove unused test function get_object_is_initialized in qofobject.cpp 2023-01-24 13:36:37 +00:00
Richard Cohen
925fcbc3fd Remove unused gnc-jalali.{c,h} 2023-01-24 13:36:23 +00:00
Richard Cohen
e83c91050c Remove unneeded dummy.cpp 2023-01-24 13:36:02 +00:00
Richard Cohen
d6ac56ce5f Re-enable -Waddress - gncInvoiceLookup etc. are now inline functions, not macros
- Remove outdated comments
2023-01-24 13:35:22 +00:00
Richard Cohen
3360a6d13b Remove extra semicolons
Courtesy of gcc -pedantic
2023-01-24 13:22:18 +00:00
John Ralls
046e4a156e Silence Clang deprecation warnings about sprintf. 2023-01-23 12:54:25 -08:00
John Ralls
dd2497416c Merge Richard Cohen's 'internal-extern-c' into master. 2023-01-23 11:27:05 -08:00
John Ralls
60c06debce [c++options] Don't crash when find_option returns nullopt. 2023-01-23 11:22:35 -08:00
Richard Cohen
1cec0cb3f3 Use internal extern "C" { ... } for C++
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
2023-01-23 18:40:01 +00:00
Richard Cohen
19bbde7000 Fix some typos 2023-01-23 15:01:46 +00:00
John Ralls
432f2d4bb8 Merge Richard Cohen's suppress-boost-warning into master. 2023-01-22 10:50:11 -08:00
John Ralls
9a1a90d8d0 Merge branch 'maint' 2023-01-22 10:49:29 -08:00
richardcohen
f3cc223f5f Fix some bad code formatting 2023-01-22 10:39:48 -08:00
richardcohen
8044f79f75
Silence the boost (<1.76) warning message
from .../gnucash-4.8/libgnucash/app-utils/gnc-quotes.cpp:33:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message:

    The practice of declaring the Bind placeholders (_1, _2, ...) in the
    global namespace is deprecated.
    Please use <boost/bind/bind.hpp> + using namespace boost::placeholders,
    or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
    
The issue was fixed in boost 1.76, but, e.g ubuntu 22.04 has boost 1.74
2023-01-22 17:50:34 +00:00
Christopher Lam
fd007a0af1 Merge branch 'maint' 2023-01-13 07:45:31 +08:00
Robert Fewell
6df866f876 Add tests for the reconcile account functions 2023-01-12 14:38:08 +00:00
Robert Fewell
fd37ee997d Fix getting xaccAccountGetReconcilePostponeBalance
Change the G_VALUE from a INT64 to BOXED.
2023-01-12 14:38:08 +00:00
John Ralls
fb9947b7b6 Rename GncDateTime's ymd to gnc_ymd to avoid a name conflict with Carbon. 2023-01-09 14:36:06 -08:00
John Ralls
fed4daf4e7 [c++ quotes] Make sure to include all of the required Boost libraries.
Also Boost-iostreams needs winsock but doesn't tell Cmake, so explicitly
add it to the link list.
2023-01-08 16:11:58 -08:00
Christopher Lam
c65b36490a Merge branch 'master-progress' 2023-01-06 16:33:46 +08:00
Frank H. Ellenberger
506a1b3c5e Merge branch 'maint' 2023-01-06 01:31:13 +01:00
Alex Aycinena
1085d8920b Update Form/Schedule line references for 2022 for the US Income Tax Report 2023-01-04 16:58:57 -08:00
John Ralls
b922cfd78d Bug 798679 - Unicode normalization should be used for comparison but not stored.
Change to NFC normalization for all comparisons because the Unicode
meaning of compatible might collide with the user's intent.
2023-01-04 13:19:36 -08:00
John Ralls
31d79e3004 Merge Bob Fewell's 'bug798673' into master. 2022-12-30 16:00:12 -08:00
John Ralls
5c17950a59 Merge Bob Fewell's 'mainwin2' into master. 2022-12-30 13:56:54 -08:00
Christopher Lam
259881f940 [gnc-optiondb] add some more renamed options
following ab13b01f8c Replace ... with … in all translatable strings.
2022-12-24 22:14:35 +08:00
John Ralls
ab13b01f8c Replace ... with … in all translatable strings.
Also a few other places like translator comments and report options.

Replaces https://github.com/Gnucash/gnucash/pull/1033.
2022-12-23 12:43:54 -08:00
Geert Janssens
734f90bd36 Replace string literal 'gnucash' with PROJECT_NAME parameter where it makes sense
The idea behind this is to not assume the project is always built
as "gnucash" exactly.
One example where it can be useful to use a different project name
would be when building multiple development versions of the project
on the same system and don't want these different versions share
the same settings in GSettings or the same stored passwords.
2022-12-19 22:18:12 +01:00
John Ralls
b8c0673526 Merge branch 'maint' 2022-12-19 12:11:32 -08:00
Robert Fewell
7536fcaf2f Change the balance limit icon if both limits are zero
When higher and lower limits are zero, when used for a a suspense
account, change the icon to 'dialog-warning'. This type of use is to
indicate that a non zero balance exists.
2022-12-17 11:44:45 +00:00
John Ralls
091d4aff22 Bug 798657 - Import Summary language is wrong
Root cause is using boost::locale::translate because it ignores
the LANGUAGES environment variable and doesn't support different
values for LC_MESSAGES, LC_DATE, LC_MONETARY, and LC_NUMERIC.
That makes it impossible to configure a user environment that
presents translated strings in a different locale from the one
applied to formatting dates and numbers.

To correct this replace all use of boost::locale::translate
with GNU gettext.
2022-12-16 15:34:10 -08:00
Robert Fewell
3be25ff0a9 Add some tests for the account functions 2022-12-16 15:16:58 +00:00
Robert Fewell
a15c6f81b3 Allow the balances of sub accounts to be used in limits 2022-12-16 15:16:53 +00:00
Robert Fewell
60ab654d2b Add account balance test functions to gnc-ui-balance 2022-12-16 15:16:16 +00:00
John Ralls
73a134730f Bug 798680 - Not able to match a reverse transaction of a...
previously matched transaction.

Cloned transactions and copied splits shouldn't keep the online-id
slot.
2022-12-13 13:13:13 -08:00
John Ralls
b4bab92da2 Bug 798664 - Result of 'gnucash --nofile' is marked dirty
Don't create a new book in the new-user dialog unless the user says to.
Don't automatically create a new book when retrieving default commodities
because the retrieve might be requested in a context like the Preferences
dialog when there is no book.

Some report tests relied on requesting the default commodity creating
the book, so in those tests ensure that the book is created first.
2022-12-12 11:30:59 -08:00
John Ralls
fae5de80d3 Undo unintended change in Bug 798679 commit. 2022-12-11 19:54:35 -08:00
John Ralls
fd2761bd68 Bug 798679 - Fullwidth characters cannot be pasted as-is in register fields
Control character check doesn't need normalization, the control character
codepoints aren't graphic and so can't be composed nor have compatible
equivalents.
2022-12-11 13:00:40 -08:00