[Gnucash-changes] Spruce up the delete window dialog to make it
more HIG compliant.
c.shoemaker at cox.net
Wed Jul 20 16:57:34 EDT 2005
On Wed, Jul 20, 2005 at 04:09:38PM -0400, Derek Atkins wrote:
> Quoting Chris Shoemaker <c.shoemaker at cox.net>:
> > On Wed, Jul 20, 2005 at 03:49:03PM -0400, David Hampton wrote:
> > > On Wed, 2005-07-20 at 15:03 -0400, Chris Shoemaker wrote:
> > >
> > > > Incidentally, is this behavior specific to g2? I've never noticed it
> > > > in 1.x, but I imagine the register code hasn't changed much.
> > >
> > > It was added in HEAD and pulled into g2. Derek thinks the blank split
> > > code should be rewritten. I'm for reverting the change to the
> > > transaction scrubbing code that created the problem.
> > Nice to know I'm not imagining things. The blank split code *is*
> > particularly bad, but I think the effort to fix/rewrite it in the
> > current register is probably 50% of the effort to rewrite the whole
> > register.
> > I looked pretty deeply into the register code a couple months ago
> > and I don't remember seeing any relatioship between transaction
> > scrubbing code and the transaction dirtying. Could you point me
> > toward what you mean?
> xaccTransCommitEdit() calls xaccScrubTrans() which calls a bunch of other
> functions that add the extra splits and dirty the books.
> The problem is that the register creates the blank transaction and blank split
> and then calls xaccTransBeginEdit() and xaccTransCommitEdit() immediately,
> before the user has created any data in the split. This causes the additional
> split(s) to get created and commited, too, thereby dirtying the book.
> What NEEDS to happen is that the register should call xaccTransBeginEdit() when
> it creates the blank split/trans but _NOT_ call xaccTransCommitEdit() until
> after the user actually enters data into the thing.
I disagree. Moving the cursor through the register (which creates a
blank split on each Transaction I move through) should not call
xaccTransBeginEdit (and presumably xaccTransRollback) for each
Transaction. xaccTransBeginEdit should only be called once the user
starts to change data.
> I do NOT believe this is 50% of a register rewrite. Far from it; I think it's
> maybe a day or two of work for someone who doesn't know the register to move
> that CommitEdit() and make sure the Begin's and Commit's are properly balanced
> in all cases.
> I am fairly confident that this will solve the problem.
If the Rollback doesn't dirty anything, then you may be right, but I
don't think this is the best solution. However, it may be better than
> > -chris
> > > David
> 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