schema default value and locale values
- From: Colm Smyth <Colm Smyth ireland sun com>
- To: gconf-list gnome org
- Subject: schema default value and locale values
- Date: Fri, 15 Sep 2000 10:24:48 +0100 (BST)
Hi,
One thing that isn't clear to me from the documentation
is the handling of the schema default value relative to
locale values.
The documentation for the query_value() function of the backend
says:
"This method must be implemented if the source is readable. It returns
the value of a key. The "locales" argument is a NULL-terminated vector
of locale names, where the first locale in the vector is the preferred
locale, the next is the second choice, etc. if the "schema_name"
argument is non-NULL, then it should be filled with an allocated string
giving the name of the schema attached to the key, if and only if NULL
is returned. This is an optimization to avoid looking up the same key
again in the database if it's unset and we need to ask for its default
value from the schema. If NULL is returned, indicating that the key is
unset, then schema_name should not be filled in. If this method sets an
error, NULL must be returned. It may not set an error while also
returning a value. The returned value will be destroyed by the caller,
so should be a copy of the backend's internal data."
I assume that the sentence "If NULL is returned, indicating that the key is
unset, then schema_name should not be filled in" means that if NULL
is returned, the schema-name is also NULL because neither a value nor
a schema were found.
Also, the sources and backend API's allow multiple locales to be
checked simultaneously, but the public API's only allow a single
locale to be checked.
I suggest:
- a new API be provided in GNOME 2.0 to allow a GConf client to set the
list of locales that will be passed by GConf to the -sources and
-backend API's
- that the precedence of locales and schemas be defined as:
1. search the locales for a value
2. search the schema for each locale for a value
Colm.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]