Commit Graph

25202 Commits

Author SHA1 Message Date
John Ralls
a3f50586df c++options: More thorough testing of scheme serialization. 2021-12-14 11:03:37 -08:00
John Ralls
6cd88c230c c++options: Create bool or string internal options when possible.
There's no need to save internal options as SCM when we support the
underlying type in C++.
2021-12-14 11:03:01 -08:00
John Ralls
e9b850cca5 c++options: Correct Scheme serialization of type bool. 2021-12-14 10:58:48 -08:00
John Ralls
66f9fc81c7 c++options: Implement serialization for GncOwner. 2021-12-14 10:57:41 -08:00
John Ralls
0ce841d4ce c++options Fix Scheme bindings for QofQuery options. 2021-12-14 10:55:59 -08:00
John Ralls
216b483e26 c++options SCM bindings Rewrite save_scm_value to branch on type.
Instead of GncOptionUIType, mostly. We still need to do that to tell apart
commodities and currencies from other QofInstances.
Allows compile-time dispatch for most types.
2021-12-13 11:05:15 -08:00
John Ralls
947c061989 C++options: Create QofQueryValue trait. 2021-12-11 15:12:22 -08:00
John Ralls
f26014a04e c++options: QofInstanceValue: Protect against crashes when m_value is nullptr. 2021-12-11 15:11:26 -08:00
John Ralls
24d2999aec c++options: Set the dialog entries only once at dialog creation. 2021-12-04 15:29:01 -08:00
John Ralls
51cc2668a1 c++options Ensure signals are inactive for initial setting of option entries.
Ensures that the initial setting of the entries doesn't trigger
gnc_option_changed_widget_cb. The entry widget hasn't been parented yet
and besides we don't want to activate the apply and ok buttons yet.
2021-12-04 14:39:19 -08:00
John Ralls
269249378f c++options fix setting account-selection widget from option. 2021-12-02 16:05:14 -08:00
John Ralls
6f93a68bad c++options: Serialize and deserialize to strings instead of streams.
And use serialize to create values for gnc:generate-restore-forms and both
of them for the meat of the stream functions.

