diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | TODO | 20 | ||||
-rw-r--r-- | doc/gconf/gconf-decl.txt | 2 | ||||
-rw-r--r-- | doc/gconf/gconf-sections.txt | 2 | ||||
-rw-r--r-- | doc/gconf/tmpl/gconf.sgml | 4 | ||||
-rw-r--r-- | doc/intro-article.sgml | 2 | ||||
-rw-r--r-- | gconf/gconf-changeset.h | 6 | ||||
-rw-r--r-- | gconf/gconf-schema.h | 54 | ||||
-rw-r--r-- | gconf/gconf-value.h | 11 | ||||
-rw-r--r-- | gconf/gconf.c | 2 | ||||
-rw-r--r-- | gconf/gconf.h | 54 | ||||
-rw-r--r-- | tests/testchangeset.c | 2 | ||||
-rw-r--r-- | tests/testgconf.c | 4 | ||||
-rw-r--r-- | tests/testpersistence.c | 4 |
14 files changed, 114 insertions, 62 deletions
@@ -1,3 +1,12 @@ +2000-09-10 Havoc Pennington <hp@pobox.com> + + * gconf/gconf-value.h: remove GCONF_INTERNAL_VALUE_TYPE_VALID + + * gconf/gconf.h: #ifdef the GNOME module system and popt stuff for + GNOME 1.4. This stuff is tied to GNOME 2.0 and still unstable in + that respect; should not be used before GNOME 2.0 + (gconf_get_string): forgot to rename this earlier + 2000-09-09 Havoc Pennington <hp@pobox.com> * gconf/gconfd.c (half_hour_timeout): Convert one_hour_timeout to @@ -18,6 +18,22 @@ workstation config files. * Change _() to actually call gettext or dgettext +* Change GConfEntry::key to be the full key, not a subdir + name + +* Add gconf_engine_key_is_writable() + +* Make sure accessors are named _get_foo() (e.g. GConfSchema, + GConfValue, GConfMetaInfo, GConfEntry) + +* Check for more _destroy() that should be _free() + +* Fill out the GConfEntry API, it doesn't look complete. + +* Privatize the GConfError stuff except error domain and codes + +* Remove goofy "dummy" thing in GConfEngine + Maybe 1.4 === @@ -91,3 +107,7 @@ Future comes from the backend. Hmm. * Use a real DTD and a nicer structure for the XML backend format + +* Implement server-side search + +* Implement batch gets
\ No newline at end of file diff --git a/doc/gconf/gconf-decl.txt b/doc/gconf/gconf-decl.txt index 8ea8a98c..79eb7f12 100644 --- a/doc/gconf/gconf-decl.txt +++ b/doc/gconf/gconf-decl.txt @@ -1682,7 +1682,7 @@ GConfEngine *conf,const gchar *key,GError **err GConfEngine *conf,const gchar *key,GError **err </FUNCTION> <FUNCTION> -<NAME>gconf_get_string</NAME> +<NAME>gconf_engine_get_string</NAME> <RETURNS>gchar *</RETURNS> GConfEngine *conf,const gchar *key,GError **err </FUNCTION> diff --git a/doc/gconf/gconf-sections.txt b/doc/gconf/gconf-sections.txt index b6c7e3f9..a282043c 100644 --- a/doc/gconf/gconf-sections.txt +++ b/doc/gconf/gconf-sections.txt @@ -270,7 +270,7 @@ gconf_valid_key gconf_key_is_below gconf_engine_get_float gconf_engine_get_int -gconf_get_string +gconf_engine_get_string gconf_engine_get_bool gconf_engine_get_schema gconf_engine_get_list diff --git a/doc/gconf/tmpl/gconf.sgml b/doc/gconf/tmpl/gconf.sgml index 40d88fce..87128bb6 100644 --- a/doc/gconf/tmpl/gconf.sgml +++ b/doc/gconf/tmpl/gconf.sgml @@ -181,7 +181,7 @@ This function is basically for internal use. <para> Returns the default value stored in the key's schema, if the key has a schema associated and the schema exists and the schema contains a default value. Note -that gconf_engine_get (), gconf_get_string(), and so on already return the default value +that gconf_engine_get (), gconf_engine_get_string(), and so on already return the default value if no other value is found, so normally you do not need this function. This function is just for convenience; you could also get the #GConfMetaInfo for the key, read the schema name from there, then look up the schema by name and @@ -362,7 +362,7 @@ stored at @key, an error is returned. On error, or if @key is unset, @Returns: the value of @key, or 0 if no value is obtained. -<!-- ##### FUNCTION gconf_get_string ##### --> +<!-- ##### FUNCTION gconf_engine_get_string ##### --> <para> Requests the string (%GCONF_VALUE_STRING) stored at @key. Automatically performs type-checking, so if a non-string is diff --git a/doc/intro-article.sgml b/doc/intro-article.sgml index 39c243a3..08f39f9e 100644 --- a/doc/intro-article.sgml +++ b/doc/intro-article.sgml @@ -511,7 +511,7 @@ arguments and returns a <structname>GConfValue</structname>. There are also convenience wrappers such as - <function>gconf_get_string()</function> and + <function>gconf_engine_get_string()</function> and <function>gconf_engine_get_int()</function> that allow you to avoid the pesky <structname>GConfValue</structname> union. </para> diff --git a/gconf/gconf-changeset.h b/gconf/gconf-changeset.h index fed44afb..01cc779e 100644 --- a/gconf/gconf-changeset.h +++ b/gconf/gconf-changeset.h @@ -43,8 +43,10 @@ typedef void (* GConfChangeSetForeachFunc) (GConfChangeSet* cs, gboolean gconf_engine_commit_change_set (GConfEngine* conf, GConfChangeSet* cs, - /* remove all successfully committed - changes from the set */ + /* remove all + successfully + committed changes + from the set */ gboolean remove_committed, GError** err); diff --git a/gconf/gconf-schema.h b/gconf/gconf-schema.h index 907759d9..c58a55d8 100644 --- a/gconf/gconf-schema.h +++ b/gconf/gconf-schema.h @@ -44,29 +44,41 @@ struct _GConfSchema { GConfValue* default_value; /* Default value of the key */ }; -GConfSchema* gconf_schema_new(void); -void gconf_schema_free(GConfSchema* sc); -GConfSchema* gconf_schema_copy(GConfSchema* sc); +GConfSchema* gconf_schema_new (void); +void gconf_schema_free (GConfSchema *sc); +GConfSchema* gconf_schema_copy (GConfSchema *sc); -void gconf_schema_set_type(GConfSchema* sc, GConfValueType type); -void gconf_schema_set_list_type(GConfSchema* sc, GConfValueType type); -void gconf_schema_set_car_type(GConfSchema* sc, GConfValueType type); -void gconf_schema_set_cdr_type(GConfSchema* sc, GConfValueType type); -void gconf_schema_set_locale(GConfSchema* sc, const gchar* locale); -void gconf_schema_set_short_desc(GConfSchema* sc, const gchar* desc); -void gconf_schema_set_long_desc(GConfSchema* sc, const gchar* desc); -void gconf_schema_set_owner(GConfSchema* sc, const gchar* owner); -void gconf_schema_set_default_value(GConfSchema* sc, GConfValue* val); -void gconf_schema_set_default_value_nocopy(GConfSchema* sc, GConfValue* val); +void gconf_schema_set_type (GConfSchema *sc, + GConfValueType type); +void gconf_schema_set_list_type (GConfSchema *sc, + GConfValueType type); +void gconf_schema_set_car_type (GConfSchema *sc, + GConfValueType type); +void gconf_schema_set_cdr_type (GConfSchema *sc, + GConfValueType type); +void gconf_schema_set_locale (GConfSchema *sc, + const gchar *locale); +void gconf_schema_set_short_desc (GConfSchema *sc, + const gchar *desc); +void gconf_schema_set_long_desc (GConfSchema *sc, + const gchar *desc); +void gconf_schema_set_owner (GConfSchema *sc, + const gchar *owner); +void gconf_schema_set_default_value (GConfSchema *sc, + GConfValue *val); +void gconf_schema_set_default_value_nocopy (GConfSchema *sc, + GConfValue *val); -#define gconf_schema_type(x) (x->type) -#define gconf_schema_list_type(x) (x->list_type) -#define gconf_schema_car_type(x) (x->car_type) -#define gconf_schema_cdr_type(x) (x->cdr_type) -#define gconf_schema_locale(x) ((const gchar*)(x)->locale) -#define gconf_schema_short_desc(x) ((const gchar*)(x)->short_desc) -#define gconf_schema_long_desc(x) ((const gchar*)(x)->long_desc) -#define gconf_schema_owner(x) ((const gchar*)(x)->owner) + + +#define gconf_schema_type(x) (x->type) +#define gconf_schema_list_type(x) (x->list_type) +#define gconf_schema_car_type(x) (x->car_type) +#define gconf_schema_cdr_type(x) (x->cdr_type) +#define gconf_schema_locale(x) ((const gchar*)(x)->locale) +#define gconf_schema_short_desc(x) ((const gchar*)(x)->short_desc) +#define gconf_schema_long_desc(x) ((const gchar*)(x)->long_desc) +#define gconf_schema_owner(x) ((const gchar*)(x)->owner) #define gconf_schema_default_value(x) ((x)->default_value) #endif diff --git a/gconf/gconf-value.h b/gconf/gconf-value.h index d44219ce..aab8311d 100644 --- a/gconf/gconf-value.h +++ b/gconf/gconf-value.h @@ -47,8 +47,6 @@ typedef enum { } GConfValueType; #define GCONF_VALUE_TYPE_VALID(x) (((x) > GCONF_VALUE_INVALID) && ((x) <= GCONF_VALUE_PAIR)) -/* allows the internal ignore-subsequent value type (which no longer exists) */ -#define GCONF_INTERNAL_VALUE_TYPE_VALID(x) (((x) > GCONF_VALUE_INVALID) && ((x) <= GCONF_VALUE_PAIR)) /* Forward declaration */ typedef struct _GConfSchema GConfSchema; @@ -119,8 +117,9 @@ void gconf_value_set_list (GConfValue* value, gchar* gconf_value_to_string (GConfValue* value); -/* Meta-information about a key. Not the same as a schema; a schema - * is normative, this is descriptive. +/* Meta-information about a key. Not the same as a schema; this is + * information stored on the key, the schema is a specification + * that may apply to this key. */ typedef struct _GConfMetaInfo GConfMetaInfo; @@ -158,8 +157,8 @@ struct _GConfEntry { gboolean is_default; }; -#define gconf_entry_key(x) ((const gchar*)(x)->key) -#define gconf_entry_value(x) ((x)->value) +#define gconf_entry_key(x) ((const gchar*)(x)->key) +#define gconf_entry_value(x) ((x)->value) #define gconf_entry_schema_name(x) ((x)->schema_name) #define gconf_entry_is_default(x) ((x)->is_default) diff --git a/gconf/gconf.c b/gconf/gconf.c index 03ac6c83..0a303ded 100644 --- a/gconf/gconf.c +++ b/gconf/gconf.c @@ -2360,7 +2360,7 @@ gconf_engine_get_int (GConfEngine* conf, const gchar* key, } gchar* -gconf_get_string(GConfEngine* conf, const gchar* key, +gconf_engine_get_string(GConfEngine* conf, const gchar* key, GError** err) { GConfValue* val; diff --git a/gconf/gconf.h b/gconf/gconf.h index 07b9c9f7..439f74d2 100644 --- a/gconf/gconf.h +++ b/gconf/gconf.h @@ -32,7 +32,12 @@ extern "C" { gboolean gconf_is_initialized (void); -typedef void (*GConfNotifyFunc)(GConfEngine* conf, guint cnxn_id, const gchar* key, GConfValue* value, gboolean is_default, gpointer user_data); +typedef void (*GConfNotifyFunc) (GConfEngine* conf, + guint cnxn_id, + const gchar* key, + GConfValue* value, + gboolean is_default, + gpointer user_data); /* Returns ID of the notification */ /* returns 0 on error, 0 is an invalid ID */ @@ -89,9 +94,10 @@ gboolean gconf_engine_unset (GConfEngine *conf, /* - * schema_key should have a schema (if key stores a value) or a dir full of schemas - * (if key stores a directory name) + * schema_key should have a schema (if key stores a value) or a dir + * full of schemas (if key stores a directory name) */ + gboolean gconf_engine_associate_schema (GConfEngine *conf, const gchar *key, const gchar *schema_key, @@ -146,9 +152,9 @@ gint gconf_engine_get_int (GConfEngine *conf, /* free the retval, retval can be NULL for "unset" */ -gchar* gconf_get_string (GConfEngine *conf, - const gchar *key, - GError **err); +gchar* gconf_engine_get_string (GConfEngine *conf, + const gchar *key, + GError **err); gboolean gconf_engine_get_bool (GConfEngine *conf, const gchar *key, GError **err); @@ -232,9 +238,29 @@ gboolean gconf_engine_set_pair (GConfEngine *conf, GError **err); +/* Utility function converts enumerations to and from strings */ +typedef struct _GConfEnumStringPair GConfEnumStringPair; + +struct _GConfEnumStringPair { + gint enum_value; + const gchar* str; +}; + +gboolean gconf_string_to_enum (GConfEnumStringPair lookup_table[], + const gchar *str, + gint *enum_value_retloc); +const gchar* gconf_enum_to_string (GConfEnumStringPair lookup_table[], + gint enum_value); gboolean gconf_init (int argc, char **argv, GError** err); +/* No, you can't use this stuff. Bad application developer. Bad. */ +#ifdef GCONF_ENABLE_INTERNALS + +/* This stuff is only useful in GNOME 2.0, so isn't in this GConf + * release. + */ + /* For use by the Gnome module system */ void gconf_preinit(gpointer app, gpointer mod_info); void gconf_postinit(gpointer app, gpointer mod_info); @@ -250,22 +276,6 @@ extern const char gconf_version[]; extern struct poptOption gconf_options[]; #endif -/* Utility function converts enumerations to and from strings */ -typedef struct _GConfEnumStringPair GConfEnumStringPair; - -struct _GConfEnumStringPair { - gint enum_value; - const gchar* str; -}; - -gboolean gconf_string_to_enum (GConfEnumStringPair lookup_table[], - const gchar *str, - gint *enum_value_retloc); -const gchar* gconf_enum_to_string (GConfEnumStringPair lookup_table[], - gint enum_value); - -/* No, you can't use this function. Bad application developer. Bad. */ -#ifdef GCONF_ENABLE_INTERNALS void gconf_clear_cache(GConfEngine* conf, GError** err); void gconf_synchronous_sync(GConfEngine* conf, GError** err); #endif diff --git a/tests/testchangeset.c b/tests/testchangeset.c index c96ed902..56fff639 100644 --- a/tests/testchangeset.c +++ b/tests/testchangeset.c @@ -231,7 +231,7 @@ check_string_storage(GConfEngine* conf) { gchar* gotten; - gotten = gconf_get_string(conf, *keyp, &err); + gotten = gconf_engine_get_string(conf, *keyp, &err); if (err != NULL) { diff --git a/tests/testgconf.c b/tests/testgconf.c index 98dfd59f..c28092a9 100644 --- a/tests/testgconf.c +++ b/tests/testgconf.c @@ -207,7 +207,7 @@ check_string_storage(GConfEngine* conf) } else { - gotten = gconf_get_string(conf, *keyp, &err); + gotten = gconf_engine_get_string(conf, *keyp, &err); if (err != NULL) { @@ -251,7 +251,7 @@ check_string_storage(GConfEngine* conf) err = NULL; } - gotten = gconf_get_string(conf, *keyp, &err); + gotten = gconf_engine_get_string(conf, *keyp, &err); if (err != NULL) { diff --git a/tests/testpersistence.c b/tests/testpersistence.c index a992cb8d..4e3c0733 100644 --- a/tests/testpersistence.c +++ b/tests/testpersistence.c @@ -218,7 +218,7 @@ check_string_storage(GConfEngine* conf) { sync_and_clear(conf); - gotten = gconf_get_string(conf, *keyp, &err); + gotten = gconf_engine_get_string(conf, *keyp, &err); if (err != NULL) { @@ -264,7 +264,7 @@ check_string_storage(GConfEngine* conf) sync_and_clear(conf); - gotten = gconf_get_string(conf, *keyp, &err); + gotten = gconf_engine_get_string(conf, *keyp, &err); if (err != NULL) { |