Commit Graph

27568 Commits

Author SHA1 Message Date
Christopher Lam
cb5a9acf76 [dialog-payment] plug some GLists leaks
and tidy up
2023-04-08 16:53:19 +08:00
Christopher Lam
5ebb544719 [csv-export-helpers] include header 2023-04-07 23:35:23 +08:00
Christopher Lam
5dc0b8271a [csv-transactions-export] fix category in export with simple layout
If Trading accounts is enabled, and the transaction is a transfer
between two accounts of differing commodities, the CSV simple-layout
export would incorrectly show "--Split Transaction--" as the
category.

This commit changes the algorithm to ignore the trading splits when
determining the other split account, thereby returning a more useful
other account name.
2023-04-07 20:41:19 +08:00
Christopher Lam
229efb52ed [csv-export-helpers] move account_get_fullname_str to support file 2023-04-07 20:41:19 +08:00
Christopher Lam
e5349a8b36 Merge branch 'csv-tree-export-cpp' into stable #1598 2023-04-05 21:37:38 +08:00
Christopher Lam
db085ec457 [csv-transactions-export.cpp] convert to cpp, use fstream
- using std::ofstream
2023-04-05 20:37:12 +08:00
Christopher Lam
cb8cdd1b99 [csv-tree-export.cpp] convert to cpp, use fstream 2023-04-05 20:37:12 +08:00
Christopher Lam
e6352f5497 [csv-export-helpers.cpp] helper function and full test suite 2023-04-05 20:37:12 +08:00
Christopher Lam
5236f33709 Merge branch 'plug-scm-to-utf8-string-leaks' into stable #1599 2023-04-05 08:25:58 +08:00
John Ralls
bc1f5b80c1 Fix crash if gnucash-cli --quotes is passed a bad database name.
cleanup_and_exit_with_failure doesn't exit anymore so we need
to return its error value instead of trying to keep using the
freed session.
2023-04-04 16:46:00 -07:00
John Ralls
efb24f090d Bug 798815 - flatpak run --command=gnucash-cli cannot download...
quotes since 5.0.

The filename is getting stuffed into the m_quotes_cmd vector unless --namespace
is specified, so check if that's happened and copy the value over.
2023-04-04 16:37:57 -07:00
Christopher Lam
56b75c3691 std::string cannot free() scm_to_utf8_string automatically 2023-04-04 23:24:22 +08:00
Robert Fewell
a1bec6fc01 Remove gnc-plugin-aqbanking-ui.xml file, left behind after change to GActions 2023-04-04 10:35:07 +01:00
Robert Fewell
6eac35f013 Change identifier MINGW to WIN32 in AQB CMakeLists.txt to be consistent 2023-04-04 10:33:43 +01:00
Robert Fewell
a958455a6b Bug 798813 - Under File->Import, Missing OFX/QFX menu item
Fixed by copying section from AQB CMakeLists.txt file to the OFX one.
2023-04-04 10:32:03 +01:00
John Ralls
30cbf3074e Fix misplaced static variable decl.
Why this compiled is a mystery. Since empty wasn't captured it should
have raised an unused variable for the outside the lambda declaration
and an undeclared variable for the use inside. Only gcc 7 raised the
first error and nothing noticed the second.
2023-04-02 15:24:56 -07:00
John Ralls
6091982952 Merge Richard Cohen's 'fix-cmake-310-build' into stable. 2023-04-02 14:30:29 -07:00
Maarten Bosmans
0d86be6d2a [test] Properly destroy resources on end of tests
This fixes memory leaks that are only present in testing code.
Not very useful on itself, but it does make it easier to fix memory
leaks and other AddressSanitizer problems in actual gnucash code later.
2023-04-02 21:12:50 +02:00
Maarten Bosmans
ed3fe00880 [test] Use test fixture to initialize and destroy resources 2023-04-02 21:12:50 +02:00
Maarten Bosmans
35aeed45ec [engine] Remove two replace functions from KvpValue
These were not used outside a test.

And that test was not leak free, as a result of the functions not doing
what they are supposed to do when the current value is not of the type
that is expected. (NULL is returned, but the value is not replaced)
2023-04-02 21:12:50 +02:00
Maarten Bosmans
bd94965d9b [backend/xml] Remove unused string copy 2023-04-02 21:12:50 +02:00
Robert Fewell
cb98864f7b Modify updating accelerators based on the accelerator map
Menu items based on actions with targets all share the same action so
add the target to the end of lines defining these menu item so that
accelerators can be added.
2023-04-02 12:06:53 +01:00
Robert Fewell
0dc0fcd774 Modify gnc_menubar_model_update_item
Add the action target as a parameter so that actions with a specific
target can be updated.
2023-04-02 11:25:16 +01:00
Robert Fewell
98c11d620a Add ability to search for menu actions with a specific target 2023-04-02 11:22:58 +01:00
Robert Fewell
96d28f2f02 Bug 798807 - Keyboard shortcuts not working
Need to readd the accelerator keys when some register transaction
actions are renamed to split actions as this is done by removing and
adding a new menu model / item. As the register is also used for the
schedule transaction editor the way the accelerator group is retrieved
needs changing.
2023-04-02 11:14:39 +01:00
Robert Fewell
91ee2664a3 Bug 798808 - Saved reports shown on main menu
Missed setting '_Custom' as translatable to match entry in
report-core.scm
2023-04-02 11:00:25 +01:00
John Ralls
d8a3e83189 Fix test breakage from account list reversal. 2023-04-01 18:14:31 -07:00
John Ralls
634b9f8744 Bug 798810 - Income Statement (multicolumn) - account sorting is...
'reversed' each time you restart.

