[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xdg
Subject: Re: Configuration API
From: Waldo Bastian <bastian () kde ! org>
Date: 2004-04-29 20:31:42
Message-ID: 200404292231.42918.bastian () kde ! org
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu April 29 2004 19:06, Sean Middleditch wrote:
> These schemas can even be used in app-specific preferences windows. For
> example, say we have a web browser and it has a key (an integer) which
> maps to an enumeration controlling some behaviour (load all images, load
> images from same server, do not load images). The schema could specify
> the format as an enum with values 1, 2, 3 and labels "All Images",
> "Images from Server", and "No Images". (The labels could even include
> translations.) This will make gconf-editor look a little cleaner for
> this specific setting. But the browser preferences window could also
> use this information. This way, the developer needs only change their
> code that uses the preference (the image loading check) and their schema
> file; their UI maps accordingly. It reduces the effort put into a
> preferences window, reduces the chance of things getting out of sync,
> keeps documentation/translations in one place instead of two (or more),
> and so on.
This is what we do with KConfigXT. The on-disk config contains e.g.
"AllImages" and the lookup code translates that back to an enum value such as
EnumAllImages.
It's also possible to map such entry directly to a widget in a preference
dialog, a combo-box for example. In that case the specification of the
config-entry should also have translatable labels for all of the enum values.
Cheers,
Waldo
- --
bastian@kde.org | SUSE Linux 9.1 Order Now! | bastian@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFAkWYuN4pvrENfboIRAorlAKCn+BoswJo5jg2eP3Wg/PNc1dIOWACcDBJf
FaMpE7l0rU2z2nTz/v/WKcY=
=a9l0
-----END PGP SIGNATURE-----
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic