[RFC] A differnt options system

Chris Shoemaker c.shoemaker at cox.net
Wed Feb 16 10:33:24 EST 2005


On Tue, Feb 15, 2005 at 11:38:50PM -0800, Chris Lyttle wrote:
> On Wed, 2005-02-16 at 01:16 -0500, Chris Shoemaker wrote:
> > Background: I'm mainly interested in getting budgeting to work, but
> > along the way I discovered that the options system in gnucash wasn't
> > exactly up to doing what I needed and, frankly, it looked like it was
> > going to be a major headache to make it work for me.
> > 
> > So, on the side, I'm trying to come up with an options system that
> > does what I want, and maybe can be generally useful, too.  Consider
> > the attached a rough-draft.  All the usually first-draft caveats
> > apply.  It's probably buggy, etc.  (Although it passes enough unit
> > tests to suggest that at least the idea isn't fundamentally flawed.)
> 
> Chris,
> 
> I saw a mention towards the end of the header of gconf, and I remember
> reading some time back about how gnome in general was moving towards
> using gconf as a container for prefs, is that what you're trying to
> achieve here for gnucash?

Well, I know very little about gconf, so I may be wrong, but I think
of it a global _storage_ container for program preferences with
persistence across program executions and potentially sharing between
programs.

My code doesn't provide any storage for option values.  And the
potential uses for this code that I'm considering most closely are the
type that set option values that are local to a particular object, not
overall program preferences.  But I know that overall program
preferences currently use the scheme options system, so I was trying
to suggest a potential storage method for that type of option that
could be used my options code.  Actually, I don't even know how
overall program preferences are stored by gnucash now.

[Following a hunch, I look in ~/.gnucash] Oh, ok.  I have a vague idea
how they're stored.  ;) That wouldn't work with my options system,
because it doesn't generate scheme code.  So yeah, the mention of
gconf was off-the-cuff.  The important point is that my code doesn't
provide gconf-like functionality, which the existing options system
does.  For global program preferences, using gconf with my options
system may provide functionality similar to the existing options
system.  [Note: I think that my approach has some merit even if only
used for the "object properties" case and not the "program
preferences" case.]

-chris


More information about the gnucash-devel mailing list