Future branch bug
Robert Fewell
14ubobit at gmail.com
Tue Nov 24 05:05:15 EST 2026
John,
I think the problem is that when the check for Finance Quote is run before
the file load there is no 'Root Account'. With the introduction of lines
759-761 in gnc-ui-util.cpp, with the preference set to 'Use Root Account'
there is a lookup using 'gnc_get_current_root_account', as there is no Root
Account, it creates one and hence makes the book dirty.
Regards,
Bob
On Tue, 24 Nov 2026 at 02:12, John Ralls <jralls at ceridwen.us> wrote:
> Bob,
>
> The bisect shows that
> https://github.com/Gnucash/gnucash/pull/528/changes/36db00d012d090313d87468185db4b6abfe87449 introduced
> the save dialog appearing when the blank section is destroyed and reverting
> it produces a clean startup. Nothing leaps out as the likely cause.
>
> Regards,
> John Ralls
>
>
> On Nov 23, 2026, at 20:33, John Ralls <jralls at ceridwen.us> wrote:
>
> Bob,
>
> I’ve seen that too, but I had been ignoring it. Stable also triggers that
> creation of a session that marks the session dirty but it doesn’t raise the
> dialog. I’ll do a bisect to see if I can figure out what’s different.
>
> Regards,
> John Ralls
>
> On Nov 23, 2026, at 09:29, Robert Fewell <14ubobit at gmail.com> wrote:
>
> 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
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20261124/d387e108/attachment.htm>
More information about the gnucash-devel
mailing list