Lists read from the front, vectors to the back, so reverse the
vector after loading it.

While we're at it reserve enough elements to hold the list.
2023-03-31 16:43:42 -07:00
John Ralls
a2098b383c Update gnucash-cli.1 for new finance-quote parameters. 2023-03-31 12:36:43 -07:00
John Ralls
12137d6b9c Remove man pages for gnc-fq-dump and gnc-fq-helper.
The commands were replaced by gnucash-cli.
2023-03-31 12:23:19 -07:00
John Ralls
fb0814ced5 Merge Richard Cohen's 'fix-clang1507-build' into stable. 2023-03-31 11:30:09 -07:00
Richard Cohen
6ba5bb326a Fix dereference of expired temporaries.
Reported by clang 15.0.7, which will be in Ubuntu 23.04, -Wdangling-gsl
2023-03-31 11:27:33 -07:00
John Ralls
17e08d0f43 Merge Richard Cohen's 'fix-gcc7-build' into stable. 2023-03-31 10:41:30 -07:00
Richard Cohen
9fa2a48fe1 Fix build on gcc-8 & 9.
See https://lists.gnucash.org/pipermail/gnucash-devel/2023-March/046617.html
2023-03-30 18:25:23 -07:00
John Ralls
d7d9240e3d Merge Richard Cohen's 'fix-python-311-build' of github.com:richardcohen/gnucash into stable 2023-03-30 18:22:09 -07:00
John Ralls
0d598d51ed Fix Finance::Quote use on Win32.
By dealing with Win32 \r\n newlines on return from finance-quote-wrapper.
2023-03-30 16:45:01 -07:00
Richard Cohen
a9a0c2104a Fix cmake 3.10 build 2023-03-30 14:29:59 +01:00
John Ralls
a587dfff2c Bug 798802 - Online Price quote - Stocks not working GNU 5.0 Windows
Change the property-tree path delimiter for constructing paths from
'.' that's commonly used in stock symbols, to '|' that isn't.
2023-03-29 20:01:10 -07:00
Richard Cohen
8b25832ba0 PySys_SetArgv is deprecated in 3.11
The initialization API was updated in 3.8.

"This API is kept for backward compatibility:
setting PyConfig.argv and PyConfig.parse_argv should be used instead,
see Python Initialization Configuration."
2023-03-29 11:26:19 +01:00
Richard Cohen
cfc0890d5d Move variables close to use 2023-03-29 11:26:12 +01:00
Richard Cohen
735a611361 Remove commented out code in gncmod-python.c 2023-03-29 11:25:15 +01:00
Richard Cohen
546dea75ad The minimum version of Python should be 3.6
... according to README.dependencies
2023-03-29 09:44:55 +01:00
Christopher Lam
ecdd9dea50 [balance-forecast] add missing (sw_expressions) module 2023-03-28 08:22:00 +08:00
Christopher Lam
75456bbb29 add extern "C" wrapper to header files
to be usable from cpp
2023-03-28 07:53:27 +08:00
John Ralls
77cb9c6af4 Merge 5.0 into stable. 2023-03-27 10:50:00 -07:00
Christopher Lam
bdf79f7721 Merge branch 'master-fileopen-filter' into stable #1576 2023-03-27 12:48:52 +08:00
Christopher Lam
6c5f905260 [2/2] [dialog-file-access] File/Open shows *.gnucash by default
Initially File/Open should show *.gnucash files, excluding the
backup *.gnucash.*.gnucash files.
2023-03-27 12:48:13 +08:00
Christopher Lam
b3553b13d3 [dialog-search.c] if result, select first one. also grab focus.
Addendum to bug 355498 to select the result. This allows faster
keyboard navigation -- Find Customer, input search string, press
ENTER, use up/down to select desired object, press ENTER to open
object.
2023-03-27 11:53:34 +08:00
John Ralls
50c766e973 Release GnuCash 5.0 2023-03-25 18:17:53 -07:00
John Ralls
6b8fb521d9 Merge branch 'maint' 2023-03-25 18:17:34 -07:00