Future branch bug
Robert Fewell
14ubobit at gmail.com
Mon Nov 23 09:29:56 EST 2026
Hi,
There is a problem on the future branch that only shows up if you have
'finance quote' installed. It concerns the preference 'Accounts->Default
Currency' when set to 'Root Account'.
If this is set, whenever you start Gnucash you get this prompt 'Save
changes to the file?'.
This is down to gnucash.cpp line 178 which is where checking for 'Finance
Quote' is. As part of that 'gnc_default_currency' is processed which calls
'gnc_default_currency_common' and this is where the preference is looked
up. If it uses 'Root Account', it is looked up but if not set one is
created and doing this sets the 'dirty' flag for the book.
I can see a couple of possible fixes, the first is to add a function to
reset the book dirty flag and call it as the last function of
'gnc_account_create_root'. The thinking behind this is other actions will
no doubt set the dirty flag so should be no issue.
The second is to move the checking for 'Finance Quote' lines 171-191 to a
separate function. This function would be called from after the loading of
the file, line 201 (g_free(fn)), possibly after the other occurrence of
g_free(fn) and after the addition of an 'else' clause.
Not sure which is the prefered route or possibly there is another option.
Regards,
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20261123/c50c34ad/attachment.htm>
More information about the gnucash-devel
mailing list