Commit Graph

26386 Commits

Author SHA1 Message Date
Christopher Lam
e822c12f8b Bug 798590 - Transaction report: wrong type argument in position 1
handle single-col subtotals
2022-08-07 09:22:01 +08:00
John Ralls
8b07ac88cd [options] Add "key" to the register-option documentation blocks. 2022-08-06 17:17:32 -07:00
John Ralls
e29ab5336f [options] Remove key and doc_string from gnc_register_query_option.
It's always used as an internal option with no UI component so it doesn't
use them.
2022-08-06 17:17:32 -07:00
John Ralls
6faaf3b427 [options] Provide a const char* value flavor for register_commodity
And register_currency_option
2022-08-06 17:17:32 -07:00
John Ralls
1ff844c195 [options] Fix implementation of gnc_register_owner_option
To take an owner-type parameter and to set the UIType accordingly.
2022-08-06 17:17:32 -07:00
John Ralls
aa0b0921f4 [options] Add a function to check if an option is internal.
Instead of relying on the legacy underscore-section-name hack.
2022-08-06 17:17:32 -07:00
John Ralls
da0eff2cac [options] Implement widget-changed callbacks.
Enables full functionality for complex-boolean and multichoice-callback
options.

Note that setter-function callback isn't used in any GnuCash code so it
is not implemented and is not present in the register-callback functions.
2022-08-06 17:17:26 -07:00
John Ralls
552aa438ff [options] Implement gnc_register_internal_option. 2022-08-06 17:13:28 -07:00
John Ralls
0e9ed8cf0a [options] Provide float variants to gnc_register_plot_size_option. 2022-08-06 17:13:28 -07:00
John Ralls
3d275a3715 [options] Improve Scheme API consistency 2022-08-06 17:13:16 -07:00
John Ralls
418bb7d0cc [options] Fix two deprecation messages. 2022-08-06 16:25:42 -07:00
John Ralls
0213787a2f [options] Enable registering an absolute date option. 2022-08-06 16:25:42 -07:00
John Ralls
cf2870b71a [options] Change RelativeDate and Multichoice index type to uint16_t.
From size_t because clang thinks that std::is_same_v<size_t, time64> is
true and we need to differentiate the handling of the two.
2022-08-06 16:25:42 -07:00
John Ralls
0b2d14ee72 Fix distribution for expressions target. 2022-08-06 16:25:42 -07:00
Christopher Lam
b94440b16a Bug 798588 - sx scrubbing was using incorrect free function
the GHashTable values are gnc_numeric*.
2022-08-06 16:25:42 -07:00
Christopher Lam
ea56d67797 [gnc-sx-instance-model.c] indent attributes properly 2022-08-06 16:25:42 -07:00
Christopher Lam
a98e4abbd4 [test-charts] add cash-flow to clear warning about missing report 2022-08-06 16:25:42 -07:00
Christopher Lam
bfa0fd1819 Bug 798588 - sx scrubbing was using incorrect free function
the GHashTable values are gnc_numeric*.
2022-08-06 14:39:57 +08:00
Christopher Lam
f0ac8d69b2 [gnc-sx-instance-model.c] indent attributes properly 2022-08-06 14:39:55 +08:00
Christopher Lam
e7e3ed8c2b [test-charts] add cash-flow to clear warning about missing report 2022-08-06 10:20:16 +08:00
Christopher Lam
0ef6967a36 Merge branch 'maint' 2022-08-03 20:38:41 +08:00
Christopher Lam
0b5a4cd298 Merge branch 'maint' 2022-08-03 20:38:08 +08:00
Pedro Albuquerque
2377f7be54
Translation update by Pedro Albuquerque <pmra@gmx.com> using Weblate
po/pt.po: 100.0% (5400 of 5400 strings; 0 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Portuguese)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/pt/

