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/
pgpe9OsMgy0W6.pgp
Description: PGP signature
_______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
