Commit Graph

27759 Commits

Author SHA1 Message Date
Simon Arlott
f49b669052
Bug 798564 - GnuCash is slow when there are a lot of open registers
When loading the book on startup, GnuCash takes a long time. This is partly
because gnc_restore_all_state() is loading data for every register page and
I have 35+ registers open.

Register loads should be deferred on tabs that are not visible until those
tabs are focused, like what already happens for restored open reports.

Every time a change to a transaction is saved by navigating away from it,
the UI freezes for almost a second. This is because
gnc_split_register_move_cursor() calls gnc_gui_refresh_internal() which
refreshes all the registers.

Register refreshes should be deferred on tabs that are not visible until
those tabs are focused again.

Use focus information to suppress the last part of the refresh_handler()
if the ledger isn't currently visible. When it becomes visible again, run
the deferred refresh step.

Don't immediately load or refresh the ledger (this will happen the first
time it is focused instead).
2023-06-18 08:55:20 +01:00
Simon Arlott
d56d68b7ab
[gnc-plugin-page] Don't automatically focus pages when they are recreated
This has to disregard the "open adjacent" preference to get them to be in
the right order because the first page will remain focused until the
restore is complete.

Change the register page so that it doesn't assume it will be in focus on
creation.
2023-06-18 08:55:19 +01:00
Simon Arlott
9ac12db68f
[gnc-ledger-display] Consolidate refresh functions
gnc_ledger_display_gl() is called to create the ledger:
1. Exclude template accounts (unconditionally)
2. Calls gnc_ledger_display_internal()

gnc_ledger_display_internal():
1. Run query
2. Set watches
3. Load splits

refresh_handler() is called to refresh all pages when a change happens:
1. Check if the number of subaccounts has changed
2. Exclude any template accounts (for specific register types)
3. Run query
4. Set watches
5. Load splits

