Commit Graph

28556 Commits

Author SHA1 Message Date
Christopher Lam
cba7da30fd [gnc-date.cpp] specialise iso-8601 parsing where TZ=+0000
- avoid allocating new TZPtr
- parse y/m/d/h/m/s and construct PTime directly
- avoid boost's time_from_string which creates an std::string
2024-03-14 08:48:31 +08:00
Christopher Lam
27c16517e9 [gnc-numeric.cpp] shortcut parsing num/denom as gnc_numeric
The gnc_numeric is serialised as "num/denom" with no whitespace, and
denom > 0. This function takes advantage of std::from_chars to parse
it. The "num" serialisation is also optimised as a free side effect of
this function.
2024-03-11 19:16:06 +08:00
Christopher Lam
11da03bc67 [gtest-gnc-numeric.cpp] test int64 limits for GncNumeric 2024-03-11 19:15:48 +08:00
John Ralls
af18ea598e Bug 799093 - Cannot reconcile since v5.4
Covers the final case where having the reconcile window open and
auto-completing a transaction then deleting the transaction before
committing it leaves the transaction in the reconcile window.

We need to signal that the account is modified even if it isn't
because that's what the reconcile window is watching.
2024-03-11 10:20:02 +01:00
Szia Tomi
97953b6d15
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
po/hu.po: 74.9% (4157 of 5544 strings; 443 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 74.9% (4157 of 5544 strings; 443 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 74.9% (4157 of 5544 strings; 443 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 74.9% (4157 of 5544 strings; 443 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: Szia Tomi <sziatomi01@gmail.com>
2024-03-10 21:01:59 +01:00
Milo Ivir
bd36407011
Translation update by Milo Ivir <mail@milotype.de> using Weblate
po/hr.po: 97.2% (5392 of 5544 strings; 59 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Croatian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hr/

Translation update  by Milo Ivir <mail@milotype.de> using Weblate

po/hr.po: 97.2% (5391 of 5544 strings; 60 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Croatian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hr/

Co-authored-by: Milo Ivir <mail@milotype.de>
2024-03-10 21:01:59 +01:00
Simon Arlott
a56e621b9b
Translation update by Simon Arlott <weblate.simon@arlott.org> using Weblate
po/en_NZ.po: 100.0% (5544 of 5544 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (English (New Zealand))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/en_NZ/

Translation update  by Simon Arlott <weblate.simon@arlott.org> using Weblate

po/en_AU.po: 100.0% (5544 of 5544 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (English (Australia))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/en_AU/

Co-authored-by: Simon Arlott <weblate.simon@arlott.org>
2024-03-07 01:33:01 +01:00
Andi Chandler
3832f598a8
Translation update by Andi Chandler <andi@gowling.com> using Weblate
po/en_GB.po: 100.0% (5544 of 5544 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (English (United Kingdom))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/en_GB/

Co-authored-by: Andi Chandler <andi@gowling.com>
2024-03-07 01:33:01 +01:00
mocsa
2a6d20a33a
Translation update by mocsa <csaba@feltoltve.hu> using Weblate
po/hu.po: 74.8% (4151 of 5544 strings; 448 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: mocsa <csaba@feltoltve.hu>
2024-03-07 01:33:01 +01:00
Christopher Lam
6a87388bc8 [import-main-matcher.cpp] use std::unique_ptr to benefit from RAII
thus gtk_tree_row_reference_free is handled for us.

IIUC this does not significantly affect the effort required to upgrade
to gtk4 or gtkmm.
2024-03-07 08:28:02 +08:00
Frank H. Ellenberger
0511cd1a91 I18N: msgmerge - remove futile C-flags 2024-03-05 15:09:31 +01:00
mocsa
a22591226d
Translation update by mocsa <csaba@feltoltve.hu> using Weblate
po/glossary/hu.po: 100.0% (212 of 212 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/hu/

Translation update  by mocsa <csaba@feltoltve.hu> using Weblate

po/hu.po: 74.8% (4151 of 5544 strings; 448 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by mocsa <csaba@feltoltve.hu> using Weblate

po/hu.po: 74.6% (4140 of 5544 strings; 448 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by mocsa <csaba@feltoltve.hu> using Weblate

po/hu.po: 74.6% (4137 of 5544 strings; 448 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by mocsa <csaba@feltoltve.hu> using Weblate

po/hu.po: 74.6% (4137 of 5544 strings; 449 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: mocsa <csaba@feltoltve.hu>
2024-03-04 21:01:46 +01:00
Laurent Aufrere
6c3da0d578
Translation update by Laurent Aufrere <lecture@cbol.org> using Weblate
po/fr.po: 99.5% (5521 of 5544 strings; 18 fuzzy)
8 failing checks (0.1%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Laurent Aufrere <lecture@cbol.org>
2024-03-04 21:01:46 +01:00
Christopher Lam
fbc6e13af5 [import-main-matcher.cpp] tidy building popup menu 2024-03-03 23:40:08 +08:00
Christopher Lam
5b39abf11d Bug 799246 - import matcher will rename incorrect splits
the gtk_tree_selection_get_selected_rows will return a GList of
GtkTreePath* which is not recommended if the model will be
modified. Return a vector of GtkTreeRowReference* instead.
2024-03-03 23:38:47 +08:00
Szia Tomi
a5d1266c32
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
po/hu.po: 74.3% (4123 of 5544 strings; 458 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: Szia Tomi <sziatomi01@gmail.com>
2024-03-02 00:32:14 +01:00
John Ralls
2db6988e25 Remove bogus include. 2024-03-01 15:31:35 -08:00
John Ralls
7eaa177eae Update minumum Python version to 3.8.
Required to support Python 3.13 and later because the new C API used
in 1d8c525af was introduced in Python 3.8; the previous API was a
holdover from Python 2, deprecated in 3.7, and is removed in 3.13.
2024-02-29 16:12:53 -08:00
John Ralls
8ebac5b596 Bug 799213 - SIGSEGV caused by revising an auto completed transaction
Calling xaccSplitDestroy without also calling xaccSplitCommitEdit then
deleting the split list before calling xaccTransCommitEdit prevents
xaccSplitCommitEdit from being called on the supposedly deleted
splits. Not only does this leak them it leaves them in the book
potentially with a dangling parent pointer.
2024-02-29 14:29:40 -08:00
Szia Tomi
d011f06481
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
po/hu.po: 74.1% (4113 of 5544 strings; 463 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 74.1% (4109 of 5544 strings; 463 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.9% (4100 of 5544 strings; 469 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.8% (4093 of 5544 strings; 475 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: Szia Tomi <sziatomi01@gmail.com>
2024-02-26 23:45:05 +01:00
Christian Wehling
fd9fbfbba3
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
po/de.po: 100.0% (5544 of 5544 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/

Translation update  by Christian Wehling <christian.wehling@web.de> using Weblate

po/de.po: 100.0% (5544 of 5544 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/

Co-authored-by: Christian Wehling <christian.wehling@web.de>
2024-02-26 23:45:04 +01:00
Christopher Lam
6b1944f17b [gnc-plugin-page-register.cpp] input_date to return an optional time64
launches time64 input dialog
2024-02-26 12:02:01 +08:00
Christopher Lam
46aa584ab9 [gnc-plugin-page-register.cpp] rewrite function to avoid goto
reorder logic to avoid using goto
2024-02-26 12:02:01 +08:00
Christopher Lam
8090f1c5b0 [gnc-plugin-page-register.cpp] invoices-from-transaction returns a vector<gncInvoice*> 2024-02-26 12:02:01 +08:00
Christopher Lam
93afa1b3ad [gnc-plugin-page-sx-list.cpp] convert to cpp 2024-02-26 12:02:01 +08:00
Christopher Lam
8582e13e59 [gnc-plugin-page-owner-tree.cpp] convert to cpp 2024-02-26 12:02:01 +08:00
Christopher Lam
1cb3537f94 [gnc-plugin-page-invoice.cpp] convert to cpp 2024-02-26 12:02:01 +08:00
Christopher Lam
804886cb2e [gnc-plugin-page-budget.cpp] convert to cpp 2024-02-26 12:02:01 +08:00
Christopher Lam
c2ec88cacf [gnc-plugin-page-account-tree.cpp] convert to cpp 2024-02-26 12:02:01 +08:00
Christopher Lam
f25b7e658f [gnc-plugin-page-register.cpp] convert to cpp 2024-02-26 12:02:01 +08:00
Christopher Lam
229d9300cf [engine-helpers.h] key is a const char*
thus allowing compilation in cpp with stricter type checking
2024-02-25 22:39:38 +08:00
Christopher Lam
c345fc9d3c add #ifdef __cplusplus extern "C" {} wrappers to .h files 2024-02-25 22:39:38 +08:00
Szia Tomi
68b3f976f4
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
po/hu.po: 73.7% (4089 of 5544 strings; 478 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.7% (4089 of 5544 strings; 478 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.7% (4089 of 5544 strings; 478 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: Szia Tomi <sziatomi01@gmail.com>
2024-02-23 01:33:07 +01:00
John Ralls
b217553cf5 Replace deprecated distutils.sysconfig with sysconfig.
distutils is not present in Python 3.12.2.
2024-02-22 16:13:19 -08:00
Geert Janssens
b9eb550b9a Do a better job of including the -py3 option only for swig 4.1
The previous attempt broke builds with swig older than 4.1
2024-02-22 11:13:59 +01:00
Geert Janssens
cbf89a73be Avoid deprecation warning for -py3 in swig >= 4.1 2024-02-22 10:30:52 +01:00
Geert Janssens
31cc25d1aa Remove non-existing file from POTFILES.in 2024-02-22 10:30:03 +01:00
Christopher Lam
6cb2eeeaa8 Merge branch 'more-engine-cpp' into stable #1866 2024-02-22 07:39:35 +08:00
John Ralls
226bfea108 Fix a bunch of UB errors from ASAN about mismatched function types.
The casts fool the compiler but not the UB sanitizer.
2024-02-20 15:33:11 -08:00
John Ralls
7bd97f15d0 Fix transaction delete use-after-free, take 2.
The problem with take 1 was that the duplicate split uses the same lot
and account pointers without adding itself to those lists, causing
checks in unit tests to fail.
2024-02-20 15:10:05 -08:00
John Ralls
8546aa975e Revert "Fix two use-after-free issues found by address sanitizer."
This reverts commit 4dbf803041.

The use-after free errors are caused by the compiler reordering the
steps in xaccSplitFree and Transaction's do_destroy. Unfortunately the
corrections here caused trouble in other places, leading to test failures.
2024-02-19 21:11:54 -08:00
John Ralls
4dbf803041 Fix two use-after-free issues found by address sanitizer. 2024-02-19 14:33:43 -08:00
John Ralls
fd150243ef Bug 799222 - Crash when changing the parent of an account that has...
had two or more levels of sub-accounts auto-created using the register
in the current session.

Ensure removal of dangling signal handler when the dialog is destroyed.
2024-02-19 14:33:43 -08:00
Christopher Lam
28cc26f207 [gnc-commodities.cpp] gnc_new_iso_codes is a std::unordered_map 2024-02-19 11:21:24 +08:00
Szia Tomi
5cc14d828f
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
po/hu.po: 73.7% (4088 of 5544 strings; 478 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.6% (4082 of 5544 strings; 481 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.5% (4079 of 5544 strings; 484 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.4% (4071 of 5544 strings; 491 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.3% (4069 of 5544 strings; 492 fuzzy)
3 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 73.2% (4059 of 5544 strings; 498 fuzzy)
3 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: Szia Tomi <sziatomi01@gmail.com>
2024-02-18 23:45:02 +01:00
Geert Janssens
00640f9ded Replace naked for loops with C++ algorithms 2024-02-18 23:18:16 +08:00
Geert Janssens
0732436e44 A few NULL/nullptr related cleanups 2024-02-18 23:18:16 +08:00
Christopher Lam
17f422f97c [gnc-commodity.cpp] convert quote_sources to vector
- all quote sources are now vector
- get_quote_source_from_type to convert QuoteSourceType to vector<gnc_quote_source>
- the quote sources are modifiable, therefore cannot be const:
see gnc_quote_source_set_fq_installed
2024-02-18 23:17:55 +08:00
Szia Tomi
a6d41aaaa7
Translation update by Szia Tomi <sziatomi01@gmail.com> using Weblate
po/hu.po: 73.0% (4051 of 5544 strings; 506 fuzzy)
3 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Translation update  by Szia Tomi <sziatomi01@gmail.com> using Weblate

po/hu.po: 72.8% (4041 of 5544 strings; 515 fuzzy)
9 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: Szia Tomi <sziatomi01@gmail.com>
2024-02-17 23:44:23 +01:00
gallegonovato
a81773b095
Translation update by gallegonovato <fran-carro@hotmail.es> using Weblate
po/es.po: 100.0% (5544 of 5544 strings; 0 fuzzy)
2 failing checks (0.1%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2024-02-17 23:44:22 +01:00