Kevin Finn writes:
> On Tue, 04 Jul 2000, Dave Peticolas wrote:
> > Robert Graham Merkel writes:
> > > Kevin Finn writes:
> > > >
> [...]
> >
> > Disabling by name would be just fine. Keep in mind, though, that disabling
> > would most often be done in scheme, or at least the information that one
> > option's sensitivity depends on another option's value should be stored
> > in the scheme option structure. The option GUI code should not know the
> > 'meaning' of the options -- it just implements the GUI.
> >
>
> That makes sense. I wasn't entirely clear on the distinction between the
> responsibilities of the scheme and the top-level.c code, but that clears it u
top-level.c can use the meanings of the options, it's dialog-options.c
that should be 'meaning neutral'.
>
> So the callback from when the boolean is changed might need to change the val
> of the no-longer-editable option to a "safe" value? What about the case wher
> we make an option non-editable due to something besides another option, for
> example we disable an option if the account balance is zero or something like
> that. Since there's no boolean option to check for whether our non-editable
> option is editable or not, do we need to provide a way to query the editable
> status of the option? Can we query the Gtk+ "sensitive" status of a widget,
> do we have to store that state?
You can query the sensitivity state of a widget using the gtk argument
api, but I still don't think we should equate 'user editable in the
gui' and 'changeable by implementation code'. I don't see a problem in
general with the implementation code setting or reading the value of
an option with an insensitive widget.
I suppose it might be useful to make an option value read-only or
completely inaccessible, but I wonder if that would create more
complexity than its worth. Just because a currently 'irrelevant' value
is being read, doesn't mean it's going to be used incorrectly. For
example, it may just be used to save the option to another
representation.
dave
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]