This fixes in particular QofInstance serialization where passing the
option value directly to scheme format resulted in a notation about
a swig pointer instead of the desired GUID string or commodity namespace
and mnemonic strings.
2021-12-02 15:04:49 -08:00
John Ralls
c3b8b6cc49 Make a proper class of GncOptionsDialog.
Removes the C functions, allocates with new and delete and cleans itself
up.
2021-11-21 17:03:03 -08:00
John Ralls
5e84f118dd Move gnc_options_dialog functions from gnc-gnome-utils to dialog-options. 2021-11-19 16:10:47 -08:00
John Ralls
8eddb63ef1 Remove unused global variables global_help_cb_data and global_help_cb. 2021-11-19 16:10:47 -08:00
John Ralls
19a2dd4952 dialog-options: Store the main buttons in GNCOptionWin.
Instead of searching for them every time the dialog updates.
2021-11-19 16:10:47 -08:00
John Ralls
9804928006 Don't call gnc_option_db_clean after setting up the options dialog.
The widgets have already been loaded and loading them again just sensitizes
the buttons as if something had changed.
2021-11-19 11:58:22 -08:00
John Ralls
e17ee38c80 dialog-options.cpp: Replace hand-rolled loop to find toplevel with gtk_widget_get_toplevel. 2021-11-19 11:56:25 -08:00
John Ralls
a3a381cfd0 dialog-options.cpp: Fix passing bad widget ptr to dialog_changed_internal.
GtkTreeSelection is not a widget.
2021-11-19 11:52:44 -08:00
John Ralls
dd7feb9988 options.scm: Remove second license comment. 2021-11-19 11:45:54 -08:00
John Ralls
d1fe359e47 gnc_numeric_to_decimal: Change can't round warning to a debug.
Routinely used as a check so a warning isn't appropriate.
2021-11-19 11:44:57 -08:00
John Ralls
74fd716afb Clarify gnc_relative_date_to_time64 helper functions. 2021-11-19 11:43:04 -08:00
John Ralls
f6c9e63e3d Fix PR comments so far.
Except for gnc-option-date's normalize_tm and set_day_and_time.
2021-11-14 15:28:22 -08:00
John Ralls
4c43dac1b6 Restore setting swig engine initialization flag. 2021-11-13 11:10:17 -08:00
John Ralls
cf5da9fffd Resolve merge conflicts. 2021-11-12 19:56:29 -08:00
John Ralls
96b09ded9f Doxygen documentation for new options classes. 2021-11-12 15:27:36 -08:00
John Ralls
00a982d97d Use Scheme to generate and parse saved option files.
The saved option files being Scheme executables.
2021-11-12 15:27:36 -08:00
Christopher Lam
984d816a58 Merge branch 'maint' 2021-11-06 21:41:17 +08:00
Christopher Lam
4f2d6c7c1b Merge branch 'maint-progress2' into maint #1175 2021-11-06 21:35:02 +08:00
Christopher Lam
16f5be80f9 [test-transaction] "Report Currency" renamed to "Report's currency" 2021-11-06 16:25:48 +08:00
Maxime Leroy
aa450cb00e
Translation update by Maxime Leroy <lisacintosh@gmail.com> using Weblate
po/fr.po: 76.9% (4125 of 5362 strings; 891 fuzzy)
377 failing checks (7.0%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Maxime Leroy <lisacintosh@gmail.com>
2021-11-05 08:35:59 +01:00
Frank H. Ellenberger
bfe2a1635b Revert "Translation update by Hugo Carvalho <hugokarvalho@hotmail.com>
using Weblate"

This reverts commit 78fac0307c.

Reason: https://github.com/Gnucash/gnucash/pull/1182#discussion_r739675453
2021-11-04 23:28:56 +01:00
Avi Markovitz
e094de7c7a
Translation update by Avi Markovitz <avi.markovitz@gmail.com> using Weblate
po/he.po: 100.0% (5362 of 5362 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>
2021-11-04 16:35:00 +01:00
Allan Nordhøy
ebde97ce56
Translation update by Allan Nordhøy <epost@anotheragency.no> using Weblate
po/nb.po: 53.3% (2862 of 5362 strings; 1633 fuzzy)
423 failing checks (7.8%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
2021-11-04 16:35:00 +01:00
Maxime Leroy
8d2f059071
Translation update by Maxime Leroy <lisacintosh@gmail.com> using Weblate
po/fr.po: 75.9% (4075 of 5362 strings; 909 fuzzy)
382 failing checks (7.1%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Maxime Leroy <lisacintosh@gmail.com> using Weblate

po/fr.po: 75.9% (4073 of 5362 strings; 909 fuzzy)
383 failing checks (7.1%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Maxime Leroy <lisacintosh@gmail.com>
2021-11-04 16:34:59 +01:00
Hugo Carvalho
78fac0307c
Translation update by Hugo Carvalho <hugokarvalho@hotmail.com> using Weblate
po/glossary/pt.po: 100.0% (208 of 208 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Portuguese)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/pt/

Co-authored-by: Hugo Carvalho <hugokarvalho@hotmail.com>
2021-11-04 16:34:59 +01:00
John Ralls
0660da074f Merge Simon Arlott's 'cut-txn-warning' into maint. 2021-11-03 14:16:10 -07:00
Christopher Lam
970e9af342 Merge branch 'glist-functions' into maint #1183 2021-11-02 23:35:07 +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
7a25c12b9a [dialog-sx-since-last-run] don't allocate repeatedly to combine strings 2021-10-30 22:41:02 +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
e94ee3bfad Don't g_strdup char* from scm_to_locale|utf8_string
Both scm_to_locale_string and scm_to_utf8_string return newly
allocated char*. It is not necessary to return a strdup'd char* and
free the original.
2021-10-30 22:26:33 +08:00
Simon Arlott
f7f6f337df
Separate the warnings for "cut split/transaction" and "delete split/transaction" 2021-10-28 22:09:39 +01:00
Christopher Lam
f813f7cd14 [gnc-autoclear] Move autoclear algorithm into gnome-utils 2021-10-28 21:41:46 +08:00
Christopher Lam
0a39c37b22 [window-autoclear.glade] upgrade to glade 3.38.2 2021-10-28 21:41:43 +08:00
Christopher Lam
deec353b33 [window-reconcile.glade] upgrade to glade 3.38.2 2021-10-28 21:41:04 +08:00
Christian Wehling
d6ad50df54
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
po/de.po: 99.8% (5354 of 5362 strings; 6 fuzzy)
228 failing checks (4.2%)
Translation: GnuCash/Program (German)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/de/

Co-authored-by: Christian Wehling <christian.wehling@web.de>
2021-10-27 20:55:31 +02: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
cjh
9825132eab
Translation update by cjh <cjh@cjh0613.com> using Weblate
po/zh_CN.po: 100.0% (5362 of 5362 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Chinese (Simplified))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hans/

Translation update  by cjh <cjh@cjh0613.com> using Weblate

po/zh_TW.po: 99.8% (5352 of 5362 strings; 10 fuzzy)
5 failing checks (0.1%)
Translation: GnuCash/Program (Chinese (Traditional))
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/zh_Hant/

Co-authored-by: cjh <cjh@cjh0613.com>
2021-10-23 21:27:49 +02:00