On Wednesday 20 July 2005 6:10 pm, Derek Atkins wrote:
> We really should have 
> a single interface that we can call to mark an object/instance as
> dirty.

OK, all I need now is the time to replace every obj->inst.dirty = TRUE with 
qof_instance_set_dirty((QofInstance*)obj)
:-(

void qof_instance_set_dirty(QofInstance* inst)
{
        QofBook *book;
        QofCollection *coll;
        QofEntity *ent;

        inst->dirty = TRUE;
        ent = inst->entity;
        book = qof_instance_get_book(inst);
        coll = qof_book_get_collection(book, ent->e_type);
        qof_collection_mark_dirty(coll);
}

Then replace every is_dirty = NULL with
is_dirty = qof_collection_is_dirty

Yes?
        
I'm not sure about the time handling as yet.

My TODO list is getting ever longer . . . . 

> That way we can do it in one way and inherit changes, so we 
> don't need to reimplement it in each object.

I think we'd need the is_dirty prototype, no?

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpFmr6ZO8Q24.pgp
Description: PGP signature

_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to