diff options
author | Havoc Pennington <hp@redhat.com> | 2000-09-13 17:49:44 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-09-13 17:49:44 +0000 |
commit | 2eff8e053f3539a212137effe0cf0e99962fe2e1 (patch) | |
tree | 6889505f2a4ebd3a7f0e4508890a08367af7edc4 | |
parent | d1e883b56f142baa06145265b3ad7de4cf2d943d (diff) | |
download | gconf-2eff8e053f3539a212137effe0cf0e99962fe2e1.tar.gz |
s/gconf_meta_info_schema/gconf_meta_info_get_schema/g;
2000-09-13 Havoc Pennington <hp@redhat.com>
* More renaming:
s/gconf_meta_info_schema/gconf_meta_info_get_schema/g;
s/gconf_meta_info_mod_user/gconf_meta_info_get_mod_user/g;
s/gconf_meta_info_mod_time/gconf_meta_info_mod_time/g;
s/gconf_entry_key/gconf_entry_get_key/g;
s/gconf_entry_value/gconf_entry_get_value/g;
s/gconf_entry_schema_name/gconf_entry_get_schema_name/g;
s/gconf_entry_is_default/gconf_entry_get_is_default/g;
s/gconf_value_string/gconf_value_get_string/g;
s/gconf_value_int/gconf_value_get_int/g;
s/gconf_value_float/gconf_value_get_float/g;
s/gconf_value_list_type/gconf_value_get_list_type/g;
s/gconf_value_list/gconf_value_get_list/g;
s/gconf_value_car/gconf_value_get_car/g;
s/gconf_value_cdr/gconf_value_get_cdr/g;
s/gconf_value_bool/gconf_value_get_bool/g;
s/gconf_value_schema/gconf_value_get_schema/g;
s/gconf_schema_type/gconf_schema_get_type/g;
s/gconf_schema_list_type/gconf_schema_get_list_type/g;
s/gconf_schema_car_type/gconf_schema_get_car_type/g;
s/gconf_schema_cdr_type/gconf_schema_get_cdr_type/g;
s/gconf_schema_locale/gconf_schema_get_locale/g;
s/gconf_schema_short_desc/gconf_schema_get_short_desc/g;
s/gconf_schema_long_desc/gconf_schema_get_long_desc/g;
s/gconf_schema_owner/gconf_schema_get_owner/g;
s/gconf_schema_default_value/gconf_schema_get_default_value/g;
-rw-r--r-- | ChangeLog | 33 | ||||
-rw-r--r-- | backends/xml-entry.c | 20 | ||||
-rw-r--r-- | doc/gconf/gconf-decl.txt | 96 | ||||
-rw-r--r-- | doc/gconf/gconf-sections.txt | 48 | ||||
-rw-r--r-- | doc/gconf/gconf.sgml | 18 | ||||
-rw-r--r-- | doc/gconf/tmpl/gconf-schema.sgml | 18 | ||||
-rw-r--r-- | doc/gconf/tmpl/gconf-value.sgml | 36 | ||||
-rw-r--r-- | doc/intro-article.sgml | 2 | ||||
-rw-r--r-- | examples/basic-gconf-app.c | 8 | ||||
-rw-r--r-- | examples/simple-view.c | 2 | ||||
-rw-r--r-- | gconf/gconf-client.c | 14 | ||||
-rw-r--r-- | gconf/gconf-database.c | 2 | ||||
-rw-r--r-- | gconf/gconf-internals.c | 88 | ||||
-rw-r--r-- | gconf/gconf-schema.h | 18 | ||||
-rw-r--r-- | gconf/gconf-sources.c | 38 | ||||
-rw-r--r-- | gconf/gconf-value.c | 24 | ||||
-rw-r--r-- | gconf/gconf-value.h | 30 | ||||
-rw-r--r-- | gconf/gconf.c | 12 | ||||
-rw-r--r-- | gconf/gconftool.c | 24 | ||||
-rw-r--r-- | gconf/gnome-testclient.c | 4 | ||||
-rw-r--r-- | gconf/testgconfclient.c | 2 | ||||
-rw-r--r-- | tests/testschemas.c | 40 | ||||
-rw-r--r-- | wrappers/gtk/gconf-client.c | 14 | ||||
-rw-r--r-- | wrappers/gtk/testgconfclient.c | 2 | ||||
-rw-r--r-- | wrappers/guile/scm-gconf.c | 12 |
25 files changed, 319 insertions, 286 deletions
@@ -1,5 +1,38 @@ 2000-09-13 Havoc Pennington <hp@redhat.com> + * More renaming: + + s/gconf_meta_info_schema/gconf_meta_info_get_schema/g; + s/gconf_meta_info_mod_user/gconf_meta_info_get_mod_user/g; + s/gconf_meta_info_mod_time/gconf_meta_info_mod_time/g; + + s/gconf_entry_key/gconf_entry_get_key/g; + s/gconf_entry_value/gconf_entry_get_value/g; + s/gconf_entry_schema_name/gconf_entry_get_schema_name/g; + s/gconf_entry_is_default/gconf_entry_get_is_default/g; + + s/gconf_value_string/gconf_value_get_string/g; + s/gconf_value_int/gconf_value_get_int/g; + s/gconf_value_float/gconf_value_get_float/g; + s/gconf_value_list_type/gconf_value_get_list_type/g; + s/gconf_value_list/gconf_value_get_list/g; + s/gconf_value_car/gconf_value_get_car/g; + s/gconf_value_cdr/gconf_value_get_cdr/g; + s/gconf_value_bool/gconf_value_get_bool/g; + s/gconf_value_schema/gconf_value_get_schema/g; + + s/gconf_schema_type/gconf_schema_get_type/g; + s/gconf_schema_list_type/gconf_schema_get_list_type/g; + s/gconf_schema_car_type/gconf_schema_get_car_type/g; + s/gconf_schema_cdr_type/gconf_schema_get_cdr_type/g; + s/gconf_schema_locale/gconf_schema_get_locale/g; + s/gconf_schema_short_desc/gconf_schema_get_short_desc/g; + s/gconf_schema_long_desc/gconf_schema_get_long_desc/g; + s/gconf_schema_owner/gconf_schema_get_owner/g; + s/gconf_schema_default_value/gconf_schema_get_default_value/g; + +2000-09-13 Havoc Pennington <hp@redhat.com> + * gconf/gconf.c (gconf_engine_all_entries): Put full key in GConfEntry (but we only get the relative key over the CORBA wire) diff --git a/backends/xml-entry.c b/backends/xml-entry.c index 50d12e90..aaf4bae1 100644 --- a/backends/xml-entry.c +++ b/backends/xml-entry.c @@ -117,7 +117,7 @@ entry_get_value(Entry* e, const gchar** locales, GError** err) g_assert(e->cached_value->type == GCONF_VALUE_SCHEMA); - sl = gconf_schema_locale(gconf_value_schema(e->cached_value)); + sl = gconf_schema_get_locale(gconf_value_get_schema(e->cached_value)); /* optimize most common cases first */ if (sl == NULL && (locales == NULL || @@ -437,7 +437,7 @@ node_set_schema_value(xmlNodePtr node, const gchar* type; xmlNodePtr found = NULL; - sc = gconf_value_schema(value); + sc = gconf_value_get_schema(value); /* Set the types */ if (sc->list_type != GCONF_VALUE_INVALID) @@ -466,7 +466,7 @@ node_set_schema_value(xmlNodePtr node, my_xmlSetProp(node, "stype", gconf_value_type_to_string(sc->type)); my_xmlSetProp(node, "owner", sc->owner); - locale = gconf_schema_locale(sc); + locale = gconf_schema_get_locale(sc); gconf_log(GCL_DEBUG, "Setting XML node to schema with locale `%s'", locale); @@ -536,7 +536,7 @@ node_set_value(xmlNodePtr node, GConfValue* value) free_childs(node); encoded = xmlEncodeEntitiesReentrant(node->doc, - gconf_value_string(value)); + gconf_value_get_string(value)); child = xmlNewChild(node, NULL, "stringvalue", encoded); @@ -555,10 +555,10 @@ node_set_value(xmlNodePtr node, GConfValue* value) free_childs(node); my_xmlSetProp(node, "ltype", - gconf_value_type_to_string(gconf_value_list_type(value))); + gconf_value_type_to_string(gconf_value_get_list_type(value))); /* Add a new child for each node */ - list = gconf_value_list(value); + list = gconf_value_get_list(value); while (list != NULL) { @@ -584,11 +584,11 @@ node_set_value(xmlNodePtr node, GConfValue* value) car = xmlNewChild(node, NULL, "car", NULL); cdr = xmlNewChild(node, NULL, "cdr", NULL); - g_return_if_fail(gconf_value_car(value) != NULL); - g_return_if_fail(gconf_value_cdr(value) != NULL); + g_return_if_fail(gconf_value_get_car(value) != NULL); + g_return_if_fail(gconf_value_get_cdr(value) != NULL); - node_set_value(car, gconf_value_car(value)); - node_set_value(cdr, gconf_value_cdr(value)); + node_set_value(car, gconf_value_get_car(value)); + node_set_value(cdr, gconf_value_get_cdr(value)); } break; diff --git a/doc/gconf/gconf-decl.txt b/doc/gconf/gconf-decl.txt index ae87ea2e..694570a1 100644 --- a/doc/gconf/gconf-decl.txt +++ b/doc/gconf/gconf-decl.txt @@ -1132,40 +1132,40 @@ GConfSchema* sc, GConfValue* val GConfSchema* sc, GConfValue* val </FUNCTION> <MACRO> -<NAME>gconf_schema_type</NAME> -#define gconf_schema_type(x) (x->type) +<NAME>gconf_schema_get_type</NAME> +#define gconf_schema_get_type(x) (x->type) </MACRO> <MACRO> -<NAME>gconf_schema_list_type</NAME> -#define gconf_schema_list_type(x) (x->list_type) +<NAME>gconf_schema_get_list_type</NAME> +#define gconf_schema_get_list_type(x) (x->list_type) </MACRO> <MACRO> -<NAME>gconf_schema_car_type</NAME> -#define gconf_schema_car_type(x) (x->car_type) +<NAME>gconf_schema_get_car_type</NAME> +#define gconf_schema_get_car_type(x) (x->car_type) </MACRO> <MACRO> -<NAME>gconf_schema_cdr_type</NAME> -#define gconf_schema_cdr_type(x) (x->cdr_type) +<NAME>gconf_schema_get_cdr_type</NAME> +#define gconf_schema_get_cdr_type(x) (x->cdr_type) </MACRO> <MACRO> -<NAME>gconf_schema_locale</NAME> -#define gconf_schema_locale(x) ((const gchar*)(x)->locale) +<NAME>gconf_schema_get_locale</NAME> +#define gconf_schema_get_locale(x) ((const gchar*)(x)->locale) </MACRO> <MACRO> -<NAME>gconf_schema_short_desc</NAME> -#define gconf_schema_short_desc(x) ((const gchar*)(x)->short_desc) +<NAME>gconf_schema_get_short_desc</NAME> +#define gconf_schema_get_short_desc(x) ((const gchar*)(x)->short_desc) </MACRO> <MACRO> -<NAME>gconf_schema_long_desc</NAME> -#define gconf_schema_long_desc(x) ((const gchar*)(x)->long_desc) +<NAME>gconf_schema_get_long_desc</NAME> +#define gconf_schema_get_long_desc(x) ((const gchar*)(x)->long_desc) </MACRO> <MACRO> -<NAME>gconf_schema_owner</NAME> -#define gconf_schema_owner(x) ((const gchar*)(x)->owner) +<NAME>gconf_schema_get_owner</NAME> +#define gconf_schema_get_owner(x) ((const gchar*)(x)->owner) </MACRO> <MACRO> -<NAME>gconf_schema_default_value</NAME> -#define gconf_schema_default_value(x) ((x)->default_value) +<NAME>gconf_schema_get_default_value</NAME> +#define gconf_schema_get_default_value(x) ((x)->default_value) </MACRO> <STRUCT> <NAME>GConfBackend</NAME> @@ -1345,40 +1345,40 @@ struct GConfValue { }; </STRUCT> <MACRO> -<NAME>gconf_value_string</NAME> -#define gconf_value_string(x) ((const gchar*)((x)->d.string_data)) +<NAME>gconf_value_get_string</NAME> +#define gconf_value_get_string(x) ((const gchar*)((x)->d.string_data)) </MACRO> <MACRO> -<NAME>gconf_value_int</NAME> -#define gconf_value_int(x) ((x)->d.int_data) +<NAME>gconf_value_get_int</NAME> +#define gconf_value_get_int(x) ((x)->d.int_data) </MACRO> <MACRO> -<NAME>gconf_value_float</NAME> -#define gconf_value_float(x) ((x)->d.float_data) +<NAME>gconf_value_get_float</NAME> +#define gconf_value_get_float(x) ((x)->d.float_data) </MACRO> <MACRO> -<NAME>gconf_value_list_type</NAME> -#define gconf_value_list_type(x) ((x)->d.list_data.type) +<NAME>gconf_value_get_list_type</NAME> +#define gconf_value_get_list_type(x) ((x)->d.list_data.type) </MACRO> <MACRO> -<NAME>gconf_value_list</NAME> -#define gconf_value_list(x) ((x)->d.list_data.list) +<NAME>gconf_value_get_list</NAME> +#define gconf_value_get_list(x) ((x)->d.list_data.list) </MACRO> <MACRO> -<NAME>gconf_value_car</NAME> -#define gconf_value_car(x) ((x)->d.pair_data.car) +<NAME>gconf_value_get_car</NAME> +#define gconf_value_get_car(x) ((x)->d.pair_data.car) </MACRO> <MACRO> -<NAME>gconf_value_cdr</NAME> -#define gconf_value_cdr(x) ((x)->d.pair_data.cdr) +<NAME>gconf_value_get_cdr</NAME> +#define gconf_value_get_cdr(x) ((x)->d.pair_data.cdr) </MACRO> <MACRO> -<NAME>gconf_value_bool</NAME> -#define gconf_value_bool(x) ((x)->d.bool_data) +<NAME>gconf_value_get_bool</NAME> +#define gconf_value_get_bool(x) ((x)->d.bool_data) </MACRO> <MACRO> -<NAME>gconf_value_schema</NAME> -#define gconf_value_schema(x) ((x)->d.schema_data) +<NAME>gconf_value_get_schema</NAME> +#define gconf_value_get_schema(x) ((x)->d.schema_data) </MACRO> <FUNCTION> <NAME>gconf_value_new</NAME> @@ -1477,12 +1477,12 @@ struct GConfMetaInfo { }; </STRUCT> <MACRO> -<NAME>gconf_meta_info_schema</NAME> -#define gconf_meta_info_schema(x) ((const gchar*)(x)->schema) +<NAME>gconf_meta_info_get_schema</NAME> +#define gconf_meta_info_get_schema(x) ((const gchar*)(x)->schema) </MACRO> <MACRO> -<NAME>gconf_meta_info_mod_user</NAME> -#define gconf_meta_info_mod_user(x) ((x)->mod_user) +<NAME>gconf_meta_info_get_mod_user</NAME> +#define gconf_meta_info_get_mod_user(x) ((x)->mod_user) </MACRO> <MACRO> <NAME>gconf_meta_info_mod_time</NAME> @@ -1526,20 +1526,20 @@ struct GConfEntry { }; </STRUCT> <MACRO> -<NAME>gconf_entry_key</NAME> -#define gconf_entry_key(x) ((const gchar*)(x)->key) +<NAME>gconf_entry_get_key</NAME> +#define gconf_entry_get_key(x) ((const gchar*)(x)->key) </MACRO> <MACRO> -<NAME>gconf_entry_value</NAME> -#define gconf_entry_value(x) ((x)->value) +<NAME>gconf_entry_get_value</NAME> +#define gconf_entry_get_value(x) ((x)->value) </MACRO> <MACRO> -<NAME>gconf_entry_schema_name</NAME> -#define gconf_entry_schema_name(x) ((x)->schema_name) +<NAME>gconf_entry_get_schema_name</NAME> +#define gconf_entry_get_schema_name(x) ((x)->schema_name) </MACRO> <MACRO> -<NAME>gconf_entry_is_default</NAME> -#define gconf_entry_is_default(x) ((x)->is_default) +<NAME>gconf_entry_get_is_default</NAME> +#define gconf_entry_get_is_default(x) ((x)->is_default) </MACRO> <FUNCTION> <NAME>gconf_entry_new_nocopy</NAME> diff --git a/doc/gconf/gconf-sections.txt b/doc/gconf/gconf-sections.txt index 0fc799c3..29b72c44 100644 --- a/doc/gconf/gconf-sections.txt +++ b/doc/gconf/gconf-sections.txt @@ -154,15 +154,15 @@ gconf_schema_set_long_desc gconf_schema_set_owner gconf_schema_set_default_value gconf_schema_set_default_value_nocopy -gconf_schema_type -gconf_schema_locale -gconf_schema_short_desc -gconf_schema_long_desc -gconf_schema_owner -gconf_schema_default_value -gconf_schema_car_type -gconf_schema_cdr_type -gconf_schema_list_type +gconf_schema_get_type +gconf_schema_get_locale +gconf_schema_get_short_desc +gconf_schema_get_long_desc +gconf_schema_get_owner +gconf_schema_get_default_value +gconf_schema_get_car_type +gconf_schema_get_cdr_type +gconf_schema_get_list_type gconf_schema_set_car_type gconf_schema_set_cdr_type gconf_schema_set_list_type @@ -200,15 +200,15 @@ GCONF_INTERNAL_VALUE_TYPE_VALID gconf_value_new gconf_value_copy gconf_value_free -gconf_value_string -gconf_value_int -gconf_value_float -gconf_value_list_type -gconf_value_list -gconf_value_car -gconf_value_cdr -gconf_value_bool -gconf_value_schema +gconf_value_get_string +gconf_value_get_int +gconf_value_get_float +gconf_value_get_list_type +gconf_value_get_list +gconf_value_get_car +gconf_value_get_cdr +gconf_value_get_bool +gconf_value_get_schema gconf_value_set_int gconf_value_set_string gconf_value_set_float @@ -226,8 +226,8 @@ gconf_value_to_string GConfMetaInfo gconf_meta_info_new gconf_meta_info_free -gconf_meta_info_schema -gconf_meta_info_mod_user +gconf_meta_info_get_schema +gconf_meta_info_get_mod_user gconf_meta_info_mod_time gconf_meta_info_set_schema gconf_meta_info_set_mod_user @@ -235,11 +235,11 @@ gconf_meta_info_set_mod_time GConfEntry gconf_entry_new_nocopy gconf_entry_free -gconf_entry_key -gconf_entry_value +gconf_entry_get_key +gconf_entry_get_value gconf_entry_steal_value -gconf_entry_is_default -gconf_entry_schema_name +gconf_entry_get_is_default +gconf_entry_get_schema_name gconf_entry_set_is_default gconf_entry_set_schema_name gconf_entry_set_value_nocopy diff --git a/doc/gconf/gconf.sgml b/doc/gconf/gconf.sgml index 26f4a04f..a4de1044 100644 --- a/doc/gconf/gconf.sgml +++ b/doc/gconf/gconf.sgml @@ -713,27 +713,27 @@ print_value(GConfValue* value) switch (value->type) { case GCONF_VALUE_STRING: - printf("%s\n", gconf_value_string(value)); + printf("%s\n", gconf_value_get_string(value)); break; case GCONF_VALUE_INT: - printf("%d\n", gconf_value_int(value)); + printf("%d\n", gconf_value_get_int(value)); break; case GCONF_VALUE_FLOAT: - printf("%g\n", gconf_value_float(value)); + printf("%g\n", gconf_value_get_float(value)); break; case GCONF_VALUE_BOOL: - printf("%s", gconf_value_bool(value) ? "true" : "false"); + printf("%s", gconf_value_get_bool(value) ? "true" : "false"); break; case GCONF_VALUE_SCHEMA: { - GConfSchema* schema = gconf_value_schema(value); + GConfSchema* schema = gconf_value_get_schema(value); /* printing a schema would be complicated, you get the idea */ } break; case GCONF_VALUE_LIST: { - GSList* iter = gconf_value_list(value); + GSList* iter = gconf_value_get_list(value); while (iter != NULL) { @@ -746,8 +746,8 @@ print_value(GConfValue* value) } break; case GCONF_VALUE_PAIR: - print_value(gconf_value_car(value)); - print_value(gconf_value_cdr(value)); + print_value(gconf_value_get_car(value)); + print_value(gconf_value_get_cdr(value)); break; case GCONF_VALUE_INVALID: /* This is used internally by GConf, you can also @@ -768,7 +768,7 @@ print_value(GConfValue* value) A special note about values of type <symbol>GCONF_VALUE_LIST</symbol>: the list contains <structname>GConfValue</structname> objects, and all objects in the list must have the same type. You can get the type of - the list with the <function>gconf_value_list_type()</function> macro. + the list with the <function>gconf_value_get_list_type()</function> macro. </para> </sect2> diff --git a/doc/gconf/tmpl/gconf-schema.sgml b/doc/gconf/tmpl/gconf-schema.sgml index 67edea3e..674e2787 100644 --- a/doc/gconf/tmpl/gconf-schema.sgml +++ b/doc/gconf/tmpl/gconf-schema.sgml @@ -117,7 +117,7 @@ gconf-schema @val: -<!-- ##### MACRO gconf_schema_type ##### --> +<!-- ##### MACRO gconf_schema_get_type ##### --> <para> </para> @@ -125,7 +125,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_locale ##### --> +<!-- ##### MACRO gconf_schema_get_locale ##### --> <para> </para> @@ -133,7 +133,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_short_desc ##### --> +<!-- ##### MACRO gconf_schema_get_short_desc ##### --> <para> </para> @@ -141,7 +141,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_long_desc ##### --> +<!-- ##### MACRO gconf_schema_get_long_desc ##### --> <para> </para> @@ -149,7 +149,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_owner ##### --> +<!-- ##### MACRO gconf_schema_get_owner ##### --> <para> </para> @@ -157,7 +157,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_default_value ##### --> +<!-- ##### MACRO gconf_schema_get_default_value ##### --> <para> </para> @@ -165,7 +165,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_car_type ##### --> +<!-- ##### MACRO gconf_schema_get_car_type ##### --> <para> </para> @@ -173,7 +173,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_cdr_type ##### --> +<!-- ##### MACRO gconf_schema_get_cdr_type ##### --> <para> </para> @@ -181,7 +181,7 @@ gconf-schema @x: -<!-- ##### MACRO gconf_schema_list_type ##### --> +<!-- ##### MACRO gconf_schema_get_list_type ##### --> <para> </para> diff --git a/doc/gconf/tmpl/gconf-value.sgml b/doc/gconf/tmpl/gconf-value.sgml index c1bd16e4..efee7f57 100644 --- a/doc/gconf/tmpl/gconf-value.sgml +++ b/doc/gconf/tmpl/gconf-value.sgml @@ -113,7 +113,7 @@ inside the #GConfValue (such as lists, pair members, strings, and schemas). @value: a #GConfValue to destroy. -<!-- ##### MACRO gconf_value_string ##### --> +<!-- ##### MACRO gconf_value_get_string ##### --> <para> Returns a <symbol>const gchar*</symbol> for a #GConfValue with type %GCONF_VALUE_STRING. The returned string is <emphasis>not</emphasis> a @@ -131,7 +131,7 @@ uninitialized #GConfValue. @x: a #GConfValue. -<!-- ##### MACRO gconf_value_int ##### --> +<!-- ##### MACRO gconf_value_get_int ##### --> <para> Returns a #gint for a #GConfValue with type %GCONF_VALUE_INT. </para> @@ -139,7 +139,7 @@ Returns a #gint for a #GConfValue with type %GCONF_VALUE_INT. @x: a #GConfValue. -<!-- ##### MACRO gconf_value_float ##### --> +<!-- ##### MACRO gconf_value_get_float ##### --> <para> Returns a #gdouble for a #GConfValue with type %GCONF_VALUE_DOUBLE. </para> @@ -147,7 +147,7 @@ Returns a #gdouble for a #GConfValue with type %GCONF_VALUE_DOUBLE. @x: a #GConfValue. -<!-- ##### MACRO gconf_value_list_type ##### --> +<!-- ##### MACRO gconf_value_get_list_type ##### --> <para> Returns the type of the list elements in a #GConfValue with type %GCONF_VALUE_LIST. @@ -156,11 +156,11 @@ Returns the type of the list elements in a #GConfValue with type @x: a #GConfValue. -<!-- ##### MACRO gconf_value_list ##### --> +<!-- ##### MACRO gconf_value_get_list ##### --> <para> Returns a #GSList containing #GConfValue objects. Each #GConfValue in the returned list will have the type returned by -gconf_value_list_type(). Remember that the empty #GSList is equal to +gconf_value_get_list_type(). Remember that the empty #GSList is equal to <symbol>NULL</symbol>. The list is not a copy; it is "owned" by the #GConfValue and will be destroyed when the #GConfValue is destroyed. </para> @@ -168,7 +168,7 @@ gconf_value_list_type(). Remember that the empty #GSList is equal to @x: a #GConfValue. -<!-- ##### MACRO gconf_value_car ##### --> +<!-- ##### MACRO gconf_value_get_car ##### --> <para> Returns the first member (car) of a #GConfValue with type %GCONF_VALUE_PAIR. The car is another #GConfValue, with a primitive @@ -183,7 +183,7 @@ be destroyed when the pair is destroyed. @x: a #GConfValue. -<!-- ##### MACRO gconf_value_cdr ##### --> +<!-- ##### MACRO gconf_value_get_cdr ##### --> <para> Returns the second member (cdr) of a #GConfValue with type %GCONF_VALUE_PAIR. The cdr is another #GConfValue, with a primitive @@ -198,7 +198,7 @@ be destroyed when the pair is destroyed. @x: a #GConfValue. -<!-- ##### MACRO gconf_value_bool ##### --> +<!-- ##### MACRO gconf_value_get_bool ##### --> <para> Returns a #gboolean for a #GConfValue with type %GCONF_VALUE_BOOL. </para> @@ -206,7 +206,7 @@ Returns a #gboolean for a #GConfValue with type %GCONF_VALUE_BOOL. @x: a #GConfValue. -<!-- ##### MACRO gconf_value_schema ##### --> +<!-- ##### MACRO gconf_value_get_schema ##### --> <para> Returns a #GConfSchema for a #GConfValue with type %GCONF_VALUE_SCHEMA. If the #GConfValue is uninitialized, it @@ -278,7 +278,7 @@ gconf_value_set_schema_nocopy(). Sets the value of a #GConfValue with type %GCONF_VALUE_SCHEMA. The #GConfSchema is <emphasis>not</emphasis> copied; the #GConfValue takes ownership of it, and it should only be -accessed via the gconf_value_schema() macro. This function is provided +accessed via the gconf_value_get_schema() macro. This function is provided as a more efficient version of gconf_value_set_schema(). </para> @@ -412,7 +412,7 @@ with g_free(). @gcmi: -<!-- ##### MACRO gconf_meta_info_schema ##### --> +<!-- ##### MACRO gconf_meta_info_get_schema ##### --> <para> </para> @@ -420,7 +420,7 @@ with g_free(). @x: -<!-- ##### MACRO gconf_meta_info_mod_user ##### --> +<!-- ##### MACRO gconf_meta_info_get_mod_user ##### --> <para> </para> @@ -468,7 +468,7 @@ with g_free(). Stores a key-value pair. @key should be an absolute key, not a relative key. (Note that internally GConf breaks this rule sometimes; but in the public interface, @key is always an absolute key.) To access the key and value, use -gconf_entry_key() and gconf_entry_value(). +gconf_entry_get_key() and gconf_entry_get_value(). </para> @key: an absolute key name @@ -497,7 +497,7 @@ Destroys a #GConfEntry, freeing the key, the value, and the entry itself. @entry: a #GConfEntry to free. -<!-- ##### MACRO gconf_entry_key ##### --> +<!-- ##### MACRO gconf_entry_get_key ##### --> <para> Accesses the @key field of a #GConfEntry. The returned key is not a copy, and should not be freed or modified. @@ -506,7 +506,7 @@ copy, and should not be freed or modified. @x: a #GConfEntry. -<!-- ##### MACRO gconf_entry_value ##### --> +<!-- ##### MACRO gconf_entry_get_value ##### --> <para> Accesses the @value field of a #GConfEntry. The returned value is not a copy, and should not be freed or modified. If you have called @@ -529,7 +529,7 @@ gconf_entry_steal_value() assumes ownership of it. @Returns: a #GConfValue that the caller must free. -<!-- ##### MACRO gconf_entry_is_default ##### --> +<!-- ##### MACRO gconf_entry_get_is_default ##### --> <para> </para> @@ -537,7 +537,7 @@ gconf_entry_steal_value() assumes ownership of it. @x: -<!-- ##### MACRO gconf_entry_schema_name ##### --> +<!-- ##### MACRO gconf_entry_get_schema_name ##### --> <para> </para> diff --git a/doc/intro-article.sgml b/doc/intro-article.sgml index 08f39f9e..939eea48 100644 --- a/doc/intro-article.sgml +++ b/doc/intro-article.sgml @@ -654,7 +654,7 @@ key_changed_callback(GConfClient* client, { if (value->type == GCONF_VALUE_STRING) { - gtk_label_set(GTK_LABEL(label), gconf_value_string(value)); + gtk_label_set(GTK_LABEL(label), gconf_value_get_string(value)); } else { diff --git a/examples/basic-gconf-app.c b/examples/basic-gconf-app.c index dde55c18..1dae53b1 100644 --- a/examples/basic-gconf-app.c +++ b/examples/basic-gconf-app.c @@ -142,7 +142,7 @@ configurable_widget_config_notify(GConfClient* client, } else if (value->type == GCONF_VALUE_STRING) { - gtk_label_set_text(GTK_LABEL(label), gconf_value_string(value)); + gtk_label_set_text(GTK_LABEL(label), gconf_value_get_string(value)); } else { @@ -391,7 +391,7 @@ update_entry(GtkWidget* dialog, GConfChangeSet* cs, const gchar* config_key) { if (def->type == GCONF_VALUE_STRING) { - gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_string(def)); + gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_get_string(def)); } else g_warning("Wrong type for default value of %s", config_key); @@ -403,7 +403,7 @@ update_entry(GtkWidget* dialog, GConfChangeSet* cs, const gchar* config_key) } else if (value->type == GCONF_VALUE_STRING) { - gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_string(value)); + gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_get_string(value)); } else { @@ -501,7 +501,7 @@ create_config_entry(GtkWidget* prefs_dialog, GConfClient* client, const gchar* c if (initial != NULL && initial->type == GCONF_VALUE_STRING) { - const gchar* str = gconf_value_string(initial); + const gchar* str = gconf_value_get_string(initial); gtk_entry_set_text(GTK_ENTRY(entry), str); } diff --git a/examples/simple-view.c b/examples/simple-view.c index 08f8009d..8b852bd7 100644 --- a/examples/simple-view.c +++ b/examples/simple-view.c @@ -44,7 +44,7 @@ key_changed_callback(GConfClient* client, { if (value->type == GCONF_VALUE_STRING) { - gtk_label_set(GTK_LABEL(label), gconf_value_string(value)); + gtk_label_set(GTK_LABEL(label), gconf_value_get_string(value)); } else { diff --git a/gconf/gconf-client.c b/gconf/gconf-client.c index 4a690bf7..b805a317 100644 --- a/gconf/gconf-client.c +++ b/gconf/gconf-client.c @@ -824,8 +824,8 @@ cache_pairs_in_dir(GConfClient* client, const gchar* dir) GConfEntry* pair = tmp->data; gconf_client_cache(client, - gconf_entry_key (pair), - gconf_entry_is_default(pair), + gconf_entry_get_key (pair), + gconf_entry_get_is_default(pair), gconf_entry_steal_value(pair)); gconf_entry_free(pair); @@ -1159,7 +1159,7 @@ gconf_client_get_float (GConfClient* client, const gchar* key, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_FLOAT, &error)) - retval = gconf_value_float(val); + retval = gconf_value_get_float(val); else handle_error(client, error, err); @@ -1194,7 +1194,7 @@ gconf_client_get_int (GConfClient* client, const gchar* key, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_INT, &error)) - retval = gconf_value_int(val); + retval = gconf_value_get_int(val); else handle_error(client, error, err); @@ -1230,7 +1230,7 @@ gconf_client_get_string(GConfClient* client, const gchar* key, if (check_type(key, val, GCONF_VALUE_STRING, &error)) /* we cheat here (look below) so we have to cast this */ - retval = (gchar *)gconf_value_string(val); + retval = (gchar *)gconf_value_get_string(val); else handle_error(client, error, err); @@ -1272,7 +1272,7 @@ gconf_client_get_bool (GConfClient* client, const gchar* key, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_BOOL, &error)) - retval = gconf_value_bool(val); + retval = gconf_value_get_bool(val); else handle_error(client, error, err); @@ -1306,7 +1306,7 @@ gconf_client_get_schema (GConfClient* client, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_SCHEMA, &error)) - retval = gconf_value_schema(val); + retval = gconf_value_get_schema(val); else handle_error(client, error, err); diff --git a/gconf/gconf-database.c b/gconf/gconf-database.c index 2d5bb7c6..efc281ab 100644 --- a/gconf/gconf-database.c +++ b/gconf/gconf-database.c @@ -321,7 +321,7 @@ impl_ConfigDatabase_all_entries(PortableServer_Servant servant, (*keys)->_buffer[i] = CORBA_string_dup(p->key); fill_corba_value_from_gconf_value(p->value, &((*values)->_buffer[i])); - (*is_defaults)->_buffer[i] = gconf_entry_is_default(p); + (*is_defaults)->_buffer[i] = gconf_entry_get_is_default(p); gconf_entry_free(p); diff --git a/gconf/gconf-internals.c b/gconf/gconf-internals.c index 2d7fb01d..db95ef3b 100644 --- a/gconf/gconf-internals.c +++ b/gconf/gconf-internals.c @@ -231,7 +231,7 @@ gconf_value_from_corba_value(const ConfigValue* value) break; } - if (gconf_value_list_type(gval) != GCONF_VALUE_INVALID) + if (gconf_value_get_list_type(gval) != GCONF_VALUE_INVALID) { i = 0; while (i < value->_u.list_value.seq._length) @@ -247,7 +247,7 @@ gconf_value_from_corba_value(const ConfigValue* value) if (val == NULL) gconf_log(GCL_ERR, _("Couldn't interpret CORBA value for list element")); - else if (val->type != gconf_value_list_type(gval)) + else if (val->type != gconf_value_get_list_type(gval)) gconf_log(GCL_ERR, _("Incorrect type for list element in %s"), __FUNCTION__); else list = g_slist_prepend(list, val); @@ -298,23 +298,23 @@ fill_corba_value_from_gconf_value(GConfValue* value, { case GCONF_VALUE_INT: cv->_d = IntVal; - cv->_u.int_value = gconf_value_int(value); + cv->_u.int_value = gconf_value_get_int(value); break; case GCONF_VALUE_STRING: cv->_d = StringVal; - cv->_u.string_value = CORBA_string_dup((char*)gconf_value_string(value)); + cv->_u.string_value = CORBA_string_dup((char*)gconf_value_get_string(value)); break; case GCONF_VALUE_FLOAT: cv->_d = FloatVal; - cv->_u.float_value = gconf_value_float(value); + cv->_u.float_value = gconf_value_get_float(value); break; case GCONF_VALUE_BOOL: cv->_d = BoolVal; - cv->_u.bool_value = gconf_value_bool(value); + cv->_u.bool_value = gconf_value_get_bool(value); break; case GCONF_VALUE_SCHEMA: cv->_d = SchemaVal; - fill_corba_schema_from_gconf_schema(gconf_value_schema(value), + fill_corba_schema_from_gconf_schema(gconf_value_get_schema(value), &cv->_u.schema_value); break; case GCONF_VALUE_LIST: @@ -324,7 +324,7 @@ fill_corba_value_from_gconf_value(GConfValue* value, cv->_d = ListVal; - list = gconf_value_list(value); + list = gconf_value_get_list(value); n = g_slist_length(list); @@ -334,7 +334,7 @@ fill_corba_value_from_gconf_value(GConfValue* value, cv->_u.list_value.seq._maximum = n; CORBA_sequence_set_release(&cv->_u.list_value.seq, TRUE); - switch (gconf_value_list_type(value)) + switch (gconf_value_get_list_type(value)) { case GCONF_VALUE_INT: cv->_u.list_value.list_type = BIntVal; @@ -385,9 +385,9 @@ fill_corba_value_from_gconf_value(GConfValue* value, CORBA_sequence_set_release(&cv->_u.pair_value, TRUE); /* dubious cast */ - fill_corba_value_from_gconf_value(gconf_value_car(value), + fill_corba_value_from_gconf_value(gconf_value_get_car(value), (ConfigValue*)&cv->_u.pair_value._buffer[0]); - fill_corba_value_from_gconf_value(gconf_value_cdr(value), + fill_corba_value_from_gconf_value(gconf_value_get_cdr(value), (ConfigValue*)&cv->_u.pair_value._buffer[1]); } break; @@ -526,7 +526,7 @@ fill_corba_schema_from_gconf_schema(GConfSchema* sc, gchar* encoded; GConfValue* default_val; - default_val = gconf_schema_default_value(sc); + default_val = gconf_schema_get_default_value(sc); if (default_val) { @@ -1323,7 +1323,7 @@ gconf_value_list_to_primitive_list_destructive(GConfValue* val, return NULL; } - if (gconf_value_list_type(val) != list_type) + if (gconf_value_get_list_type(val) != list_type) { if (err) *err = gconf_error_new(GCONF_ERROR_TYPE_MISMATCH, @@ -1334,9 +1334,9 @@ gconf_value_list_to_primitive_list_destructive(GConfValue* val, return NULL; } - g_assert(gconf_value_list_type(val) == list_type); + g_assert(gconf_value_get_list_type(val) == list_type); - retval = gconf_value_list(val); + retval = gconf_value_get_list(val); /* Cheating the API to avoid a list copy; set this to NULL to avoid destroying the list */ @@ -1362,13 +1362,13 @@ gconf_value_list_to_primitive_list_destructive(GConfValue* val, { case GCONF_VALUE_INT: case GCONF_VALUE_BOOL: - tmp->data = GINT_TO_POINTER(gconf_value_int(elem)); + tmp->data = GINT_TO_POINTER(gconf_value_get_int(elem)); break; case GCONF_VALUE_FLOAT: { gdouble* d = g_new(gdouble, 1); - *d = gconf_value_float(elem); + *d = gconf_value_get_float(elem); tmp->data = d; } break; @@ -1411,11 +1411,11 @@ primitive_value(gpointer retloc, GConfValue* val) switch (val->type) { case GCONF_VALUE_INT: - *((gint*)retloc) = gconf_value_int(val); + *((gint*)retloc) = gconf_value_get_int(val); break; case GCONF_VALUE_FLOAT: - *((gdouble*)retloc) = gconf_value_float(val); + *((gdouble*)retloc) = gconf_value_get_float(val); break; case GCONF_VALUE_STRING: @@ -1427,11 +1427,11 @@ primitive_value(gpointer retloc, GConfValue* val) break; case GCONF_VALUE_BOOL: - *((gboolean*)retloc) = gconf_value_bool(val); + *((gboolean*)retloc) = gconf_value_get_bool(val); break; case GCONF_VALUE_SCHEMA: - *((GConfSchema**)retloc) = gconf_value_schema(val); + *((GConfSchema**)retloc) = gconf_value_get_schema(val); break; default: @@ -1472,8 +1472,8 @@ gconf_value_pair_to_primitive_pair_destructive(GConfValue* val, return FALSE; } - car = gconf_value_car(val); - cdr = gconf_value_cdr(val); + car = gconf_value_get_car(val); + cdr = gconf_value_get_cdr(val); if (car == NULL || cdr == NULL) @@ -2000,19 +2000,19 @@ gconf_value_encode (GConfValue* val) switch (val->type) { case GCONF_VALUE_INT: - retval = g_strdup_printf("i%d", gconf_value_int(val)); + retval = g_strdup_printf("i%d", gconf_value_get_int(val)); break; case GCONF_VALUE_BOOL: - retval = g_strdup_printf("b%c", gconf_value_bool(val) ? 't' : 'f'); + retval = g_strdup_printf("b%c", gconf_value_get_bool(val) ? 't' : 'f'); break; case GCONF_VALUE_FLOAT: - retval = g_strdup_printf("f%g", gconf_value_float(val)); + retval = g_strdup_printf("f%g", gconf_value_get_float(val)); break; case GCONF_VALUE_STRING: - retval = g_strdup_printf("s%s", gconf_value_string(val)); + retval = g_strdup_printf("s%s", gconf_value_get_string(val)); break; case GCONF_VALUE_SCHEMA: @@ -2023,24 +2023,24 @@ gconf_value_encode (GConfValue* val) gchar* encoded; GConfSchema* sc; - sc = gconf_value_schema(val); + sc = gconf_value_get_schema(val); tmp = g_strdup_printf("c%c%c%c%c,", - type_byte(gconf_schema_type(sc)), - type_byte(gconf_schema_list_type(sc)), - type_byte(gconf_schema_car_type(sc)), - type_byte(gconf_schema_cdr_type(sc))); + type_byte(gconf_schema_get_type(sc)), + type_byte(gconf_schema_get_list_type(sc)), + type_byte(gconf_schema_get_car_type(sc)), + type_byte(gconf_schema_get_cdr_type(sc))); - quoted = gconf_quote_string(gconf_schema_locale(sc) ? - gconf_schema_locale(sc) : ""); + quoted = gconf_quote_string(gconf_schema_get_locale(sc) ? + gconf_schema_get_locale(sc) : ""); retval = g_strconcat(tmp, quoted, ",", NULL); g_free(tmp); g_free(quoted); tmp = retval; - quoted = gconf_quote_string(gconf_schema_short_desc(sc) ? - gconf_schema_short_desc(sc) : ""); + quoted = gconf_quote_string(gconf_schema_get_short_desc(sc) ? + gconf_schema_get_short_desc(sc) : ""); retval = g_strconcat(tmp, quoted, ",", NULL); @@ -2049,8 +2049,8 @@ gconf_value_encode (GConfValue* val) tmp = retval; - quoted = gconf_quote_string(gconf_schema_long_desc(sc) ? - gconf_schema_long_desc(sc) : ""); + quoted = gconf_quote_string(gconf_schema_get_long_desc(sc) ? + gconf_schema_get_long_desc(sc) : ""); retval = g_strconcat(tmp, quoted, ",", NULL); @@ -2058,8 +2058,8 @@ gconf_value_encode (GConfValue* val) g_free(quoted); - if (gconf_schema_default_value(sc) != NULL) - encoded = gconf_value_encode(gconf_schema_default_value(sc)); + if (gconf_schema_get_default_value(sc) != NULL) + encoded = gconf_value_encode(gconf_schema_get_default_value(sc)); else encoded = g_strdup(""); @@ -2079,9 +2079,9 @@ gconf_value_encode (GConfValue* val) { GSList* tmp; - retval = g_strdup_printf("l%c", type_byte(gconf_value_list_type(val))); + retval = g_strdup_printf("l%c", type_byte(gconf_value_get_list_type(val))); - tmp = gconf_value_list(val); + tmp = gconf_value_get_list(val); while (tmp != NULL) { @@ -2119,8 +2119,8 @@ gconf_value_encode (GConfValue* val) gchar* car_quoted; gchar* cdr_quoted; - car_encoded = gconf_value_encode(gconf_value_car(val)); - cdr_encoded = gconf_value_encode(gconf_value_cdr(val)); + car_encoded = gconf_value_encode(gconf_value_get_car(val)); + cdr_encoded = gconf_value_encode(gconf_value_get_cdr(val)); car_quoted = gconf_quote_string(car_encoded); cdr_quoted = gconf_quote_string(cdr_encoded); diff --git a/gconf/gconf-schema.h b/gconf/gconf-schema.h index c58a55d8..702d34a2 100644 --- a/gconf/gconf-schema.h +++ b/gconf/gconf-schema.h @@ -71,15 +71,15 @@ void gconf_schema_set_default_value_nocopy (GConfSchema *sc, -#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) +#define gconf_schema_get_type(x) (x->type) +#define gconf_schema_get_list_type(x) (x->list_type) +#define gconf_schema_get_car_type(x) (x->car_type) +#define gconf_schema_get_cdr_type(x) (x->cdr_type) +#define gconf_schema_get_locale(x) ((const gchar*)(x)->locale) +#define gconf_schema_get_short_desc(x) ((const gchar*)(x)->short_desc) +#define gconf_schema_get_long_desc(x) ((const gchar*)(x)->long_desc) +#define gconf_schema_get_owner(x) ((const gchar*)(x)->owner) +#define gconf_schema_get_default_value(x) ((x)->default_value) #endif diff --git a/gconf/gconf-sources.c b/gconf/gconf-sources.c index 84fbaf5e..44d9778a 100644 --- a/gconf/gconf-sources.c +++ b/gconf/gconf-sources.c @@ -496,9 +496,9 @@ gconf_sources_query_value (GConfSources* sources, } else if (val != NULL) { - GConfValue* retval = gconf_value_schema(val)->default_value; + GConfValue* retval = gconf_value_get_schema(val)->default_value; /* cheat, "unparent" the value to avoid a copy */ - gconf_value_schema(val)->default_value = NULL; + gconf_value_get_schema(val)->default_value = NULL; gconf_value_free(val); g_free(schema_name); @@ -755,15 +755,15 @@ hash_lookup_defaults_func(gpointer key, gpointer value, gpointer user_data) GConfSources *sources = dld->sources; const gchar** locales = dld->locales; - if (gconf_entry_value(entry) == NULL) + if (gconf_entry_get_value(entry) == NULL) { - if (gconf_entry_schema_name(entry) != NULL) + if (gconf_entry_get_schema_name(entry) != NULL) { GConfValue *val; val = gconf_sources_query_value(sources, - gconf_entry_schema_name(entry), + gconf_entry_get_schema_name(entry), locales, TRUE, NULL, @@ -772,9 +772,9 @@ hash_lookup_defaults_func(gpointer key, gpointer value, gpointer user_data) if (val != NULL && val->type == GCONF_VALUE_SCHEMA) { - GConfValue* defval = gconf_value_schema(val)->default_value; + GConfValue* defval = gconf_value_get_schema(val)->default_value; /* cheat, "unparent" the value to avoid a copy */ - gconf_value_schema(val)->default_value = NULL; + gconf_value_get_schema(val)->default_value = NULL; gconf_entry_set_value_nocopy(entry, defval); gconf_entry_set_is_default(entry, TRUE); @@ -855,7 +855,7 @@ gconf_sources_all_entries (GConfSources* sources, if (previous != NULL) { - if (gconf_entry_value(previous) != NULL) + if (gconf_entry_get_value(previous) != NULL) /* Discard this latest one */ ; else @@ -1074,18 +1074,18 @@ gconf_sources_query_metainfo (GConfSources* sources, { /* Fill in any missing fields of "mi" found in "this_mi", and pick the most recent mod time */ - if (gconf_meta_info_schema(mi) == NULL && - gconf_meta_info_schema(this_mi) != NULL) + if (gconf_meta_info_get_schema(mi) == NULL && + gconf_meta_info_get_schema(this_mi) != NULL) { gconf_meta_info_set_schema(mi, - gconf_meta_info_schema(mi)); + gconf_meta_info_get_schema(mi)); } - if (gconf_meta_info_mod_user(mi) == NULL && - gconf_meta_info_mod_user(this_mi) != NULL) + if (gconf_meta_info_get_mod_user(mi) == NULL && + gconf_meta_info_get_mod_user(this_mi) != NULL) { gconf_meta_info_set_mod_user(mi, - gconf_meta_info_mod_user(this_mi)); + gconf_meta_info_get_mod_user(this_mi)); } if (gconf_meta_info_mod_time(mi) < gconf_meta_info_mod_time(this_mi)) @@ -1133,14 +1133,14 @@ gconf_sources_query_default_value(GConfSources* sources, return NULL; } - if (gconf_meta_info_schema(mi) == NULL) + if (gconf_meta_info_get_schema(mi) == NULL) { gconf_meta_info_free(mi); return NULL; } val = gconf_sources_query_value(sources, - gconf_meta_info_schema(mi), locales, + gconf_meta_info_get_schema(mi), locales, TRUE, NULL, &error); if (val != NULL) @@ -1151,7 +1151,7 @@ gconf_sources_query_default_value(GConfSources* sources, { gconf_log(GCL_WARNING, _("Key `%s' listed as schema for key `%s' actually stores type `%s'"), - gconf_meta_info_schema(mi), + gconf_meta_info_get_schema(mi), key, gconf_value_type_to_string(val->type)); @@ -1161,7 +1161,7 @@ gconf_sources_query_default_value(GConfSources* sources, gconf_meta_info_free(mi); - schema = gconf_value_schema(val); + schema = gconf_value_get_schema(val); val->d.schema_data = NULL; /* cheat, steal schema from the GConfValue */ gconf_value_free(val); /* schema not destroyed due to our cheat */ @@ -1188,7 +1188,7 @@ gconf_sources_query_default_value(GConfSources* sources, else { gconf_log(GCL_ERR, _("Error getting value for `%s': %s"), - gconf_meta_info_schema(mi), + gconf_meta_info_get_schema(mi), error->message); g_error_free(error); } diff --git a/gconf/gconf-value.c b/gconf/gconf-value.c index 71c80217..692c8821 100644 --- a/gconf/gconf-value.c +++ b/gconf/gconf-value.c @@ -498,22 +498,22 @@ gconf_value_to_string(GConfValue* value) switch (value->type) { case GCONF_VALUE_INT: - retval = g_strdup_printf("%d", gconf_value_int(value)); + retval = g_strdup_printf("%d", gconf_value_get_int(value)); break; case GCONF_VALUE_FLOAT: - retval = gconf_double_to_string(gconf_value_float(value)); + retval = gconf_double_to_string(gconf_value_get_float(value)); break; case GCONF_VALUE_STRING: - retval = g_strdup(gconf_value_string(value)); + retval = g_strdup(gconf_value_get_string(value)); break; case GCONF_VALUE_BOOL: - retval = gconf_value_bool(value) ? g_strdup("true") : g_strdup("false"); + retval = gconf_value_get_bool(value) ? g_strdup("true") : g_strdup("false"); break; case GCONF_VALUE_LIST: { GSList* list; - list = gconf_value_list(value); + list = gconf_value_get_list(value); if (list == NULL) retval = g_strdup("[]"); @@ -586,10 +586,10 @@ gconf_value_to_string(GConfValue* value) gchar* car; gchar* cdr; - tmp = gconf_value_to_string(gconf_value_car(value)); + tmp = gconf_value_to_string(gconf_value_get_car(value)); car = escape_string(tmp, ",)"); g_free(tmp); - tmp = gconf_value_to_string(gconf_value_cdr(value)); + tmp = gconf_value_to_string(gconf_value_get_cdr(value)); cdr = escape_string(tmp, ",)"); g_free(tmp); retval = g_strdup_printf("(%s,%s)", car, cdr); @@ -609,11 +609,11 @@ gconf_value_to_string(GConfValue* value) const gchar* car_type; const gchar* cdr_type; - locale = gconf_schema_locale(gconf_value_schema(value)); - type = gconf_value_type_to_string(gconf_schema_type(gconf_value_schema(value))); - list_type = gconf_value_type_to_string(gconf_schema_list_type(gconf_value_schema(value))); - car_type = gconf_value_type_to_string(gconf_schema_car_type(gconf_value_schema(value))); - cdr_type = gconf_value_type_to_string(gconf_schema_cdr_type(gconf_value_schema(value))); + locale = gconf_schema_get_locale(gconf_value_get_schema(value)); + type = gconf_value_type_to_string(gconf_schema_get_type(gconf_value_get_schema(value))); + list_type = gconf_value_type_to_string(gconf_schema_get_list_type(gconf_value_get_schema(value))); + car_type = gconf_value_type_to_string(gconf_schema_get_car_type(gconf_value_get_schema(value))); + cdr_type = gconf_value_type_to_string(gconf_schema_get_cdr_type(gconf_value_get_schema(value))); retval = g_strdup_printf("Schema (type: `%s' list_type: '%s' " "car_type: '%s' cdr_type: '%s' locale: `%s')", diff --git a/gconf/gconf-value.h b/gconf/gconf-value.h index 75007e14..0b75ca5f 100644 --- a/gconf/gconf-value.h +++ b/gconf/gconf-value.h @@ -72,15 +72,15 @@ struct _GConfValue { } d; }; -#define gconf_value_string(x) ((const gchar*)((x)->d.string_data)) -#define gconf_value_int(x) ((x)->d.int_data) -#define gconf_value_float(x) ((x)->d.float_data) -#define gconf_value_list_type(x) ((x)->d.list_data.type) -#define gconf_value_list(x) ((x)->d.list_data.list) -#define gconf_value_car(x) ((x)->d.pair_data.car) -#define gconf_value_cdr(x) ((x)->d.pair_data.cdr) -#define gconf_value_bool(x) ((x)->d.bool_data) -#define gconf_value_schema(x) ((x)->d.schema_data) +#define gconf_value_get_string(x) ((const gchar*)((x)->d.string_data)) +#define gconf_value_get_int(x) ((x)->d.int_data) +#define gconf_value_get_float(x) ((x)->d.float_data) +#define gconf_value_get_list_type(x) ((x)->d.list_data.type) +#define gconf_value_get_list(x) ((x)->d.list_data.list) +#define gconf_value_get_car(x) ((x)->d.pair_data.car) +#define gconf_value_get_cdr(x) ((x)->d.pair_data.cdr) +#define gconf_value_get_bool(x) ((x)->d.bool_data) +#define gconf_value_get_schema(x) ((x)->d.schema_data) GConfValue* gconf_value_new (GConfValueType type); @@ -130,8 +130,8 @@ struct _GConfMetaInfo { GTime mod_time; /* time of the modification */ }; -#define gconf_meta_info_schema(x) ((const gchar*)(x)->schema) -#define gconf_meta_info_mod_user(x) ((x)->mod_user) +#define gconf_meta_info_get_schema(x) ((const gchar*)(x)->schema) +#define gconf_meta_info_get_mod_user(x) ((x)->mod_user) #define gconf_meta_info_mod_time(x) ((x)->mod_time) GConfMetaInfo* gconf_meta_info_new (void); @@ -157,10 +157,10 @@ struct _GConfEntry { gboolean is_default; }; -#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) +#define gconf_entry_get_key(x) ((const gchar*)(x)->key) +#define gconf_entry_get_value(x) ((x)->value) +#define gconf_entry_get_schema_name(x) ((const gchar*)(x)->schema_name) +#define gconf_entry_get_is_default(x) ((x)->is_default) GConfEntry* gconf_entry_new (const gchar *key, GConfValue *val); diff --git a/gconf/gconf.c b/gconf/gconf.c index cf2f60d2..59e5e026 100644 --- a/gconf/gconf.c +++ b/gconf/gconf.c @@ -839,9 +839,9 @@ gconf_engine_set (GConfEngine* conf, const gchar* key, g_return_val_if_fail(value != NULL, FALSE); g_return_val_if_fail(value->type != GCONF_VALUE_INVALID, FALSE); g_return_val_if_fail( (value->type != GCONF_VALUE_STRING) || - (gconf_value_string(value) != NULL) , FALSE ); + (gconf_value_get_string(value) != NULL) , FALSE ); g_return_val_if_fail( (value->type != GCONF_VALUE_LIST) || - (gconf_value_list_type(value) != GCONF_VALUE_INVALID), FALSE); + (gconf_value_get_list_type(value) != GCONF_VALUE_INVALID), FALSE); g_return_val_if_fail(err == NULL || *err == NULL, FALSE); if (!gconf_key_check(key, err)) @@ -2287,7 +2287,7 @@ gconf_engine_get_float (GConfEngine* conf, const gchar* key, return deflt; } - retval = gconf_value_float(val); + retval = gconf_value_get_float(val); gconf_value_free(val); @@ -2322,7 +2322,7 @@ gconf_engine_get_int (GConfEngine* conf, const gchar* key, return deflt; } - retval = gconf_value_int(val); + retval = gconf_value_get_int(val); gconf_value_free(val); @@ -2394,7 +2394,7 @@ gconf_engine_get_bool (GConfEngine* conf, const gchar* key, return deflt; } - retval = gconf_value_bool(val); + retval = gconf_value_get_bool(val); gconf_value_free(val); @@ -2427,7 +2427,7 @@ gconf_engine_get_schema (GConfEngine* conf, const gchar* key, GError** err) return NULL; } - retval = gconf_value_schema(val); + retval = gconf_value_get_schema(val); /* This is a cheat; don't copy */ val->d.schema_data = NULL; /* don't delete the schema */ diff --git a/gconf/gconftool.c b/gconf/gconftool.c index b6534d8d..057f10bf 100644 --- a/gconf/gconftool.c +++ b/gconf/gconftool.c @@ -782,7 +782,7 @@ list_pairs_in_dir(GConfEngine* conf, const gchar* dir, guint depth) s = g_strdup(_("(no value set)")); printf(" %s%s = %s\n", whitespace, - gconf_key_key (gconf_entry_key (pair)), + gconf_key_key (gconf_entry_get_key (pair)), s); g_free(s); @@ -873,14 +873,14 @@ do_get(GConfEngine* conf, const gchar** args) } else { - GConfSchema* sc = gconf_value_schema(value); - GConfValueType stype = gconf_schema_type(sc); - GConfValueType slist_type = gconf_schema_list_type(sc); - GConfValueType scar_type = gconf_schema_car_type(sc); - GConfValueType scdr_type = gconf_schema_cdr_type(sc); - const gchar* long_desc = gconf_schema_long_desc(sc); - const gchar* short_desc = gconf_schema_short_desc(sc); - const gchar* owner = gconf_schema_owner(sc); + GConfSchema* sc = gconf_value_get_schema(value); + GConfValueType stype = gconf_schema_get_type(sc); + GConfValueType slist_type = gconf_schema_get_list_type(sc); + GConfValueType scar_type = gconf_schema_get_car_type(sc); + GConfValueType scdr_type = gconf_schema_get_cdr_type(sc); + const gchar* long_desc = gconf_schema_get_long_desc(sc); + const gchar* short_desc = gconf_schema_get_short_desc(sc); + const gchar* owner = gconf_schema_get_owner(sc); printf(_("Type: %s\n"), gconf_value_type_to_string(stype)); printf(_("List Type: %s\n"), gconf_value_type_to_string(slist_type)); @@ -1722,7 +1722,7 @@ process_locale_info(xmlNodePtr node, SchemaInfo* info) } g_hash_table_insert(info->hash, - (gchar*)gconf_schema_locale(schema), /* cheat to save copying this string */ + (gchar*)gconf_schema_get_locale(schema), /* cheat to save copying this string */ schema); return 0; @@ -1743,7 +1743,7 @@ hash_foreach(gpointer key, gpointer value, gpointer user_data) g_assert(error != NULL); fprintf(stderr, _("WARNING: failed to install schema `%s' locale `%s': %s\n"), - info->key, gconf_schema_locale(schema), error->message); + info->key, gconf_schema_get_locale(schema), error->message); g_error_free(error); error = NULL; } @@ -1751,7 +1751,7 @@ hash_foreach(gpointer key, gpointer value, gpointer user_data) { g_assert(error == NULL); printf(_("Installed schema `%s' for locale `%s'\n"), - info->key, gconf_schema_locale(schema)); + info->key, gconf_schema_get_locale(schema)); } gconf_schema_free(schema); diff --git a/gconf/gnome-testclient.c b/gconf/gnome-testclient.c index 694b30b0..f2f3f233 100644 --- a/gconf/gnome-testclient.c +++ b/gconf/gnome-testclient.c @@ -32,7 +32,7 @@ notify_func(GConf* conf, guint cnxn_id, const gchar* key, GConfValue* value, gpo int pid = getpid(); printf("PID %d received notify on key `%s' connection %u\n", pid, key, cnxn_id); self_change = TRUE; - gtk_entry_set_text(GTK_ENTRY(user_data), gconf_value_string(value)); + gtk_entry_set_text(GTK_ENTRY(user_data), gconf_value_get_string(value)); self_change = FALSE; } @@ -100,7 +100,7 @@ main(int argc, char* argv[]) if (val != NULL) { - gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_string(val)); + gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_get_string(val)); gconf_value_free(val); val = NULL; } diff --git a/gconf/testgconfclient.c b/gconf/testgconfclient.c index 12ad8a1e..c1404b02 100644 --- a/gconf/testgconfclient.c +++ b/gconf/testgconfclient.c @@ -62,7 +62,7 @@ entry_notify_func(GConfClient* client, guint cnxn_id, const gchar* key, GConfVal g_return_if_fail(GTK_IS_ENTRY(entry)); gtk_signal_handler_block_by_data(GTK_OBJECT(entry), client); - gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_string(value)); + gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_get_string(value)); gtk_signal_handler_unblock_by_data(GTK_OBJECT(entry), client); } diff --git a/tests/testschemas.c b/tests/testschemas.c index 25299da3..9a152ab6 100644 --- a/tests/testschemas.c +++ b/tests/testschemas.c @@ -261,42 +261,42 @@ check_one_schema(GConfEngine* conf, const gchar** keyp, GConfSchema* schema) } else { - check (gconf_schema_type(schema) == gconf_schema_type(gotten), + check (gconf_schema_get_type(schema) == gconf_schema_get_type(gotten), "schema set/get pair: type `%s' set, `%s' got", - gconf_value_type_to_string(gconf_schema_type(schema)), - gconf_value_type_to_string(gconf_schema_type(gotten))); + gconf_value_type_to_string(gconf_schema_get_type(schema)), + gconf_value_type_to_string(gconf_schema_get_type(gotten))); /* If we set the schema for the current locale be sure we get it back */ - if (null_safe_strcmp(gconf_current_locale(), gconf_schema_locale(schema)) == 0) + if (null_safe_strcmp(gconf_current_locale(), gconf_schema_get_locale(schema)) == 0) { - check (null_safe_strcmp(gconf_current_locale(), gconf_schema_locale(gotten)) == 0, + check (null_safe_strcmp(gconf_current_locale(), gconf_schema_get_locale(gotten)) == 0, "schema set/get pair: locale `%s' set, `%s' got", gconf_current_locale(), - gconf_schema_locale(gotten)); + gconf_schema_get_locale(gotten)); } - check (null_safe_strcmp(gconf_schema_short_desc(schema), gconf_schema_short_desc(gotten)) == 0, + check (null_safe_strcmp(gconf_schema_get_short_desc(schema), gconf_schema_get_short_desc(gotten)) == 0, "schema set/get pair: short_desc `%s' set, `%s' got", - gconf_schema_short_desc(schema), - gconf_schema_short_desc(gotten)); + gconf_schema_get_short_desc(schema), + gconf_schema_get_short_desc(gotten)); - check (null_safe_strcmp(gconf_schema_long_desc(schema), gconf_schema_long_desc(gotten)) == 0, + check (null_safe_strcmp(gconf_schema_get_long_desc(schema), gconf_schema_get_long_desc(gotten)) == 0, "schema set/get pair: long_desc `%s' set, `%s' got", - gconf_schema_long_desc(schema), - gconf_schema_long_desc(gotten)); + gconf_schema_get_long_desc(schema), + gconf_schema_get_long_desc(gotten)); - check (null_safe_strcmp(gconf_schema_owner(schema), gconf_schema_owner(gotten)) == 0, + check (null_safe_strcmp(gconf_schema_get_owner(schema), gconf_schema_get_owner(gotten)) == 0, "schema set/get pair: owner `%s' set, `%s' got", - gconf_schema_owner(schema), - gconf_schema_owner(gotten)); + gconf_schema_get_owner(schema), + gconf_schema_get_owner(gotten)); { GConfValue* set_default; GConfValue* got_default; - set_default = gconf_schema_default_value(schema); - got_default = gconf_schema_default_value(gotten); + set_default = gconf_schema_get_default_value(schema); + got_default = gconf_schema_get_default_value(gotten); if (set_default && got_default) { @@ -313,9 +313,9 @@ check_one_schema(GConfEngine* conf, const gchar** keyp, GConfSchema* schema) gconf_value_type_to_string(set_default->type), gconf_value_type_to_string(got_default->type)); - check(gconf_value_int(set_default) == gconf_value_int(got_default), + check(gconf_value_get_int(set_default) == gconf_value_get_int(got_default), "schema set/get pair: default value (int) `%d' set, `%d' got", - gconf_value_int(set_default), gconf_value_int(got_default)); + gconf_value_get_int(set_default), gconf_value_get_int(got_default)); } else { @@ -377,7 +377,7 @@ check_schema_storage(GConfEngine* conf) gconf_schema_set_default_value_nocopy(schema, default_value); - check(gconf_value_int(gconf_schema_default_value(schema)) == default_value_int, + check(gconf_value_get_int(gconf_schema_get_default_value(schema)) == default_value_int, "Properly stored default int value in the schema"); check_one_schema(conf, keyp, schema); diff --git a/wrappers/gtk/gconf-client.c b/wrappers/gtk/gconf-client.c index 4a690bf7..b805a317 100644 --- a/wrappers/gtk/gconf-client.c +++ b/wrappers/gtk/gconf-client.c @@ -824,8 +824,8 @@ cache_pairs_in_dir(GConfClient* client, const gchar* dir) GConfEntry* pair = tmp->data; gconf_client_cache(client, - gconf_entry_key (pair), - gconf_entry_is_default(pair), + gconf_entry_get_key (pair), + gconf_entry_get_is_default(pair), gconf_entry_steal_value(pair)); gconf_entry_free(pair); @@ -1159,7 +1159,7 @@ gconf_client_get_float (GConfClient* client, const gchar* key, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_FLOAT, &error)) - retval = gconf_value_float(val); + retval = gconf_value_get_float(val); else handle_error(client, error, err); @@ -1194,7 +1194,7 @@ gconf_client_get_int (GConfClient* client, const gchar* key, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_INT, &error)) - retval = gconf_value_int(val); + retval = gconf_value_get_int(val); else handle_error(client, error, err); @@ -1230,7 +1230,7 @@ gconf_client_get_string(GConfClient* client, const gchar* key, if (check_type(key, val, GCONF_VALUE_STRING, &error)) /* we cheat here (look below) so we have to cast this */ - retval = (gchar *)gconf_value_string(val); + retval = (gchar *)gconf_value_get_string(val); else handle_error(client, error, err); @@ -1272,7 +1272,7 @@ gconf_client_get_bool (GConfClient* client, const gchar* key, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_BOOL, &error)) - retval = gconf_value_bool(val); + retval = gconf_value_get_bool(val); else handle_error(client, error, err); @@ -1306,7 +1306,7 @@ gconf_client_get_schema (GConfClient* client, g_assert(error == NULL); if (check_type(key, val, GCONF_VALUE_SCHEMA, &error)) - retval = gconf_value_schema(val); + retval = gconf_value_get_schema(val); else handle_error(client, error, err); diff --git a/wrappers/gtk/testgconfclient.c b/wrappers/gtk/testgconfclient.c index 12ad8a1e..c1404b02 100644 --- a/wrappers/gtk/testgconfclient.c +++ b/wrappers/gtk/testgconfclient.c @@ -62,7 +62,7 @@ entry_notify_func(GConfClient* client, guint cnxn_id, const gchar* key, GConfVal g_return_if_fail(GTK_IS_ENTRY(entry)); gtk_signal_handler_block_by_data(GTK_OBJECT(entry), client); - gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_string(value)); + gtk_entry_set_text(GTK_ENTRY(entry), gconf_value_get_string(value)); gtk_signal_handler_unblock_by_data(GTK_OBJECT(entry), client); } diff --git a/wrappers/guile/scm-gconf.c b/wrappers/guile/scm-gconf.c index 2e580b7b..3a1d2e51 100644 --- a/wrappers/guile/scm-gconf.c +++ b/wrappers/guile/scm-gconf.c @@ -113,16 +113,16 @@ gconf_value_to_scm(GConfValue* val) /* EOL */ break; case GCONF_VALUE_STRING: - retval = gh_str02scm(gconf_value_string(val)); + retval = gh_str02scm(gconf_value_get_string(val)); break; case GCONF_VALUE_INT: - retval = gh_int2scm(gconf_value_int(val)); + retval = gh_int2scm(gconf_value_get_int(val)); break; case GCONF_VALUE_FLOAT: - retval = gh_double2scm(gconf_value_float(val)); + retval = gh_double2scm(gconf_value_get_float(val)); break; case GCONF_VALUE_BOOL: - retval = gh_bool2scm(gconf_value_bool(val)); + retval = gh_bool2scm(gconf_value_get_bool(val)); break; case GCONF_VALUE_SCHEMA: /* FIXME this is more complicated, we need a smob or something */ @@ -131,8 +131,8 @@ gconf_value_to_scm(GConfValue* val) /* FIXME This is complicated too... */ break; case GCONF_VALUE_PAIR: - retval = gh_cons(gconf_value_to_scm(gconf_value_car(val)), - gconf_value_to_scm(gconf_value_cdr(val))); + retval = gh_cons(gconf_value_to_scm(gconf_value_get_car(val)), + gconf_value_to_scm(gconf_value_get_cdr(val))); break; default: g_warning("Unhandled type in %s", __FUNCTION__); |