r21182 - gnucash/trunk/src - Implement a balance for owners and show it on the owners view page

Geert Janssens janssens-geert at telenet.be
Wed Aug 17 05:02:21 EDT 2011


On zaterdag 13 augustus 2011, Christian Stimming wrote:
> Hi Geert,
> 
Hi Christian,

Thank you for your feedback.

> thanks for the improvements around GncOwner. Is this some more "customer"-
> related work? Great :-)
> 
Yes, it is :)

> Just a small remark about adding code to src/app-utils/gnc-ui-util.h: I
> don't like that file. It has no single intent whatsoever, but is just an
> unsorted collection of "stuff that had to go into app-utils". As you just
> needed to add three more functions to that file, could you perhaps
> consider moving your needed functions to a separate file such as
> app-utils/gnc-owner-conversions. [hc] or similar? My point is that your
> three functions do have something in common, namely the dealing with
> GncOwner and some conversions that are in src/app-utils (but not in
> src/engine). For that reason it would perfectly make sens to have a file
> for exactly this. In contrast to this, the gnc-ui-util.h file just
> contains things where no other useful location could be found easily, or
> that's how I understand that file in retrospect.
> 
These functions have moved around quite a bit already ;)

I first wanted to add them straight into gncOwner, because that's where they 
would make most sense. Unfortunately that wasn't possible because there's a 
dependency to a gconf setting (default report currency). This means a gtk 
dependency and hence it should go to some gui part.

My next thought was, ok this is business related, so let's add it to 
gncBusiness in business/business-gnome, but I quickly had to abandon that idea 
since the functions need to be called from gnome-utils (where I chose to add 
the owner tree view and models).

Eventually I ended up in app-utils, and the gnc-ui-util files already 
contained some balance calculation functions for accounts. So I figured it 
would be a good candidate for the extra owner balance calculation functions.

But as you state it, it would be better to instead rip out all the balance 
calculation functions and create separate files for them.

Do you think it makes sense to add one file for all the balance functions 
(owner and account related) or would it be better to make one file for the 
owner balances and one for the account balances ?

Geert


More information about the gnucash-devel mailing list