Dirty entity identification.
David Hampton
hampton-gnucash at rainbolthampton.net
Thu Jul 21 18:55:16 EDT 2005
On Thu, 2005-07-21 at 18:09 -0400, Chris Shoemaker wrote:
> David wants to put a '*' in the window title when the book is dirty.
> No problem, query all the collections' dirty flag. Now, say we wanted
> to extend the HIG usage to the sub windows.
There are no sub-windows in g2. There are only windows that can contain
a variety of page types (account hierarchies, registers, reports, etc),
and single purpose dialogs.
> How do we dicover that it contains a dirty split? Either we have to
> search through *every* split in the Collection, seeing if it's in our
> account and is dirty, OR, we just check our Account's "contains
> something dirty" flag. Big difference.
Splits and Accounts aren't the only things that get dirty. Stock quotes
and commidities are two others. I want a simple test on the *book* that
I can use to see if anyting in the book (split, stock price, etc) is
dirty. Preferably a trivial test, as it will be called frequently.
Neil mentioned he will be modifying the code to use the new function
qof_instance_set_dirty() to set dirty flags on collections. If this
function also sets the dirty flag on the book containing the collection
then I have almost every thing I need. In a perfect world, after
setting the book dirty flag the code would also call a hook list of
functions.
David
More information about the gnucash-devel
mailing list