gnc_ledger_display_refresh() is called by the register plugin:
1. [Doesn't check if the number of subaccounts has changed]
2. Exclude template accounts (for specific register types)
3. Run query
4. Set watches
5. Load splits

The last two are inconsistent because they don't both check if the number
of subaccounts has changed.

Make it easier to conditionally refresh the ledger only when it's visible
by consolidating the code from these functions into one place within
gnc_ledger_display_refresh() and gnc_ledger_display_refresh_internal().
2023-06-18 08:55:18 +01:00
John Ralls
2c4a096b9c Revert "Translation update by Rune Osnes <osnes.rune@gmail.com> using Weblate"
This reverts commit 8e18cde7f0 because a
substantial number of the changes were only removing accelerator marks.
2023-06-16 14:47:32 -07:00
John Ralls
0c6ae19c16 Merge Richard Cohen's 'remove-gnc-define-type' into stable. 2023-06-16 12:55:10 -07:00
John Ralls
827bfabd69 Merge Richard Cohen's 'declare-type-gnc-plugin' into stable. 2023-06-16 12:42:42 -07:00
John Ralls
915e95e553 Merge Richard Cohwn's 'declare-type-gnc-tree-view' into stable. 2023-06-16 12:41:26 -07:00
John Ralls
eee5f674c4 Merge Richard Cohen's 'declare-type-gnc-tree-model' into stable. 2023-06-16 12:40:29 -07:00
John Ralls
48cf3a9a32 Merge Richard Cohen's 'declare-type-gncsearch' into stable. 2023-06-16 12:39:20 -07:00
John Ralls
2e58dd83b7 Merge latest translations from Weblate. 2023-06-16 12:13:02 -07:00
Francisco Serrador
d5a28e5170
Translation update by Francisco Serrador <fserrador@gmail.com> using Weblate
po/glossary/es.po: 100.0% (222 of 222 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/es/

Translation update  by Francisco Serrador <fserrador@gmail.com> using Weblate

po/es.po: 99.9% (5498 of 5499 strings; 1 fuzzy)
3 failing checks (0.1%)
Translation: GnuCash/Program (Spanish)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/es/

Translation update  by Francisco Serrador <fserrador@gmail.com> using Weblate

po/es.po: 100.0% (5499 of 5499 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: Francisco Serrador <fserrador@gmail.com>
2023-06-16 19:50:40 +02:00
Jaime Marquínez Ferrándiz
0394abfb8b
Translation update by Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net> using Weblate
po/es.po: 100.0% (5499 of 5499 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: Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net>
2023-06-16 19:50:39 +02:00
Gaël CATLLA
3d1c7fb2fa
Translation update by Gaël CATLLA <gcatlla@free.fr> using Weblate
po/fr.po: 95.0% (5227 of 5499 strings; 165 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Gaël CATLLA <gcatlla@free.fr> using Weblate

po/fr.po: 95.0% (5227 of 5499 strings; 147 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Gaël CATLLA <gcatlla@free.fr> using Weblate

po/fr.po: 94.6% (5203 of 5499 strings; 170 fuzzy)
34 failing checks (0.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Gaël CATLLA <gcatlla@free.fr>
2023-06-16 19:50:39 +02:00
Andrea Andre
ff988b5567
Translation update by Andrea Andre <andrea.tsg19@slmail.me> using Weblate
po/ro.po: 47.4% (2611 of 5499 strings; 1949 fuzzy)
774 failing checks (14.0%)
Translation: GnuCash/Program (Romanian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/ro/

Co-authored-by: Andrea Andre <andrea.tsg19@slmail.me>
2023-06-16 19:50:38 +02:00
Geza Kiss
0823202ee9
Translation update by Geza Kiss <geza.openstreetmap@reallymymail.com> using Weblate
po/hu.po: 69.7% (3833 of 5499 strings; 614 fuzzy)
1 failing checks (0.1%)
Translation: GnuCash/Program (Hungarian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/hu/

Co-authored-by: Geza Kiss <geza.openstreetmap@reallymymail.com>
2023-06-16 19:50:37 +02:00
Rauno Ots
33eab18343
Translation update by Rauno Ots <rots00@gmail.com> using Weblate
po/et.po: 10.7% (590 of 5499 strings; 105 fuzzy)
20 failing checks (0.3%)
Translation: GnuCash/Program (Estonian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/et/

Translation update  by Rauno Ots <rots00@gmail.com> using Weblate

po/et.po: 10.4% (575 of 5499 strings; 105 fuzzy)
20 failing checks (0.3%)
Translation: GnuCash/Program (Estonian)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/et/

Co-authored-by: Rauno Ots <rots00@gmail.com>
2023-06-16 19:50:36 +02:00
Vincent Dawans
e69b89a106
Translation update by Vincent Dawans <dawansv@gmail.com> using Weblate
po/fr.po: 94.6% (5204 of 5499 strings; 169 fuzzy)
33 failing checks (0.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Vincent Dawans <dawansv@gmail.com> using Weblate

po/fr.po: 94.2% (5181 of 5499 strings; 189 fuzzy)
34 failing checks (0.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Vincent Dawans <dawansv@gmail.com> using Weblate

po/fr.po: 94.0% (5171 of 5499 strings; 199 fuzzy)
34 failing checks (0.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Translation update  by Vincent Dawans <dawansv@gmail.com> using Weblate

po/glossary/fr.po: 100.0% (216 of 216 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/fr/

Translation update  by Vincent Dawans <dawansv@gmail.com> using Weblate

po/fr.po: 93.7% (5158 of 5499 strings; 212 fuzzy)
36 failing checks (0.6%)
Translation: GnuCash/Program (French)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/fr/

Co-authored-by: Vincent Dawans <dawansv@gmail.com>
2023-06-16 19:50:36 +02:00
Christian Wehling
7387800841
Translation update by Christian Wehling <christian.wehling@web.de> using Weblate
po/de.po: 100.0% (5499 of 5499 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>
2023-06-16 19:50:35 +02:00
Rune Osnes
8e18cde7f0
Translation update by Rune Osnes <osnes.rune@gmail.com> using Weblate
po/nb.po: 87.6% (4819 of 5499 strings; 680 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/glossary/nb.po: 100.0% (216 of 216 strings; 0 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Glossary (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/glossary/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 83.6% (4602 of 5499 strings; 714 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 83.6% (4602 of 5499 strings; 714 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 79.5% (4372 of 5499 strings; 816 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 74.4% (4092 of 5499 strings; 819 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 70.2% (3864 of 5499 strings; 958 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 70.0% (3853 of 5499 strings; 965 fuzzy)
0 failing checks (0.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 65.0% (3577 of 5499 strings; 1211 fuzzy)
132 failing checks (2.4%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 64.8% (3568 of 5499 strings; 1220 fuzzy)
139 failing checks (2.5%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 64.6% (3553 of 5499 strings; 1235 fuzzy)
154 failing checks (2.8%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Translation update  by Rune Osnes <osnes.rune@gmail.com> using Weblate

po/nb.po: 62.9% (3462 of 5499 strings; 1304 fuzzy)
223 failing checks (4.0%)
Translation: GnuCash/Program (Norwegian Bokmål)
Translate-URL: https://hosted.weblate.org/projects/gnucash/gnucash/nb_NO/

Co-authored-by: Rune Osnes <osnes.rune@gmail.com>
2023-06-16 19:50:34 +02:00
Richard Cohen
68b689c95c Refactor: remove GNC_DEFINE_TYPE, GNC_IMPLEMENT_INTERFACE
Use GObject constructed() instead
2023-06-14 12:33:14 +01:00
Christopher Lam
4a60e01fcd bugfix xaccTransGetTxnType: avoid returning TXN_TYPE_LINK incorrectly
A TXN_TYPE_PAYMENT will have non-APAR splits; a TXN_TYPE_LINK will not
have non-APAR splits. This bug manifests as a regular TXN_TYPE_PAYMENT
transaction being later voided being incorrectly changed to
TXN_TYPE_LINK.
2023-06-14 18:29:00 +08:00
Richard Cohen
e6a564de82 Refactor: remove unnecessary GncPlugin*Private 2023-06-14 11:03:37 +01:00
Richard Cohen
1255d61917 Refactor: hide implementation of GncPlugin* (move from .h -> .c) 2023-06-14 11:03:37 +01:00
Richard Cohen
2e59bda951 Refactor: DECLARE_FINAL GncPluginExample < GncPlugin
- Fix the name
2023-06-14 11:03:37 +01:00
Richard Cohen
c5d4f2bf30 Refactor: DECLARE_FINAL GncPluginQifImport < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
81ce7bb107 Refactor: DECLARE_FINAL GncPluginOfx < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
d73117d1ef Refactor: DECLARE_FINAL GncPluginLogReplay < GncPlugin
- Fix the name
2023-06-14 11:03:37 +01:00
Richard Cohen
08168bec26 Refactor: DECLARE_FINAL GncPluginCustomerImport < GncPlugin
- fix the camel-snake hybrid name
  - except the name of the action, which is already used externally
2023-06-14 11:03:37 +01:00
Richard Cohen
f47c9295bc Refactor: DECLARE_FINAL GncPluginCsvImport < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
d6764414c1 Refactor: DECLARE_FINAL GncPluginCsvExport < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
631d0e7755 Refactor: DECLARE_FINAL GncPluginBiImport < GncPlugin
- fix the camel-snake hybrid name
  - except the name of the action, which is already used externally
2023-06-14 11:03:37 +01:00
Richard Cohen
a0952e1e5a Refactor: DECLARE_FINAL GncPluginAqBanking < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
218ca30b46 Refactor: DECLARE_FINAL GncPluginReportSystem < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
17f41a796a Refactor: DECLARE_FINAL GncPluginRegister < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
b0c7e19ab1 Refactor: DECLARE_FINAL GncPluginBusiness < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
59e581ceed Refactor: DECLARE_FINAL GncPluginBudget < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
579ffa292b Refactor: DECLARE_FINAL GncPluginBasicCommands < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
939770e1b1 Refactor: DECLARE_FINAL GncPluginAccountTree < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
b715211b24 Refactor: DECLARE_FINAL GncPluginMenuAdditions < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
b853a49b4e Refactor: DECLARE_FINAL GncPluginFileHistory < GncPlugin 2023-06-14 11:03:37 +01:00
Richard Cohen
422b01a55e Refactor: DECLARE_DERIVABLE GncPlugin < GObject 2023-06-14 11:03:37 +01:00
Richard Cohen
5ea2e4e78e Refactor: remove unnecessary GncTreeView*Private 2023-06-14 10:25:26 +01:00
Richard Cohen
20673d97ce Refactor: hide implementation of GncTreeView* (move from .h -> .c) 2023-06-14 10:22:06 +01:00
Richard Cohen
aeab1953b0 Refactor: DECLARE_FINAL GncTreeViewSxList < GncTreeView 2023-06-14 10:22:06 +01:00
Richard Cohen
1ca98da8f2 Refactor: DECLARE_FINAL GncTreeViewPrice < GncTreeView 2023-06-14 10:22:06 +01:00
Richard Cohen
cb1313b08e Refactor: DECLARE_FINAL GncTreeViewOwner < GncTreeView 2023-06-14 10:22:06 +01:00
Richard Cohen
16118c4f2f Refactor: DECLARE_FINAL GncTreeViewCommodity < GncTreeView 2023-06-14 10:22:06 +01:00
Richard Cohen
3e6ca813d9 Refactor: DECLARE_FINAL GncTreeViewAccount < GncTreeView 2023-06-14 10:22:06 +01:00
Richard Cohen
b0fa510972 Refactor: DECLARE_DERIVABLE GncTreeView < GtkTreeView 2023-06-14 10:22:06 +01:00
Robert Fewell
853791cbf7 Fix lockup on Windows in completioncell
Missed updating an 'if' clause which resulted in a negative offset for
previous character.
2023-06-13 15:48:59 +01:00