[Gnucash-changes] Spruce up the delete window dialog to make it more HIG compliant.

Derek Atkins warlord at MIT.EDU
Wed Jul 20 13:10:07 EDT 2005


David Hampton <hampton-gnucash at rainbolthampton.net> writes:

> O.K. I'm confused.  I thought the point of switching to SQL was that the
> data was always written through to the database, so that if gnucash
> crashed at any point there would be no lost work.

You're not confused.  That is the point of moving the SQL.  Neil
was just pointing out that the SQL code can do what you're asking
fairly easily.

[snip]
> QOF is already keeps dirty flags for every item in knows about.  How
> hard would it be to change the code that marks objects as modified from
>
>   dirty = TRUE
>
> to:
>
>   if (dirty == 0)
>     dirty = time();
>
> When you try and close the main gnucash window, QOF already iterates
> over the entire set of objects.  It must, in order to determine if a
> save dialog is needed.  The best case today is that the first object is
> modified and the iteration can bail.  The worst case today is that every
> object has to be inspected to discover that it has not been modified.
> This is today in every extant version of Gnucash.  The dialog is
> different, but the code path to see if the dialog is needed is the same.
> In order to provide a time in the context dialog, a boolean test would
> be replaced with a test for a non-zero time (still a single instruction)
> and then a possible time comparison.  Yes, the entire object tree would
> have to be run each time, but is that really a big deal?  Have you
> noticed a long delay when quitting gnucash when you haven't changed
> anything?  The additional time comparison code would only executed for
> each objects that is modified.

I think something like this would work fine.  We really should have
a single interface that we can call to mark an object/instance as
dirty.  That way we can do it in one way and inherit changes, so we
don't need to reimplement it in each object.

This might best go hand-in-hand with an update to the event system.
In particular I want to add more events so we can differentiate
between an account being modified and a new transaction entering an
account (for example).

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list