Dirty entity identification.
Neil Williams
linux at codehelp.co.uk
Thu Jul 21 19:14:32 EDT 2005
On Thursday 21 July 2005 11:55 pm, David Hampton wrote:
> 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.
It will. Every call to qof_book_not_saved automatically calls
qof_object_is_dirty which checks each collection in the book for the single
boolean value in each collection and returns TRUE if ANY collection is dirty.
The collection will (with the new code) be marked as dirty as soon as any
entity in that collection is marked as dirty.
http://code.neil.williamsleesmill.me.uk/gnome2/group__Book.html#ga15
It's fast because it's only checking a single boolean flag in each case and
there are only as many primary collections as there are registered object
definitions.
> In a perfect world, after
> setting the book dirty flag the code would also call a hook list of
> functions.
That can be arranged - Derek mentioned enhancing the event handler and the new
function provides a home for the call you need.
--
Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20050722/70383f78/attachment.bin
More information about the gnucash-devel
mailing list