Co-authored-by: Pedro Albuquerque <pmra@gmx.com>
2022-08-02 18:47:13 +02:00
Laurent Bigonville
05bbe9fdee
Translation update by Laurent Bigonville <bigon@bigon.be> using Weblate
po/fr.po: 99.9% (5398 of 5400 strings; 2 fuzzy)
3 failing checks (0.1%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Laurent Bigonville <bigon@bigon.be>
2022-08-02 18:47:13 +02:00
Simon Arlott
90e49cbb50
Translation update by Simon Arlott <weblate.simon@arlott.org> using Weblate
po/en_NZ.po: 100.0% (5400 of 5400 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% (5400 of 5400 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (English (Australia))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/en_AU/

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

po/en_GB.po: 100.0% (5400 of 5400 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: Simon Arlott <weblate.simon@arlott.org>
2022-08-02 18:47:12 +02:00
Christian Wehling
6b60ef4f83
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
po/de.po: 99.9% (5399 of 5400 strings; 1 fuzzy)
181 failing checks (3.3%)
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/glossary/de.po: 99.5% (215 of 216 strings; 1 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/de/

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

po/de.po: 99.9% (5399 of 5400 strings; 1 fuzzy)
180 failing checks (3.3%)
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/glossary/de.po: 99.5% (215 of 216 strings; 1 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/de/

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

po/de.po: 99.9% (5399 of 5400 strings; 1 fuzzy)
180 failing checks (3.3%)
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: 99.9% (5399 of 5400 strings; 1 fuzzy)
181 failing checks (3.3%)
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: 99.9% (5399 of 5400 strings; 1 fuzzy)
182 failing checks (3.3%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/

Co-authored-by: Christian Wehling <christian.wehling@web.de>
2022-08-02 18:47:11 +02:00
Christopher Lam
b70fe1381d Account tree: set menu sensitivities in only 1 function 2022-08-02 21:10:54 +08:00
Christopher Lam
1b845a86f3 use gtk_entry_get_text instead of gtk_editable_get_chars
the former returns a const char* which does not need to be freed.
2022-08-02 19:08:22 +08:00
Christopher Lam
d1aefc851d [sx-book] free sx_list before g_object_unreffing sxes 2022-08-01 23:43:08 +08:00
Christopher Lam
2443d8faf7 [import-main-matcher] tidy: free GList before going out of scope
...instead of in a separate function. This matches c++ RAII behaviour.
2022-07-31 10:25:58 +08:00
Christopher Lam
a43997cc52 [import-main-matcher] pull common add_string into 1 function 2022-07-31 10:06:54 +08:00
Christopher Lam
dc77df352e [import-main-matcher] add comments, tidier code 2022-07-31 10:06:47 +08:00
John Ralls
688832b5f8 Bug 798585 - segfault running sample script
The root cause of which is that on recent releases of GLib (recent
meaning 2.66 in the current Debian stable!) g_type_instance_get_private
looks in the wrong place for the private data. When running the script
in question it returned NULL and since the code didn't check for a valid
pointer, it crashed.

So this change replaces all calls to g_type_instance_get_private with
the function [type_prefix]_get_instance_private() added in glib-2.36
except for two register2 files that have been removed from master; those
are ignored to avoid unnecessary merge conflicts.
2022-07-30 16:50:51 -07:00
Christopher Lam
815eeb496f [gnc-plugin-page-register] g_slist_free param_list
If (reg->type == SEARCH_LEDGER) then the GSList* created by
qof_query_build_param_list would not be freed. This reordering avoids
allocating GSList altogether when not needed.
2022-07-30 23:23:30 +08:00
Christopher Lam
6c70f2c22d [gnucash-sheet] unref cursor 2022-07-30 23:23:30 +08:00
Christopher Lam
723dee66cb [gnc-ledger-display] QofQuery destroyed
This QofQuery was copied by gnc_ledger_display_internal, therefore its
is no longer in use when out of scope.
2022-07-30 23:23:25 +08:00
Christopher Lam
7bc7737476 [gnc-dense-cal] further GList* and char* leaks
- mark->name and mark->info both leaked
- fixing poorly written for loop to g_list_free tags properly
2022-07-30 20:16:51 +08:00
Christopher Lam
accdf9e852 [gnc-dense-cal] leaks in markdata and GTimer
- mark->name wasn't correctly freed
- don't unnecessarily allocate GTimer
2022-07-30 13:43:06 +08:00
Christopher Lam
45aac53952 [gnc-split-reg] free tooltip text properly 2022-07-30 13:43:06 +08:00
Christopher Lam
67a1b7a873 [gnc-sx-instance-model] free GHashTable keys when destroying 2022-07-30 13:43:06 +08:00
Christian Wehling
78f7465694
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
po/de.po: 99.9% (5399 of 5400 strings; 1 fuzzy)
182 failing checks (3.3%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/

Co-authored-by: Christian Wehling <christian.wehling@web.de>
2022-07-29 17:51:02 +02:00
Avi Markovitz
4906df8ed8
Translation update by Avi Markovitz <avi.markovitz@gmail.com> using Weblate
po/he.po: 100.0% (5400 of 5400 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Hebrew)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/he/

Co-authored-by: Avi Markovitz <avi.markovitz@gmail.com>
2022-07-29 17:51:02 +02:00
Frank H. Ellenberger
583cd2c9fb
Translation update by Frank H. Ellenberger <frank.h.ellenberger@gmail.com> using Weblate
po/de.po: 99.8% (5390 of 5400 strings; 9 fuzzy)
184 failing checks (3.4%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/

Co-authored-by: Frank H. Ellenberger <frank.h.ellenberger@gmail.com>
2022-07-29 17:51:01 +02:00
Robert Fewell
09e5c46dfd Remove some default 'dummy' store entries as not required. 2022-07-29 11:28:55 +01:00
Robert Fewell
dea1a89e81 Bug 798573 - Tab Width Behaviour
Currently when the notebook tabs on the left or right, the space used
fluctuates depending on tab label width. This change sets the label
width to the preference setting when the tabs are on the left or right
but when top or bottom the width is set to the number of characters
when shorter than the preference setting so they take up less room.
2022-07-29 10:55:44 +01:00
Robert Fewell
6cad1d16af Change source files gnc-ab-utils.* for spaces and tabs 2022-07-29 10:49:32 +01:00
Robert Fewell
edf000f4cf Fix uninstantiatable type error on the console
sys:1: Warning: invalid uninstantiatable type '(null)' in cast to
'GtkWindow'
2022-07-29 09:38:32 +01:00
Christopher Lam
ebf3439558 [gnc-sx-instance-model] free some GHashTable keys & Values 2022-07-29 12:56:02 +08:00
Christopher Lam
7c2a249511 [gnc-sx-instance-model.c] refactor Scrub function
This scrubbing function calls xaccTransRollbackEdit which is
leaky. Instead of trying to fix xaccTransRollbackEdit which requires
superhuman skills, it's easiest to track the changes separately in a
GList, and use xaccTransBeginEdit/xaccTransCommitEdit only if
necessary.
2022-07-29 12:47:10 +08:00
Christopher Lam
7880f9b16f [SchedXaction.c] free list of recurrences 2022-07-29 12:23:09 +08:00