Oswald Buddenhagen ossi at kde.org
Mon Jun 30 22:46:39 BST 2003

On Mon, Jun 30, 2003 at 01:25:01PM -0400, Ian Reinhart Geiser wrote:
> > if it was changed from a combobox to a listbox, or god forbid a
> > tree, or radio buttons, or.... then a configuration file change
> > would be necessary
> This would be true if this was so extreme, but its not. 
it is. it happened in kcm_kdm already.

> Currently it seems this issue is just for combo boxes and lists...
> Things like radio boxes are immune.  
would you explain this? i consider a read-only combo box and a radio
group exactly the same from the backend's point of view. i'd even
implement a kautoconfig element that behaves like a combo box but is a
radio group in fact.
in any case, for both combo boxes and radio groups, "made-up"
GUI-independent enum values are necessary. if we (== waldo :) finally
implement the kconfig XT stuff, i'd go that far to create new
functions "QString readEnumEntry(const QString &key)" &
"writeEntry(const QString &key, const QString &value)" - essentially
normal string variants, but in debug mode kconfig would check the
validity of the values.
hmm, we could even make kconfig present numeric values - to consider:
- requires kconfig XT (so kconfig knows the values in the first place)
- the apps use numbers, not human-readable ascii constants, so typically
  an enum would have to be defined in the code. the main problem here is
  keeping the enum in sync with the key map (the implicit definition by
  the documented default config entry - the basis of kconfig XT).
  ideally, a header with the enums would be created from the default
  config file at compile time.
- for the kcm part, if the enum value is directly used by a combo,
  things become almost trivial: the value can be used directly as an
  index without adding any further code (i.e., as it is now, but without
  the downsides). if the combo is reordered or values change or
  something, the definition of the enum in the def config file can be
  simply adjusted - the concrete numbers don't matter as long as
  everything is consistent.


Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
Chaos, panic, and disorder - my work here is done.

More information about the kde-core-devel mailing list