How to commit prefs before the user presses "Apply"?

Dave Peticolas peticola@krondo.com
Sun, 06 Aug 2000 10:14:47 -0700


Kevin Finn writes:
> On Fri, 04 Aug 2000, Dave Peticolas wrote:
> > Kevin Finn writes:
> > > 
> > >       Is there a way to force the setting of an option right away?  I sup
> pose
> > > could add a flag to the generic options structure that would make it call
>  the
> > > setter right away, but I'm hesitant to make such a large change to the op
> tion
> > > structure if there's an easier way.
> > > 
> > 
> > There isn't an easier way, but I think this needs to be done in a slightly
> > different way. We can't change the option value until the user hits 'Ok'
> > or 'Apply' under any circumstances -- that violates the semantics of the
> > dialog.
> > 
> > So, I think options need a new callback that is invoked whenever the
> > GUI implementation of the option is changed by the user. The callback
> > would be invoked with the new value as an argument. Would you like to
> > work on this?
> > 
> 
> So a generic addition to gnc:make-option (and the functions that call it) for
> this callback?  I guess then make-complex-boolean-option wouldn't really be
> necessary for this case, although I'll still send the patch for it.

Yes, exactly. But I think make-complex-boolean would still be useful
since most boolean options won't use the callback.

dave