How to commit prefs before the user presses "Apply"?
Kevin Finn
kevinfinn@mediaone.net
Sun, 6 Aug 2000 11:00:29 -0500
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 suppose
> > 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 option
> > 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.
> Hi Kevin, it occurred to me that solving the problem you mentioned
> will also probably require a callback when the dialog is opened so
> the 'partner' option can be grayed out as appropriate. This is
> getting complicated :)
That makes sense. I can take a look at this stuff.
Kevin Finn
kevinfinn@mediaone.net