diff options
author | Havoc Pennington <hp@pobox.com> | 2000-09-17 00:55:03 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-09-17 00:55:03 +0000 |
commit | b780e8386cc3632992b70d6232bc8e63d64154f8 (patch) | |
tree | a8f9f1253a8c2db2c54545a1326c21283db1f4f4 | |
parent | 06f8e406e040119173f0bf919719c8ce402c0838 (diff) | |
download | gconf-b780e8386cc3632992b70d6232bc8e63d64154f8.tar.gz |
Update some docs
2000-09-16 Havoc Pennington <hp@pobox.com>
* doc/gconf/tmpl/gconf-value.sgml: Update some docs
* wrappers/gtk/gconf-client.c (notify_listeners_callback): Update
to reflect new callback signature for GConfClientNotifyFunc
* gconf/gconf-sources.c (gconf_sources_set_value): Make it an
error to if we try to write a value for a non-writable source.
This is new; it used to silently fail.
* gconf/gconf-database.c (gconf_database_notify_listeners): Add
is_writable here
* gconf/GConf.idl: Add writable flag to notification
* gconf/gconf.h: Update GConfNotifyFunc to have fewer args, and
a GConfEntry is just passed in (since I was going to have
to add an is_writable arg, and passing in a GConfEntry
gives us future extensibility against this sort of thing)
BREAKS USER CODE, many apologies.
* wrappers/gtk/gconf-client.c (gconf_client_get_entry): Update
to reflect GConfEngine changes
* gconf/gconf.c (gconf_engine_all_entries): Get the writability
stuff
(gconf_engine_get_full): rename to gconf_value_get_entry
and return an entry; drop the is_default argument.
* gconf/gconf-sources.c (gconf_sources_query_value): Implement
finding out if a value is writable
(gconf_sources_all_entries): Implement setting is_writable
flag on the entries
* gconf/gconf-value.c (gconf_entry_new_nocopy): Default to
the entry being writable
* gconf/gconf-database.c: Change to match IDL changes
* gconf/GConf.idl (lookup_with_locale): Add out param for
writability
(all_entries): Add out param for writability
* gconf/gconf-value.h: Add is_writable field to GConfEntry
(gconf_entry_get_is_writable): Add this
* wrappers/gtk/gconf-client.c (gconf_client_key_is_writable): Add
the matching stub here
* gconf/gconf.c (gconf_engine_key_is_writable): Go ahead and add
this function so we can implement it later, but it always returns
TRUE at the moment.
* gconf/gconf-changeset.c (gconf_change_set_set_user_data,
gconf_change_set_get_user_data): Add user data for language
bindings
* gconf/gconf.c (gconf_engine_set_user_data,
gconf_engine_get_user_data): Add user data for language
bindings
37 files changed, 1989 insertions, 1183 deletions
@@ -1,3 +1,65 @@ +2000-09-16 Havoc Pennington <hp@pobox.com> + + * doc/gconf/tmpl/gconf-value.sgml: Update some docs + + * wrappers/gtk/gconf-client.c (notify_listeners_callback): Update + to reflect new callback signature for GConfClientNotifyFunc + + * gconf/gconf-sources.c (gconf_sources_set_value): Make it an + error to if we try to write a value for a non-writable source. + This is new; it used to silently fail. + + * gconf/gconf-database.c (gconf_database_notify_listeners): Add + is_writable here + + * gconf/GConf.idl: Add writable flag to notification + + * gconf/gconf.h: Update GConfNotifyFunc to have fewer args, and + a GConfEntry is just passed in (since I was going to have + to add an is_writable arg, and passing in a GConfEntry + gives us future extensibility against this sort of thing) + BREAKS USER CODE, many apologies. + + * wrappers/gtk/gconf-client.c (gconf_client_get_entry): Update + to reflect GConfEngine changes + + * gconf/gconf.c (gconf_engine_all_entries): Get the writability + stuff + (gconf_engine_get_full): rename to gconf_value_get_entry + and return an entry; drop the is_default argument. + + * gconf/gconf-sources.c (gconf_sources_query_value): Implement + finding out if a value is writable + (gconf_sources_all_entries): Implement setting is_writable + flag on the entries + + * gconf/gconf-value.c (gconf_entry_new_nocopy): Default to + the entry being writable + + * gconf/gconf-database.c: Change to match IDL changes + + * gconf/GConf.idl (lookup_with_locale): Add out param for + writability + (all_entries): Add out param for writability + + * gconf/gconf-value.h: Add is_writable field to GConfEntry + (gconf_entry_get_is_writable): Add this + + * wrappers/gtk/gconf-client.c (gconf_client_key_is_writable): Add + the matching stub here + + * gconf/gconf.c (gconf_engine_key_is_writable): Go ahead and add + this function so we can implement it later, but it always returns + TRUE at the moment. + + * gconf/gconf-changeset.c (gconf_change_set_set_user_data, + gconf_change_set_get_user_data): Add user data for language + bindings + + * gconf/gconf.c (gconf_engine_set_user_data, + gconf_engine_get_user_data): Add user data for language + bindings + 2000-09-15 Havoc Pennington <hp@redhat.com> * s/gconf_concat_key_and_dir/gconf_concat_dir_and_key/g @@ -12,9 +12,6 @@ time. API additions == -* API so clients can find out if they can write to a given key - (gconf_engine_key_is_writable() or the like) - * Implement batch gets Other @@ -51,6 +48,8 @@ Maybe 1.4 all other gconf-using apps will block while the server is searching, without some tricks to let the main loop run sometimes, so, dunno.) +* Implement a way to get the GConfMetaInfo + Future === diff --git a/doc/gconf/gconf-decl.txt b/doc/gconf/gconf-decl.txt index a8a4b18d..92dbc500 100644 --- a/doc/gconf/gconf-decl.txt +++ b/doc/gconf/gconf-decl.txt @@ -20,7 +20,7 @@ </MACRO> <MACRO> <NAME>VERSION</NAME> -#define VERSION "0.8" +#define VERSION "0.9" </MACRO> <MACRO> <NAME>HAVE_GETTEXT</NAME> @@ -39,6 +39,10 @@ #define ENABLE_NLS 1 </MACRO> <MACRO> +<NAME>GETTEXT_PACKAGE</NAME> +#define GETTEXT_PACKAGE "gconf1" +</MACRO> +<MACRO> <NAME>HAVE___ARGZ_COUNT</NAME> #define HAVE___ARGZ_COUNT 1 </MACRO> @@ -140,7 +144,7 @@ </MACRO> <MACRO> <NAME>VERSION</NAME> -#define VERSION "0.8" +#define VERSION "0.9" </MACRO> <STRUCT> <NAME>GThreadPool</NAME> @@ -425,7 +429,10 @@ struct GConfBackendVTable { GConfValue* value, GError** err); - /* Returns list of GConfEntry */ + /* Returns list of GConfEntry with key set to a relative + * pathname. In the public client-side API the key + * is always absolute though. + */ GSList* (* all_entries) (GConfSource* source, const gchar* dir, const gchar** locales, @@ -633,16 +640,153 @@ GConfChangeSet* cs, const gchar* key,GConfValueType list_type,GSList* list <RETURNS>void </RETURNS> GConfChangeSet* cs, const gchar* key,GConfValueType car_type, GConfValueType cdr_type,gconstpointer address_of_car,gconstpointer address_of_cdr </FUNCTION> +<FUNCTION> +<NAME>gconf_change_set_set_user_data</NAME> +<RETURNS>void </RETURNS> +GConfChangeSet *cs,gpointer data,GDestroyNotify dnotify +</FUNCTION> +<FUNCTION> +<NAME>gconf_change_set_get_user_data</NAME> +<RETURNS>gpointer </RETURNS> +GConfChangeSet *cs +</FUNCTION> <STRUCT> -<NAME>GConfEngine</NAME> +<NAME>GConfDatabase</NAME> </STRUCT> <STRUCT> -<NAME>GConfEngine</NAME> -struct GConfEngine { - gpointer dummy; +<NAME>GConfDatabase</NAME> +struct GConfDatabase +{ + /* "inherit" from the servant, + must be first in struct */ + POA_ConfigDatabase servant; + + ConfigDatabase objref; + + GConfListeners* listeners; + GConfSources* sources; + + GTime last_access; + guint sync_idle; + guint sync_timeout; + + gchar *persistent_name; }; </STRUCT> <FUNCTION> +<NAME>gconf_database_new</NAME> +<RETURNS>GConfDatabase *</RETURNS> +GConfSources *sources +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_free</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_add_listener</NAME> +<RETURNS>CORBA_unsigned_long </RETURNS> +GConfDatabase *db,ConfigListener who,const gchar *where +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_remove_listener</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,CORBA_unsigned_long cnxn +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_readd_listener</NAME> +<RETURNS>CORBA_unsigned_long </RETURNS> +GConfDatabase *db,ConfigListener who,const gchar *where +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_notify_listeners</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,const gchar *key,const ConfigValue *value,gboolean is_default,gboolean is_writable +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_query_value</NAME> +<RETURNS>GConfValue *</RETURNS> +GConfDatabase *db,const gchar *key,const gchar **locales,gboolean use_schema_default,gboolean *value_is_default,gboolean *value_is_writable,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_query_default_value</NAME> +<RETURNS>GConfValue *</RETURNS> +GConfDatabase *db,const gchar *key,const gchar **locales,gboolean *is_writable,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_set</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,const gchar *key,GConfValue *value,const ConfigValue *cvalue,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_unset</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,const gchar *key,const gchar *locale,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_dir_exists</NAME> +<RETURNS>gboolean </RETURNS> +GConfDatabase *db,const gchar *dir,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_remove_dir</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,const gchar *dir,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_all_entries</NAME> +<RETURNS>GSList *</RETURNS> +GConfDatabase *db,const gchar *dir,const gchar **locales,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_all_dirs</NAME> +<RETURNS>GSList *</RETURNS> +GConfDatabase *db,const gchar *dir,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_set_schema</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,const gchar *key,const gchar *schema_key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_sync</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_synchronous_sync</NAME> +<RETURNS>gboolean </RETURNS> +GConfDatabase *db,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_clear_cache</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconfd_locale_cache_expire</NAME> +<RETURNS>void </RETURNS> +void +</FUNCTION> +<FUNCTION> +<NAME>gconfd_locale_cache_drop</NAME> +<RETURNS>void </RETURNS> +void +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_get_persistent_name</NAME> +<RETURNS>const gchar *</RETURNS> +GConfDatabase *db +</FUNCTION> +<FUNCTION> +<NAME>gconf_database_log_listeners_to_string</NAME> +<RETURNS>void </RETURNS> +GConfDatabase *db,gboolean is_default,GString *str +</FUNCTION> +<STRUCT> +<NAME>GConfEngine</NAME> +</STRUCT> +<FUNCTION> <NAME>gconf_engine_get_default</NAME> <RETURNS>GConfEngine *</RETURNS> void @@ -667,6 +811,16 @@ GConfEngine* conf <RETURNS>GConfEngine *</RETURNS> const gchar* address, GError** err </FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_user_data</NAME> +<RETURNS>void </RETURNS> +GConfEngine *engine,gpointer data,GDestroyNotify dnotify +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_user_data</NAME> +<RETURNS>gpointer </RETURNS> +GConfEngine *engine +</FUNCTION> <MACRO> <NAME>GCONF_ERROR</NAME> #define GCONF_ERROR gconf_error_quark () @@ -691,7 +845,8 @@ typedef enum { GCONF_ERROR_OVERRIDDEN = 11, /* Read-only source at front of path has set the value */ GCONF_ERROR_OAF_ERROR = 12, /* liboaf error */ GCONF_ERROR_LOCAL_ENGINE = 13, /* Tried to use remote operations on a local engine */ - GCONF_ERROR_LOCK_FAILED = 14 /* Failed to get a lockfile */ + GCONF_ERROR_LOCK_FAILED = 14, /* Failed to get a lockfile */ + GCONF_ERROR_NO_WRITABLE_DATABASE = 14 /* nowhere to write a value */ } GConfError; </ENUM> <FUNCTION> @@ -699,20 +854,500 @@ typedef enum { <RETURNS>GQuark </RETURNS> void </FUNCTION> +<ENUM> +<NAME>GMarkupNodeType</NAME> +typedef enum +{ + G_MARKUP_NODE_ELEMENT, + G_MARKUP_NODE_TEXT, + G_MARKUP_NODE_PASSTHROUGH +} GMarkupNodeType; +</ENUM> +<ENUM> +<NAME>GMarkupParseFlags</NAME> +typedef enum +{ + G_MARKUP_PRESERVE_ALL_WHITESPACE = 1 << 0 + +} GMarkupParseFlags; +</ENUM> +<ENUM> +<NAME>GMarkupToStringFlags</NAME> +typedef enum +{ + G_MARKUP_NO_FORMATTING = 1 << 0 + +} GMarkupToStringFlags; +</ENUM> +<STRUCT> +<NAME>GMarkupNodeText</NAME> +</STRUCT> +<STRUCT> +<NAME>GMarkupNodeElement</NAME> +</STRUCT> +<STRUCT> +<NAME>GMarkupNodeText</NAME> +struct GMarkupNodeText +{ + GMarkupNodeType type; + + gchar *text; +}; +</STRUCT> +<STRUCT> +<NAME>GMarkupNodeElement</NAME> +struct GMarkupNodeElement +{ + GMarkupNodeType type; + + gchar *name; + + GList *children; + + /* List members are an opaque datatype, so ignore this. */ + GList *attributes; +}; +</STRUCT> +<UNION> +<NAME>GMarkupNode</NAME> +union GMarkupNode +{ + GMarkupNodeType type; + + GMarkupNodeText text; + GMarkupNodeElement element; +}; +</UNION> +<ENUM> +<NAME>GMarkupErrorType</NAME> +typedef enum +{ + G_MARKUP_ERROR_BAD_UTF8, + G_MARKUP_ERROR_EMPTY, + G_MARKUP_ERROR_PARSE +} GMarkupErrorType; +</ENUM> +<MACRO> +<NAME>G_MARKUP_ERROR</NAME> +#define G_MARKUP_ERROR g_markup_error_quark () +</MACRO> +<FUNCTION> +<NAME>g_markup_error_quark</NAME> +<RETURNS>GQuark </RETURNS> + +</FUNCTION> <FUNCTION> -<NAME>gconf_error_new</NAME> +<NAME>g_markup_node_new_text</NAME> +<RETURNS>GMarkupNodeText *</RETURNS> +const gchar *text +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_new_element</NAME> +<RETURNS>GMarkupNodeElement *</RETURNS> +const gchar *name +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_free</NAME> +<RETURNS>void </RETURNS> +GMarkupNode *node +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_set_attribute</NAME> +<RETURNS>void </RETURNS> +GMarkupNodeElement *node,const gchar *attribute_name,const gchar *attribute_value +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_get_attribute</NAME> +<RETURNS>gchar *</RETURNS> +GMarkupNodeElement *node,const gchar *attribute_name +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_unset_attribute</NAME> +<RETURNS>void </RETURNS> +GMarkupNodeElement *node,const gchar *attribute_name +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_get_attributes</NAME> +<RETURNS>void </RETURNS> +GMarkupNodeElement *node,gchar ***names,gchar ***values,gint *n_attributes +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_from_string</NAME> +<RETURNS>GMarkupNode *</RETURNS> +const gchar *text,gint length,GMarkupParseFlags flags,GError **error +</FUNCTION> +<FUNCTION> +<NAME>g_markup_node_to_string</NAME> +<RETURNS>gchar *</RETURNS> +GMarkupNode *node,GMarkupToStringFlags flags +</FUNCTION> +<FUNCTION> +<NAME>g_markup_nodes_from_string</NAME> +<RETURNS>GList *</RETURNS> +const gchar *text,gint length,GMarkupParseFlags flags,GError **error +</FUNCTION> +<FUNCTION> +<NAME>g_markup_nodes_to_string</NAME> +<RETURNS>gchar *</RETURNS> +GList *nodes,GMarkupToStringFlags flags +</FUNCTION> +<TYPEDEF> +<NAME>gunichar</NAME> +typedef guint32 gunichar; +</TYPEDEF> +<TYPEDEF> +<NAME>gunichar2</NAME> +typedef guint16 gunichar2; +</TYPEDEF> +<ENUM> +<NAME>GUnicodeType</NAME> +typedef enum { + G_UNICODE_CONTROL, + G_UNICODE_FORMAT, + G_UNICODE_UNASSIGNED, + G_UNICODE_PRIVATE_USE, + G_UNICODE_SURROGATE, + G_UNICODE_LOWERCASE_LETTER, + G_UNICODE_MODIFIER_LETTER, + G_UNICODE_OTHER_LETTER, + G_UNICODE_TITLECASE_LETTER, + G_UNICODE_UPPERCASE_LETTER, + G_UNICODE_COMBINING_MARK, + G_UNICODE_ENCLOSING_MARK, + G_UNICODE_NON_SPACING_MARK, + G_UNICODE_DECIMAL_NUMBER, + G_UNICODE_LETTER_NUMBER, + G_UNICODE_OTHER_NUMBER, + G_UNICODE_CONNECT_PUNCTUATION, + G_UNICODE_DASH_PUNCTUATION, + G_UNICODE_CLOSE_PUNCTUATION, + G_UNICODE_FINAL_PUNCTUATION, + G_UNICODE_INITIAL_PUNCTUATION, + G_UNICODE_OTHER_PUNCTUATION, + G_UNICODE_OPEN_PUNCTUATION, + G_UNICODE_CURRENCY_SYMBOL, + G_UNICODE_MODIFIER_SYMBOL, + G_UNICODE_MATH_SYMBOL, + G_UNICODE_OTHER_SYMBOL, + G_UNICODE_LINE_SEPARATOR, + G_UNICODE_PARAGRAPH_SEPARATOR, + G_UNICODE_SPACE_SEPARATOR +} GUnicodeType; +</ENUM> +<FUNCTION> +<NAME>g_get_charset</NAME> +<RETURNS>gboolean </RETURNS> +char **charset +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isalnum</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isalpha</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_iscntrl</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isdigit</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isgraph</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_islower</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isprint</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_ispunct</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isspace</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isupper</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isxdigit</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_istitle</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_isdefined</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_iswide</NAME> +<RETURNS>gboolean </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_toupper</NAME> +<RETURNS>gunichar </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_tolower</NAME> +<RETURNS>gunichar </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_totitle</NAME> +<RETURNS>gunichar </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_digit_value</NAME> +<RETURNS>gint </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_xdigit_value</NAME> +<RETURNS>gint </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_type</NAME> +<RETURNS>GUnicodeType </RETURNS> +gunichar c +</FUNCTION> +<FUNCTION> +<NAME>g_unicode_canonical_ordering</NAME> +<RETURNS>void </RETURNS> +gunichar *string,size_t len +</FUNCTION> +<FUNCTION> +<NAME>g_unicode_canonical_decomposition</NAME> +<RETURNS>gunichar *</RETURNS> +gunichar ch,size_t *result_len +</FUNCTION> +<MACRO> +<NAME>GLIB_VAR</NAME> +# define GLIB_VAR __declspec(dllexport) +</MACRO> +<MACRO> +<NAME>GLIB_VAR</NAME> +# define GLIB_VAR extern __declspec(dllimport) +</MACRO> +<MACRO> +<NAME>GLIB_VAR</NAME> +# define GLIB_VAR extern +</MACRO> +<MACRO> +<NAME>g_utf8_next_char</NAME> +#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)]) +</MACRO> +<FUNCTION> +<NAME>g_utf8_get_char</NAME> +<RETURNS>gunichar </RETURNS> +const gchar *p +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_offset_to_pointer</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *str,gint offset +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_pointer_to_offset</NAME> +<RETURNS>gint </RETURNS> +const gchar *str,const gchar *pos +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_prev_char</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *p +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_find_next_char</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *p,const gchar *bound +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_find_prev_char</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *str,const gchar *p +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_strlen</NAME> +<RETURNS>gint </RETURNS> +const gchar *p,gint max +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_strncpy</NAME> +<RETURNS>gchar *</RETURNS> +gchar *dest,const gchar *src,size_t n +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_strchr</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *p,gunichar ch +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_strrchr</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *p,gunichar ch +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_to_utf16</NAME> +<RETURNS>gunichar2 *</RETURNS> +const gchar *str,gint len +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_to_ucs4</NAME> +<RETURNS>gunichar *</RETURNS> +const gchar *str,gint len +</FUNCTION> +<FUNCTION> +<NAME>g_utf16_to_ucs4</NAME> +<RETURNS>gunichar *</RETURNS> +const gunichar2 *str,gint len +</FUNCTION> +<FUNCTION> +<NAME>g_utf16_to_utf8</NAME> +<RETURNS>gchar *</RETURNS> +const gunichar2 *str,gint len +</FUNCTION> +<FUNCTION> +<NAME>g_ucs4_to_utf16</NAME> +<RETURNS>gunichar *</RETURNS> +const gunichar *str,gint len +</FUNCTION> +<FUNCTION> +<NAME>g_ucs4_to_utf8</NAME> +<RETURNS>gchar *</RETURNS> +const gunichar *str,gint len +</FUNCTION> +<FUNCTION> +<NAME>g_unichar_to_utf8</NAME> +<RETURNS>gint </RETURNS> +gunichar c,char *outbuf +</FUNCTION> +<FUNCTION> +<NAME>g_utf8_validate</NAME> +<RETURNS>gboolean </RETURNS> +const gchar *str,gint len,const gchar **end +</FUNCTION> +<FUNCTION> +<NAME>g_convert</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *str,gint len,const gchar *to_codeset,const gchar *from_codeset,gint *bytes_converted,gint *bytes_written +</FUNCTION> +<MACRO> +<NAME>G_FILE_ERROR</NAME> +#define G_FILE_ERROR g_file_error_quark () +</MACRO> +<ENUM> +<NAME>GFileError</NAME> +typedef enum +{ + G_FILE_ERROR_EXIST, + G_FILE_ERROR_ISDIR, + G_FILE_ERROR_ACCES, + G_FILE_ERROR_NAMETOOLONG, + G_FILE_ERROR_NOENT, + G_FILE_ERROR_NOTDIR, + G_FILE_ERROR_NXIO, + G_FILE_ERROR_NODEV, + G_FILE_ERROR_ROFS, + G_FILE_ERROR_TXTBSY, + G_FILE_ERROR_FAULT, + G_FILE_ERROR_LOOP, + G_FILE_ERROR_NOSPC, + G_FILE_ERROR_NOMEM, + G_FILE_ERROR_MFILE, + G_FILE_ERROR_NFILE, + G_FILE_ERROR_FAILED +} GFileError; +</ENUM> +<FUNCTION> +<NAME>g_file_error_quark</NAME> +<RETURNS>GQuark </RETURNS> + +</FUNCTION> +<FUNCTION> +<NAME>g_file_get_contents</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *filename,GError **error +</FUNCTION> +<STRUCT> +<NAME>GError</NAME> +</STRUCT> +<STRUCT> +<NAME>GError</NAME> +struct GError +{ + GQuark domain; + gint code; + gchar *message; +}; +</STRUCT> +<FUNCTION> +<NAME>g_error_new</NAME> <RETURNS>GError *</RETURNS> -GConfError en,const gchar* format, ... +GQuark domain,gint code,const gchar *format,... </FUNCTION> <FUNCTION> -<NAME>gconf_set_error</NAME> +<NAME>g_error_new_literal</NAME> +<RETURNS>GError *</RETURNS> +GQuark domain,gint code,const gchar *message +</FUNCTION> +<FUNCTION> +<NAME>g_error_free</NAME> <RETURNS>void </RETURNS> -GError** err,GConfError en,const gchar* format, ... +GError *error </FUNCTION> <FUNCTION> -<NAME>gconf_compose_errors</NAME> +<NAME>g_error_copy</NAME> <RETURNS>GError *</RETURNS> -GError* err1, GError* err2 +const GError *error +</FUNCTION> +<FUNCTION> +<NAME>g_error_matches</NAME> +<RETURNS>gboolean </RETURNS> +const GError *error,GQuark domain,gint code +</FUNCTION> +<FUNCTION> +<NAME>g_set_error</NAME> +<RETURNS>void </RETURNS> +GError **err,GQuark domain,gint code,const gchar *format,... +</FUNCTION> +<FUNCTION> +<NAME>g_clear_error</NAME> +<RETURNS>void </RETURNS> +GError **err +</FUNCTION> +<FUNCTION> +<NAME>g_propagate_error</NAME> +<RETURNS>void </RETURNS> +GError **dest,GError *src </FUNCTION> <FUNCTION> <NAME>gconf_key_directory</NAME> @@ -737,47 +1372,52 @@ const gchar* filename <FUNCTION> <NAME>gconf_value_from_corba_value</NAME> <RETURNS>GConfValue *</RETURNS> -const ConfigValue* value +const ConfigValue *value </FUNCTION> <FUNCTION> <NAME>corba_value_from_gconf_value</NAME> <RETURNS>ConfigValue *</RETURNS> -GConfValue* value +GConfValue *value </FUNCTION> <FUNCTION> <NAME>fill_corba_value_from_gconf_value</NAME> <RETURNS>void </RETURNS> -GConfValue* value,ConfigValue* dest +GConfValue *value,ConfigValue *dest </FUNCTION> <FUNCTION> <NAME>invalid_corba_value</NAME> <RETURNS>ConfigValue *</RETURNS> - +void +</FUNCTION> +<FUNCTION> +<NAME>gconf_object_to_string</NAME> +<RETURNS>gchar *</RETURNS> +CORBA_Object obj,GError **err </FUNCTION> <FUNCTION> <NAME>fill_corba_schema_from_gconf_schema</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc,ConfigSchema* dest +GConfSchema *sc,ConfigSchema *dest </FUNCTION> <FUNCTION> <NAME>corba_schema_from_gconf_schema</NAME> <RETURNS>ConfigSchema *</RETURNS> -GConfSchema* sc +GConfSchema *sc </FUNCTION> <FUNCTION> <NAME>gconf_schema_from_corba_schema</NAME> <RETURNS>GConfSchema *</RETURNS> -const ConfigSchema* cs +const ConfigSchema *cs </FUNCTION> <FUNCTION> <NAME>gconf_value_type_to_string</NAME> <RETURNS>const gchar *</RETURNS> -GConfValueType type +GConfValueType type </FUNCTION> <FUNCTION> <NAME>gconf_value_type_from_string</NAME> <RETURNS>GConfValueType </RETURNS> -const gchar* str +const gchar *str </FUNCTION> <FUNCTION> <NAME>gconf_load_source_path</NAME> @@ -787,7 +1427,7 @@ const gchar* filename, GError** err <FUNCTION> <NAME>gconf_shutdown_daemon</NAME> <RETURNS>void </RETURNS> -GError** err +GError **err </FUNCTION> <FUNCTION> <NAME>gconf_ping_daemon</NAME> @@ -797,22 +1437,22 @@ void <FUNCTION> <NAME>gconf_spawn_daemon</NAME> <RETURNS>gboolean </RETURNS> -GError** err +GError **err </FUNCTION> <FUNCTION> <NAME>gconf_string_to_gulong</NAME> <RETURNS>gulong </RETURNS> -const gchar* str +const gchar *str </FUNCTION> <FUNCTION> <NAME>gconf_string_to_double</NAME> <RETURNS>gboolean </RETURNS> -const gchar* str, gdouble* val +const gchar *str,gdouble *val </FUNCTION> <FUNCTION> <NAME>gconf_double_to_string</NAME> <RETURNS>gchar *</RETURNS> -gdouble val +gdouble val </FUNCTION> <FUNCTION> <NAME>gconf_current_locale</NAME> @@ -845,7 +1485,7 @@ const gchar* key, GError** err <FUNCTION> <NAME>gconf_value_new_from_string</NAME> <RETURNS>GConfValue *</RETURNS> -GConfValueType type, const gchar* str,GError** err +GConfValueType type,const gchar* str,GError** err </FUNCTION> <FUNCTION> <NAME>gconf_value_new_list_from_string</NAME> @@ -860,27 +1500,27 @@ GConfValueType car_type,GConfValueType cdr_type,const gchar* str,GError** err <FUNCTION> <NAME>gconf_quote_string</NAME> <RETURNS>gchar *</RETURNS> -const gchar* str +const gchar *str </FUNCTION> <FUNCTION> <NAME>gconf_unquote_string</NAME> <RETURNS>gchar *</RETURNS> -const gchar* str, const gchar** end, GError** err +const gchar *str,const gchar **end,GError **err </FUNCTION> <FUNCTION> <NAME>gconf_unquote_string_inplace</NAME> <RETURNS>void </RETURNS> -gchar* str, gchar** end, GError** err +gchar *str,gchar **end,GError **err </FUNCTION> <FUNCTION> <NAME>gconf_value_decode</NAME> <RETURNS>GConfValue *</RETURNS> -const gchar* encoded +const gchar *encoded </FUNCTION> <FUNCTION> <NAME>gconf_value_encode</NAME> <RETURNS>gchar *</RETURNS> -GConfValue* val +GConfValue *val </FUNCTION> <FUNCTION> <NAME>gconf_quote_percents</NAME> @@ -890,27 +1530,27 @@ const gchar* src <FUNCTION> <NAME>gconf_value_list_from_primitive_list</NAME> <RETURNS>GConfValue *</RETURNS> -GConfValueType list_type, GSList* list +GConfValueType list_type,GSList *list </FUNCTION> <FUNCTION> <NAME>gconf_value_pair_from_primitive_pair</NAME> <RETURNS>GConfValue *</RETURNS> -GConfValueType car_type,GConfValueType cdr_type,gconstpointer address_of_car,gconstpointer address_of_cdr +GConfValueType car_type,GConfValueType cdr_type,gconstpointer address_of_car,gconstpointer address_of_cdr </FUNCTION> <FUNCTION> <NAME>gconf_value_list_to_primitive_list_destructive</NAME> <RETURNS>GSList *</RETURNS> -GConfValue* val,GConfValueType list_type,GError** err +GConfValue *val,GConfValueType list_type,GError **err </FUNCTION> <FUNCTION> <NAME>gconf_value_pair_to_primitive_pair_destructive</NAME> <RETURNS>gboolean </RETURNS> -GConfValue* val,GConfValueType car_type,GConfValueType cdr_type,gpointer car_retloc,gpointer cdr_retloc,GError** err +GConfValue *val,GConfValueType car_type,GConfValueType cdr_type,gpointer car_retloc,gpointer cdr_retloc,GError **err </FUNCTION> <FUNCTION> <NAME>gconf_set_daemon_mode</NAME> <RETURNS>void </RETURNS> -gboolean setting +gboolean setting </FUNCTION> <FUNCTION> <NAME>gconf_in_daemon_mode</NAME> @@ -920,7 +1560,7 @@ void <FUNCTION> <NAME>gconf_set_daemon_ior</NAME> <RETURNS>void </RETURNS> -const gchar* ior +const gchar *ior </FUNCTION> <FUNCTION> <NAME>gconf_get_daemon_ior</NAME> @@ -943,13 +1583,68 @@ gulong useconds <FUNCTION> <NAME>gconf_get_lock</NAME> <RETURNS>GConfLock *</RETURNS> -const gchar* lock_directory,GError** err +const gchar *lock_directory,GError **err </FUNCTION> <FUNCTION> <NAME>gconf_release_lock</NAME> <RETURNS>gboolean </RETURNS> -GConfLock* lock,GError** err +GConfLock *lock,GError **err </FUNCTION> +<FUNCTION> +<NAME>gconf_error_new</NAME> +<RETURNS>GError *</RETURNS> +GConfError en,const gchar* format, ... +</FUNCTION> +<FUNCTION> +<NAME>gconf_set_error</NAME> +<RETURNS>void </RETURNS> +GError** err,GConfError en,const gchar* format, ... +</FUNCTION> +<FUNCTION> +<NAME>gconf_compose_errors</NAME> +<RETURNS>GError *</RETURNS> +GError* err1, GError* err2 +</FUNCTION> +<MACRO> +<NAME>_</NAME> +# define _(String) dgettext (GETTEXT_PACKAGE, String) +</MACRO> +<MACRO> +<NAME>N_</NAME> +# define N_(String) gettext_noop (String) +</MACRO> +<MACRO> +<NAME>N_</NAME> +# define N_(String) (String) +</MACRO> +<MACRO> +<NAME>textdomain</NAME> +# define textdomain(String) (String) +</MACRO> +<MACRO> +<NAME>gettext</NAME> +# define gettext(String) (String) +</MACRO> +<MACRO> +<NAME>dgettext</NAME> +# define dgettext(Domain,Message) (Message) +</MACRO> +<MACRO> +<NAME>dcgettext</NAME> +# define dcgettext(Domain,Message,Type) (Message) +</MACRO> +<MACRO> +<NAME>bindtextdomain</NAME> +# define bindtextdomain(Domain,Directory) (Domain) +</MACRO> +<MACRO> +<NAME>_</NAME> +# define _(String) (String) +</MACRO> +<MACRO> +<NAME>N_</NAME> +# define N_(String) (String) +</MACRO> <STRUCT> <NAME>GConfListeners</NAME> </STRUCT> @@ -988,22 +1683,27 @@ GConfListeners* listeners,const gchar* listen_point,gpointer listener_data,GFree <FUNCTION> <NAME>gconf_listeners_remove</NAME> <RETURNS>void </RETURNS> -GConfListeners* listeners,guint cnxn_id +GConfListeners *listeners,guint cnxn_id </FUNCTION> <FUNCTION> <NAME>gconf_listeners_notify</NAME> <RETURNS>void </RETURNS> -GConfListeners* listeners,const gchar* all_above,GConfListenersCallback callback,gpointer user_data +GConfListeners *listeners,const gchar *all_above,GConfListenersCallback callback,gpointer user_data </FUNCTION> <FUNCTION> <NAME>gconf_listeners_count</NAME> <RETURNS>guint </RETURNS> -GConfListeners* listeners +GConfListeners *listeners </FUNCTION> <FUNCTION> <NAME>gconf_listeners_foreach</NAME> <RETURNS>void </RETURNS> -GConfListeners* listeners,GConfListenersForeach callback,gpointer user_data +GConfListeners *listeners,GConfListenersForeach callback,gpointer user_data +</FUNCTION> +<FUNCTION> +<NAME>gconf_listeners_get_data</NAME> +<RETURNS>gboolean </RETURNS> +GConfListeners *listeners,guint cnxn_id,gpointer *listener_data_p,const gchar **location_p </FUNCTION> <STRUCT> <NAME>GConfLocaleCache</NAME> @@ -1074,99 +1774,327 @@ void <FUNCTION> <NAME>gconf_schema_free</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc +GConfSchema *sc </FUNCTION> <FUNCTION> <NAME>gconf_schema_copy</NAME> <RETURNS>GConfSchema *</RETURNS> -GConfSchema* sc +GConfSchema *sc </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_type</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, GConfValueType type +GConfSchema *sc,GConfValueType type </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_list_type</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, GConfValueType type +GConfSchema *sc,GConfValueType type </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_car_type</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, GConfValueType type +GConfSchema *sc,GConfValueType type </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_cdr_type</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, GConfValueType type +GConfSchema *sc,GConfValueType type </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_locale</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, const gchar* locale +GConfSchema *sc,const gchar *locale </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_short_desc</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, const gchar* desc +GConfSchema *sc,const gchar *desc </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_long_desc</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, const gchar* desc +GConfSchema *sc,const gchar *desc </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_owner</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, const gchar* owner +GConfSchema *sc,const gchar *owner </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_default_value</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, GConfValue* val +GConfSchema *sc,GConfValue *val </FUNCTION> <FUNCTION> <NAME>gconf_schema_set_default_value_nocopy</NAME> <RETURNS>void </RETURNS> -GConfSchema* sc, GConfValue* val +GConfSchema *sc,GConfValue *val </FUNCTION> <MACRO> <NAME>gconf_schema_get_type</NAME> -#define gconf_schema_get_type(x) (x->type) +#define gconf_schema_get_type(x) (x->type) </MACRO> <MACRO> <NAME>gconf_schema_get_list_type</NAME> -#define gconf_schema_get_list_type(x) (x->list_type) +#define gconf_schema_get_list_type(x) (x->list_type) </MACRO> <MACRO> <NAME>gconf_schema_get_car_type</NAME> -#define gconf_schema_get_car_type(x) (x->car_type) +#define gconf_schema_get_car_type(x) (x->car_type) </MACRO> <MACRO> <NAME>gconf_schema_get_cdr_type</NAME> -#define gconf_schema_get_cdr_type(x) (x->cdr_type) +#define gconf_schema_get_cdr_type(x) (x->cdr_type) </MACRO> <MACRO> <NAME>gconf_schema_get_locale</NAME> -#define gconf_schema_get_locale(x) ((const gchar*)(x)->locale) +#define gconf_schema_get_locale(x) ((const gchar*)(x)->locale) </MACRO> <MACRO> <NAME>gconf_schema_get_short_desc</NAME> -#define gconf_schema_get_short_desc(x) ((const gchar*)(x)->short_desc) +#define gconf_schema_get_short_desc(x) ((const gchar*)(x)->short_desc) </MACRO> <MACRO> <NAME>gconf_schema_get_long_desc</NAME> -#define gconf_schema_get_long_desc(x) ((const gchar*)(x)->long_desc) +#define gconf_schema_get_long_desc(x) ((const gchar*)(x)->long_desc) </MACRO> <MACRO> <NAME>gconf_schema_get_owner</NAME> -#define gconf_schema_get_owner(x) ((const gchar*)(x)->owner) +#define gconf_schema_get_owner(x) ((const gchar*)(x)->owner) </MACRO> <MACRO> <NAME>gconf_schema_get_default_value</NAME> #define gconf_schema_get_default_value(x) ((x)->default_value) </MACRO> +<FUNCTION> +<NAME>gconf_is_initialized</NAME> +<RETURNS>gboolean </RETURNS> +void +</FUNCTION> +<USER_FUNCTION> +<NAME>GConfNotifyFunc</NAME> +<RETURNS>void </RETURNS> +GConfEngine* conf, + guint cnxn_id, + GConfEntry *entry, + gpointer user_data +</USER_FUNCTION> +<FUNCTION> +<NAME>gconf_engine_notify_add</NAME> +<RETURNS>guint </RETURNS> +GConfEngine *conf,const gchar *namespace_section,GConfNotifyFunc func,gpointer user_data,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_notify_remove</NAME> +<RETURNS>void </RETURNS> +GConfEngine *conf,guint cnxn +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get</NAME> +<RETURNS>GConfValue *</RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_without_default</NAME> +<RETURNS>GConfValue *</RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_entry</NAME> +<RETURNS>GConfEntry *</RETURNS> +GConfEngine *conf,const gchar *key,const gchar *locale,gboolean use_schema_default,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_with_locale</NAME> +<RETURNS>GConfValue *</RETURNS> +GConfEngine *conf,const gchar *key,const gchar *locale,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_default_from_schema</NAME> +<RETURNS>GConfValue *</RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GConfValue *value,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_unset</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_associate_schema</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,const gchar *schema_key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_all_entries</NAME> +<RETURNS>GSList *</RETURNS> +GConfEngine *conf,const gchar *dir,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_all_dirs</NAME> +<RETURNS>GSList *</RETURNS> +GConfEngine *conf,const gchar *dir,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_suggest_sync</NAME> +<RETURNS>void </RETURNS> +GConfEngine *conf,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_dir_exists</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *dir,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_key_is_writable</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_valid_key</NAME> +<RETURNS>gboolean </RETURNS> +const gchar *key,gchar **why_invalid +</FUNCTION> +<FUNCTION> +<NAME>gconf_key_is_below</NAME> +<RETURNS>gboolean </RETURNS> +const gchar *above,const gchar *below +</FUNCTION> +<FUNCTION> +<NAME>gconf_concat_dir_and_key</NAME> +<RETURNS>gchar *</RETURNS> +const gchar *dir,const gchar *key +</FUNCTION> +<FUNCTION> +<NAME>gconf_unique_key</NAME> +<RETURNS>gchar *</RETURNS> +void +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_float</NAME> +<RETURNS>gdouble </RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_int</NAME> +<RETURNS>gint </RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_string</NAME> +<RETURNS>gchar *</RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_bool</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_schema</NAME> +<RETURNS>GConfSchema *</RETURNS> +GConfEngine *conf,const gchar *key,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_list</NAME> +<RETURNS>GSList *</RETURNS> +GConfEngine *conf,const gchar *key,GConfValueType list_type,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_pair</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GConfValueType car_type,GConfValueType cdr_type,gpointer car_retloc,gpointer cdr_retloc,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_float</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,gdouble val,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_int</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,gint val,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_string</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,const gchar *val,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_bool</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,gboolean val,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_schema</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GConfSchema *val,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_list</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GConfValueType list_type,GSList *list,GError **err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_set_pair</NAME> +<RETURNS>gboolean </RETURNS> +GConfEngine *conf,const gchar *key,GConfValueType car_type,GConfValueType cdr_type,gconstpointer address_of_car,gconstpointer address_of_cdr,GError **err +</FUNCTION> +<STRUCT> +<NAME>GConfEnumStringPair</NAME> +</STRUCT> +<STRUCT> +<NAME>GConfEnumStringPair</NAME> +struct GConfEnumStringPair { + gint enum_value; + const gchar* str; +}; +</STRUCT> +<FUNCTION> +<NAME>gconf_string_to_enum</NAME> +<RETURNS>gboolean </RETURNS> +GConfEnumStringPair lookup_table[],const gchar *str,gint *enum_value_retloc +</FUNCTION> +<FUNCTION> +<NAME>gconf_enum_to_string</NAME> +<RETURNS>const gchar *</RETURNS> +GConfEnumStringPair lookup_table[],gint enum_value +</FUNCTION> +<FUNCTION> +<NAME>gconf_init</NAME> +<RETURNS>gboolean </RETURNS> +int argc, char **argv, GError** err +</FUNCTION> +<FUNCTION> +<NAME>gconf_preinit</NAME> +<RETURNS>void </RETURNS> +gpointer app, gpointer mod_info +</FUNCTION> +<FUNCTION> +<NAME>gconf_postinit</NAME> +<RETURNS>void </RETURNS> +gpointer app, gpointer mod_info +</FUNCTION> +<FUNCTION> +<NAME>gconf_clear_cache</NAME> +<RETURNS>void </RETURNS> +GConfEngine* conf, GError** err +</FUNCTION> +<FUNCTION> +<NAME>gconf_synchronous_sync</NAME> +<RETURNS>void </RETURNS> +GConfEngine* conf, GError** err +</FUNCTION> +<FUNCTION> +<NAME>gconf_engine_get_full</NAME> +<RETURNS>GConfValue *</RETURNS> +GConfEngine *conf,const gchar *key,const gchar *locale,gboolean use_schema_default,gboolean *is_default_p,gboolean *is_writable_p,GError **err +</FUNCTION> <STRUCT> <NAME>GConfBackend</NAME> </STRUCT> @@ -1237,7 +2165,7 @@ GConfSources *sources <FUNCTION> <NAME>gconf_sources_query_value</NAME> <RETURNS>GConfValue *</RETURNS> -GConfSources *sources,const gchar *key,const gchar **locales,gboolean use_schema_default,gboolean *value_is_default,GError **err +GConfSources *sources,const gchar *key,const gchar **locales,gboolean use_schema_default,gboolean *value_is_default,gboolean *value_is_writable,GError **err </FUNCTION> <FUNCTION> <NAME>gconf_sources_set_value</NAME> @@ -1287,7 +2215,7 @@ GConfSources* sources,const gchar* key,GError** err <FUNCTION> <NAME>gconf_sources_query_default_value</NAME> <RETURNS>GConfValue *</RETURNS> -GConfSources* sources,const gchar* key,const gchar** locales,GError** err +GConfSources* sources,const gchar* key,const gchar** locales,gboolean* is_writable,GError** err </FUNCTION> <ENUM> <NAME>GConfValueType</NAME> @@ -1313,10 +2241,6 @@ typedef enum { <NAME>GCONF_VALUE_TYPE_VALID</NAME> #define GCONF_VALUE_TYPE_VALID(x) (((x) > GCONF_VALUE_INVALID) && ((x) <= GCONF_VALUE_PAIR)) </MACRO> -<MACRO> -<NAME>GCONF_INTERNAL_VALUE_TYPE_VALID</NAME> -#define GCONF_INTERNAL_VALUE_TYPE_VALID(x) (((x) > GCONF_VALUE_INVALID) && ((x) <= GCONF_VALUE_PAIR)) -</MACRO> <STRUCT> <NAME>GConfSchema</NAME> </STRUCT> @@ -1522,25 +2446,35 @@ struct GConfEntry { gchar* key; GConfValue* value; gchar* schema_name; - gboolean is_default; + guint is_default : 1; + guint is_writable : 1; }; </STRUCT> <MACRO> <NAME>gconf_entry_get_key</NAME> -#define gconf_entry_get_key(x) ((const gchar*)(x)->key) +#define gconf_entry_get_key(x) ((const gchar*)(x)->key) </MACRO> <MACRO> <NAME>gconf_entry_get_value</NAME> -#define gconf_entry_get_value(x) ((x)->value) +#define gconf_entry_get_value(x) ((x)->value) </MACRO> <MACRO> <NAME>gconf_entry_get_schema_name</NAME> -#define gconf_entry_get_schema_name(x) ((x)->schema_name) +#define gconf_entry_get_schema_name(x) ((const gchar*)(x)->schema_name) </MACRO> <MACRO> <NAME>gconf_entry_get_is_default</NAME> #define gconf_entry_get_is_default(x) ((x)->is_default) </MACRO> +<MACRO> +<NAME>gconf_entry_get_is_writable</NAME> +#define gconf_entry_get_is_writable(x) ((x)->is_writable) +</MACRO> +<FUNCTION> +<NAME>gconf_entry_new</NAME> +<RETURNS>GConfEntry *</RETURNS> +const gchar *key,GConfValue *val +</FUNCTION> <FUNCTION> <NAME>gconf_entry_new_nocopy</NAME> <RETURNS>GConfEntry *</RETURNS> @@ -1557,6 +2491,11 @@ GConfEntry *entry GConfEntry *entry </FUNCTION> <FUNCTION> +<NAME>gconf_entry_set_value</NAME> +<RETURNS>void </RETURNS> +GConfEntry *entry,GConfValue *val +</FUNCTION> +<FUNCTION> <NAME>gconf_entry_set_value_nocopy</NAME> <RETURNS>void </RETURNS> GConfEntry *entry,GConfValue *val @@ -1572,219 +2511,19 @@ GConfEntry *entry,const gchar *name GConfEntry *entry,gboolean is_default </FUNCTION> <FUNCTION> -<NAME>gconf_is_initialized</NAME> -<RETURNS>gboolean </RETURNS> -void -</FUNCTION> -<USER_FUNCTION> -<NAME>GConfNotifyFunc</NAME> -<RETURNS>void </RETURNS> -GConfEngine* conf, guint cnxn_id, const gchar* key, GConfValue* value, gboolean is_default, gpointer user_data -</USER_FUNCTION> -<FUNCTION> -<NAME>gconf_engine_notify_add</NAME> -<RETURNS>guint </RETURNS> -GConfEngine *conf,const gchar *namespace_section,GConfNotifyFunc func,gpointer user_data,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_notify_remove</NAME> -<RETURNS>void </RETURNS> -GConfEngine *conf,guint cnxn -</FUNCTION> -<FUNCTION> -<NAME>gconf_get</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_without_default</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_full</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfEngine *conf,const gchar *key,const gchar *locale,gboolean use_schema_default,gboolean *value_is_default,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_with_locale</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfEngine *conf,const gchar *key,const gchar *locale,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_default_from_schema</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_set</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,GConfValue *value,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_unset</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_associate_schema</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,const gchar *schema_key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_all_entries</NAME> -<RETURNS>GSList *</RETURNS> -GConfEngine *conf,const gchar *dir,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_all_dirs</NAME> -<RETURNS>GSList *</RETURNS> -GConfEngine *conf,const gchar *dir,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_suggest_sync</NAME> -<RETURNS>void </RETURNS> -GConfEngine *conf,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_dir_exists</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *dir,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_valid_key</NAME> -<RETURNS>gboolean </RETURNS> -const gchar *key,gchar **why_invalid -</FUNCTION> -<FUNCTION> -<NAME>gconf_key_is_below</NAME> -<RETURNS>gboolean </RETURNS> -const gchar *above,const gchar *below -</FUNCTION> -<FUNCTION> -<NAME>gconf_concat_dir_and_key</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *dir,const gchar *key -</FUNCTION> -<FUNCTION> -<NAME>gconf_unique_key</NAME> -<RETURNS>gchar *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_float</NAME> -<RETURNS>gdouble </RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_int</NAME> -<RETURNS>gint </RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_string</NAME> -<RETURNS>gchar *</RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_bool</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_schema</NAME> -<RETURNS>GConfSchema *</RETURNS> -GConfEngine *conf,const gchar *key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_list</NAME> -<RETURNS>GSList *</RETURNS> -GConfEngine *conf,const gchar *key,GConfValueType list_type,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_get_pair</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,GConfValueType car_type,GConfValueType cdr_type,gpointer car_retloc,gpointer cdr_retloc,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_set_float</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,gdouble val,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_set_int</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,gint val,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_set_string</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,const gchar *val,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_set_bool</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,gboolean val,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_set_schema</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,GConfSchema *val,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_set_list</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,GConfValueType list_type,GSList *list,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_engine_set_pair</NAME> -<RETURNS>gboolean </RETURNS> -GConfEngine *conf,const gchar *key,GConfValueType car_type,GConfValueType cdr_type,gconstpointer address_of_car,gconstpointer address_of_cdr,GError **err +<NAME>gconf_get_poa</NAME> +<RETURNS>PortableServer_POA </RETURNS> + </FUNCTION> <FUNCTION> -<NAME>gconf_init</NAME> +<NAME>gconf_set_exception</NAME> <RETURNS>gboolean </RETURNS> -int argc, char **argv, GError** err -</FUNCTION> -<FUNCTION> -<NAME>gconf_preinit</NAME> -<RETURNS>void </RETURNS> -gpointer app, gpointer mod_info -</FUNCTION> -<FUNCTION> -<NAME>gconf_postinit</NAME> -<RETURNS>void </RETURNS> -gpointer app, gpointer mod_info +GError** err, CORBA_Environment* ev </FUNCTION> -<STRUCT> -<NAME>GConfEnumStringPair</NAME> -</STRUCT> -<STRUCT> -<NAME>GConfEnumStringPair</NAME> -struct GConfEnumStringPair { - gint enum_value; - const gchar* str; -}; -</STRUCT> <FUNCTION> -<NAME>gconf_string_to_enum</NAME> +<NAME>gconfd_logfile_change_listener</NAME> <RETURNS>gboolean </RETURNS> -GConfEnumStringPair lookup_table[],const gchar *str,gint *enum_value_retloc -</FUNCTION> -<FUNCTION> -<NAME>gconf_enum_to_string</NAME> -<RETURNS>const gchar *</RETURNS> -GConfEnumStringPair lookup_table[],gint enum_value -</FUNCTION> -<FUNCTION> -<NAME>gconf_clear_cache</NAME> -<RETURNS>void </RETURNS> -GConfEngine* conf, GError** err -</FUNCTION> -<FUNCTION> -<NAME>gconf_synchronous_sync</NAME> -<RETURNS>void </RETURNS> -GConfEngine* conf, GError** err +GConfDatabase *db,gboolean add,guint connection_id,ConfigListener listener,const gchar *where,GError **err </FUNCTION> <MACRO> <NAME>ORBIT_IDL_SERIAL</NAME> @@ -2586,6 +3325,97 @@ CORBA_unsigned_longlen gpointer mem,gpointer dat,CORBA_boolean free_strings </FUNCTION> <MACRO> +<NAME>ORBIT_DECL_CORBA_sequence_CORBA_boolean</NAME> +#define ORBIT_DECL_CORBA_sequence_CORBA_boolean 1 +</MACRO> +<MACRO> +<NAME>ORBIT_IMPL_CORBA_sequence_CORBA_boolean_0</NAME> +#define ORBIT_IMPL_CORBA_sequence_CORBA_boolean_0 'G' +</MACRO> +<MACRO> +<NAME>ORBIT_IMPL_CORBA_sequence_CORBA_boolean_1</NAME> +#define ORBIT_IMPL_CORBA_sequence_CORBA_boolean_1 'C' +</MACRO> +<MACRO> +<NAME>ORBIT_IMPL_CORBA_sequence_CORBA_boolean_2</NAME> +#define ORBIT_IMPL_CORBA_sequence_CORBA_boolean_2 'o' +</MACRO> +<MACRO> +<NAME>ORBIT_IMPL_CORBA_sequence_CORBA_boolean_3</NAME> +#define ORBIT_IMPL_CORBA_sequence_CORBA_boolean_3 'n' +</MACRO> +<MACRO> +<NAME>ORBIT_IMPL_CORBA_sequence_CORBA_boolean_4</NAME> +#define ORBIT_IMPL_CORBA_sequence_CORBA_boolean_4 'f' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_CORBA_sequence_CORBA_boolean_0</NAME> +#define TC_IMPL_TC_CORBA_sequence_CORBA_boolean_0 'G' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_CORBA_sequence_CORBA_boolean_1</NAME> +#define TC_IMPL_TC_CORBA_sequence_CORBA_boolean_1 'C' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_CORBA_sequence_CORBA_boolean_2</NAME> +#define TC_IMPL_TC_CORBA_sequence_CORBA_boolean_2 'o' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_CORBA_sequence_CORBA_boolean_3</NAME> +#define TC_IMPL_TC_CORBA_sequence_CORBA_boolean_3 'n' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_CORBA_sequence_CORBA_boolean_4</NAME> +#define TC_IMPL_TC_CORBA_sequence_CORBA_boolean_4 'f' +</MACRO> +<MACRO> +<NAME>TC_CORBA_sequence_CORBA_boolean</NAME> +#define TC_CORBA_sequence_CORBA_boolean ((CORBA_TypeCode)&TC_CORBA_sequence_CORBA_boolean_struct) +</MACRO> +<FUNCTION> +<NAME>CORBA_sequence_CORBA_boolean__free</NAME> +<RETURNS>gpointer </RETURNS> +gpointer mem,gpointer dat,CORBA_boolean free_strings +</FUNCTION> +<FUNCTION> +<NAME>CORBA_sequence_CORBA_boolean_allocbuf</NAME> +<RETURNS>CORBA_boolean *</RETURNS> +CORBA_unsigned_longlen +</FUNCTION> +<TYPEDEF> +<NAME>ConfigDatabase_IsWritableList</NAME> + typedef CORBA_sequence_CORBA_boolean ConfigDatabase_IsWritableList; +</TYPEDEF> +<MACRO> +<NAME>TC_IMPL_TC_ConfigDatabase_IsWritableList_0</NAME> +#define TC_IMPL_TC_ConfigDatabase_IsWritableList_0 'G' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_ConfigDatabase_IsWritableList_1</NAME> +#define TC_IMPL_TC_ConfigDatabase_IsWritableList_1 'C' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_ConfigDatabase_IsWritableList_2</NAME> +#define TC_IMPL_TC_ConfigDatabase_IsWritableList_2 'o' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_ConfigDatabase_IsWritableList_3</NAME> +#define TC_IMPL_TC_ConfigDatabase_IsWritableList_3 'n' +</MACRO> +<MACRO> +<NAME>TC_IMPL_TC_ConfigDatabase_IsWritableList_4</NAME> +#define TC_IMPL_TC_ConfigDatabase_IsWritableList_4 'f' +</MACRO> +<MACRO> +<NAME>TC_ConfigDatabase_IsWritableList</NAME> +#define TC_ConfigDatabase_IsWritableList ((CORBA_TypeCode)&TC_ConfigDatabase_IsWritableList_struct) +</MACRO> +<FUNCTION> +<NAME>ConfigDatabase_IsWritableList__free</NAME> +<RETURNS>gpointer </RETURNS> +gpointer mem,gpointer dat,CORBA_boolean free_strings +</FUNCTION> +<MACRO> <NAME>ORBIT_DECL_ConfigServer</NAME> #define ORBIT_DECL_ConfigServer 1 </MACRO> @@ -2658,7 +3488,7 @@ PortableServer_Servant servant,CORBA_Environment * ev <FUNCTION> <NAME>ConfigListener_notify</NAME> <RETURNS>void </RETURNS> -ConfigListener _obj,const ConfigDatabase database,const CORBA_unsigned_long cnxn,const CORBA_char * key,const ConfigValue * value,const CORBA_boolean is_default,CORBA_Environment * ev +ConfigListener _obj,const ConfigDatabase database,const CORBA_unsigned_long cnxn,const CORBA_char * key,const ConfigValue * value,const CORBA_boolean is_default,const CORBA_boolean is_writable,CORBA_Environment * ev </FUNCTION> <FUNCTION> <NAME>ConfigListener_ping</NAME> @@ -2688,7 +3518,7 @@ ConfigDatabase _obj,const CORBA_char * key,CORBA_Environment * ev <FUNCTION> <NAME>ConfigDatabase_lookup_with_locale</NAME> <RETURNS>ConfigValue *</RETURNS> -ConfigDatabase _obj,const CORBA_char * key,const CORBA_char * locale,const CORBA_booleanuse_schema_default,CORBA_boolean *value_is_default,CORBA_Environment * ev +ConfigDatabase _obj,const CORBA_char * key,const CORBA_char * locale,const CORBA_booleanuse_schema_default,CORBA_boolean *value_is_default,CORBA_boolean *value_is_writable,CORBA_Environment * ev </FUNCTION> <FUNCTION> <NAME>ConfigDatabase_lookup_default_value</NAME> @@ -2723,7 +3553,7 @@ ConfigDatabase _obj, const CORBA_char * dir,CORBA_Environment * ev <FUNCTION> <NAME>ConfigDatabase_all_entries</NAME> <RETURNS>void </RETURNS> -ConfigDatabase _obj,const CORBA_char * dir,const CORBA_char * locale,ConfigDatabase_KeyList ** keys,ConfigDatabase_ValueList ** values,ConfigDatabase_IsDefaultList **is_defaults, CORBA_Environment * ev +ConfigDatabase _obj,const CORBA_char * dir,const CORBA_char * locale,ConfigDatabase_KeyList ** keys,ConfigDatabase_ValueList ** values,ConfigDatabase_IsDefaultList **is_defaults,ConfigDatabase_IsWritableList **is_writables, CORBA_Environment * ev </FUNCTION> <FUNCTION> <NAME>ConfigDatabase_all_dirs</NAME> @@ -2770,632 +3600,6 @@ ConfigServer _obj, CORBA_Environment * ev <RETURNS>void </RETURNS> ConfigServer _obj, CORBA_Environment * ev </FUNCTION> -<ENUM> -<NAME>GMarkupNodeType</NAME> -typedef enum -{ - G_MARKUP_NODE_ELEMENT, - G_MARKUP_NODE_TEXT, - G_MARKUP_NODE_PASSTHROUGH -} GMarkupNodeType; -</ENUM> -<ENUM> -<NAME>GMarkupParseFlags</NAME> -typedef enum -{ - G_MARKUP_PRESERVE_ALL_WHITESPACE = 1 << 0 - -} GMarkupParseFlags; -</ENUM> -<ENUM> -<NAME>GMarkupToStringFlags</NAME> -typedef enum -{ - G_MARKUP_NO_FORMATTING = 1 << 0 - -} GMarkupToStringFlags; -</ENUM> -<STRUCT> -<NAME>GMarkupNodeText</NAME> -</STRUCT> -<STRUCT> -<NAME>GMarkupNodeElement</NAME> -</STRUCT> -<STRUCT> -<NAME>GMarkupNodeText</NAME> -struct GMarkupNodeText -{ - GMarkupNodeType type; - - gchar *text; -}; -</STRUCT> -<STRUCT> -<NAME>GMarkupNodeElement</NAME> -struct GMarkupNodeElement -{ - GMarkupNodeType type; - - gchar *name; - - GList *children; - - /* List members are an opaque datatype, so ignore this. */ - GList *attributes; -}; -</STRUCT> -<UNION> -<NAME>GMarkupNode</NAME> -union GMarkupNode -{ - GMarkupNodeType type; - - GMarkupNodeText text; - GMarkupNodeElement element; -}; -</UNION> -<ENUM> -<NAME>GMarkupErrorType</NAME> -typedef enum -{ - G_MARKUP_ERROR_BAD_UTF8, - G_MARKUP_ERROR_EMPTY, - G_MARKUP_ERROR_PARSE -} GMarkupErrorType; -</ENUM> -<MACRO> -<NAME>G_MARKUP_ERROR</NAME> -#define G_MARKUP_ERROR g_markup_error_quark () -</MACRO> -<FUNCTION> -<NAME>g_markup_error_quark</NAME> -<RETURNS>GQuark </RETURNS> - -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_new_text</NAME> -<RETURNS>GMarkupNodeText *</RETURNS> -const gchar *text -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_new_element</NAME> -<RETURNS>GMarkupNodeElement *</RETURNS> -const gchar *name -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_free</NAME> -<RETURNS>void </RETURNS> -GMarkupNode *node -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_set_attribute</NAME> -<RETURNS>void </RETURNS> -GMarkupNodeElement *node,const gchar *attribute_name,const gchar *attribute_value -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_get_attribute</NAME> -<RETURNS>gchar *</RETURNS> -GMarkupNodeElement *node,const gchar *attribute_name -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_unset_attribute</NAME> -<RETURNS>void </RETURNS> -GMarkupNodeElement *node,const gchar *attribute_name -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_get_attributes</NAME> -<RETURNS>void </RETURNS> -GMarkupNodeElement *node,gchar ***names,gchar ***values,gint *n_attributes -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_from_string</NAME> -<RETURNS>GMarkupNode *</RETURNS> -const gchar *text,gint length,GMarkupParseFlags flags,GError **error -</FUNCTION> -<FUNCTION> -<NAME>g_markup_node_to_string</NAME> -<RETURNS>gchar *</RETURNS> -GMarkupNode *node,GMarkupToStringFlags flags -</FUNCTION> -<FUNCTION> -<NAME>g_markup_nodes_from_string</NAME> -<RETURNS>GList *</RETURNS> -const gchar *text,gint length,GMarkupParseFlags flags,GError **error -</FUNCTION> -<FUNCTION> -<NAME>g_markup_nodes_to_string</NAME> -<RETURNS>gchar *</RETURNS> -GList *nodes,GMarkupToStringFlags flags -</FUNCTION> -<TYPEDEF> -<NAME>gunichar</NAME> -typedef guint32 gunichar; -</TYPEDEF> -<TYPEDEF> -<NAME>gunichar2</NAME> -typedef guint16 gunichar2; -</TYPEDEF> -<ENUM> -<NAME>GUnicodeType</NAME> -typedef enum { - G_UNICODE_CONTROL, - G_UNICODE_FORMAT, - G_UNICODE_UNASSIGNED, - G_UNICODE_PRIVATE_USE, - G_UNICODE_SURROGATE, - G_UNICODE_LOWERCASE_LETTER, - G_UNICODE_MODIFIER_LETTER, - G_UNICODE_OTHER_LETTER, - G_UNICODE_TITLECASE_LETTER, - G_UNICODE_UPPERCASE_LETTER, - G_UNICODE_COMBINING_MARK, - G_UNICODE_ENCLOSING_MARK, - G_UNICODE_NON_SPACING_MARK, - G_UNICODE_DECIMAL_NUMBER, - G_UNICODE_LETTER_NUMBER, - G_UNICODE_OTHER_NUMBER, - G_UNICODE_CONNECT_PUNCTUATION, - G_UNICODE_DASH_PUNCTUATION, - G_UNICODE_CLOSE_PUNCTUATION, - G_UNICODE_FINAL_PUNCTUATION, - G_UNICODE_INITIAL_PUNCTUATION, - G_UNICODE_OTHER_PUNCTUATION, - G_UNICODE_OPEN_PUNCTUATION, - G_UNICODE_CURRENCY_SYMBOL, - G_UNICODE_MODIFIER_SYMBOL, - G_UNICODE_MATH_SYMBOL, - G_UNICODE_OTHER_SYMBOL, - G_UNICODE_LINE_SEPARATOR, - G_UNICODE_PARAGRAPH_SEPARATOR, - G_UNICODE_SPACE_SEPARATOR -} GUnicodeType; -</ENUM> -<FUNCTION> -<NAME>g_get_charset</NAME> -<RETURNS>gboolean </RETURNS> -char **charset -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isalnum</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isalpha</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_iscntrl</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isdigit</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isgraph</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_islower</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isprint</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_ispunct</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isspace</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isupper</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isxdigit</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_istitle</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_isdefined</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_iswide</NAME> -<RETURNS>gboolean </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_toupper</NAME> -<RETURNS>gunichar </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_tolower</NAME> -<RETURNS>gunichar </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_totitle</NAME> -<RETURNS>gunichar </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_digit_value</NAME> -<RETURNS>gint </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_xdigit_value</NAME> -<RETURNS>gint </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_type</NAME> -<RETURNS>GUnicodeType </RETURNS> -gunichar c -</FUNCTION> -<FUNCTION> -<NAME>g_unicode_canonical_ordering</NAME> -<RETURNS>void </RETURNS> -gunichar *string,size_t len -</FUNCTION> -<FUNCTION> -<NAME>g_unicode_canonical_decomposition</NAME> -<RETURNS>gunichar *</RETURNS> -gunichar ch,size_t *result_len -</FUNCTION> -<MACRO> -<NAME>GLIB_VAR</NAME> -# define GLIB_VAR __declspec(dllexport) -</MACRO> -<MACRO> -<NAME>GLIB_VAR</NAME> -# define GLIB_VAR extern __declspec(dllimport) -</MACRO> -<MACRO> -<NAME>GLIB_VAR</NAME> -# define GLIB_VAR extern -</MACRO> -<MACRO> -<NAME>g_utf8_next_char</NAME> -#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)]) -</MACRO> -<FUNCTION> -<NAME>g_utf8_get_char</NAME> -<RETURNS>gunichar </RETURNS> -const gchar *p -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_offset_to_pointer</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *str,gint offset -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_pointer_to_offset</NAME> -<RETURNS>gint </RETURNS> -const gchar *str,const gchar *pos -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_prev_char</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *p -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_find_next_char</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *p,const gchar *bound -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_find_prev_char</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *str,const gchar *p -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_strlen</NAME> -<RETURNS>gint </RETURNS> -const gchar *p,gint max -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_strncpy</NAME> -<RETURNS>gchar *</RETURNS> -gchar *dest,const gchar *src,size_t n -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_strchr</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *p,gunichar ch -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_strrchr</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *p,gunichar ch -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_to_utf16</NAME> -<RETURNS>gunichar2 *</RETURNS> -const gchar *str,gint len -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_to_ucs4</NAME> -<RETURNS>gunichar *</RETURNS> -const gchar *str,gint len -</FUNCTION> -<FUNCTION> -<NAME>g_utf16_to_ucs4</NAME> -<RETURNS>gunichar *</RETURNS> -const gunichar2 *str,gint len -</FUNCTION> -<FUNCTION> -<NAME>g_utf16_to_utf8</NAME> -<RETURNS>gchar *</RETURNS> -const gunichar2 *str,gint len -</FUNCTION> -<FUNCTION> -<NAME>g_ucs4_to_utf16</NAME> -<RETURNS>gunichar *</RETURNS> -const gunichar *str,gint len -</FUNCTION> -<FUNCTION> -<NAME>g_ucs4_to_utf8</NAME> -<RETURNS>gchar *</RETURNS> -const gunichar *str,gint len -</FUNCTION> -<FUNCTION> -<NAME>g_unichar_to_utf8</NAME> -<RETURNS>gint </RETURNS> -gunichar c,char *outbuf -</FUNCTION> -<FUNCTION> -<NAME>g_utf8_validate</NAME> -<RETURNS>gboolean </RETURNS> -const gchar *str,gint len,const gchar **end -</FUNCTION> -<FUNCTION> -<NAME>g_convert</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *str,gint len,const gchar *to_codeset,const gchar *from_codeset,gint *bytes_converted,gint *bytes_written -</FUNCTION> -<MACRO> -<NAME>G_FILE_ERROR</NAME> -#define G_FILE_ERROR g_file_error_quark () -</MACRO> -<ENUM> -<NAME>GFileError</NAME> -typedef enum -{ - G_FILE_ERROR_EXIST, - G_FILE_ERROR_ISDIR, - G_FILE_ERROR_ACCES, - G_FILE_ERROR_NAMETOOLONG, - G_FILE_ERROR_NOENT, - G_FILE_ERROR_NOTDIR, - G_FILE_ERROR_NXIO, - G_FILE_ERROR_NODEV, - G_FILE_ERROR_ROFS, - G_FILE_ERROR_TXTBSY, - G_FILE_ERROR_FAULT, - G_FILE_ERROR_LOOP, - G_FILE_ERROR_NOSPC, - G_FILE_ERROR_NOMEM, - G_FILE_ERROR_MFILE, - G_FILE_ERROR_NFILE, - G_FILE_ERROR_FAILED -} GFileError; -</ENUM> -<FUNCTION> -<NAME>g_file_error_quark</NAME> -<RETURNS>GQuark </RETURNS> - -</FUNCTION> -<FUNCTION> -<NAME>g_file_get_contents</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *filename,GError **error -</FUNCTION> -<STRUCT> -<NAME>GError</NAME> -</STRUCT> -<STRUCT> -<NAME>GError</NAME> -struct GError -{ - GQuark domain; - gint code; - gchar *message; -}; -</STRUCT> -<FUNCTION> -<NAME>g_error_new</NAME> -<RETURNS>GError *</RETURNS> -GQuark domain,gint code,const gchar *format,... -</FUNCTION> -<FUNCTION> -<NAME>g_error_new_literal</NAME> -<RETURNS>GError *</RETURNS> -GQuark domain,gint code,const gchar *message -</FUNCTION> -<FUNCTION> -<NAME>g_error_free</NAME> -<RETURNS>void </RETURNS> -GError *error -</FUNCTION> -<FUNCTION> -<NAME>g_error_copy</NAME> -<RETURNS>GError *</RETURNS> -const GError *error -</FUNCTION> -<FUNCTION> -<NAME>g_error_matches</NAME> -<RETURNS>gboolean </RETURNS> -const GError *error,GQuark domain,gint code -</FUNCTION> -<FUNCTION> -<NAME>g_set_error</NAME> -<RETURNS>void </RETURNS> -GError **err,GQuark domain,gint code,const gchar *format,... -</FUNCTION> -<FUNCTION> -<NAME>g_clear_error</NAME> -<RETURNS>void </RETURNS> -GError **err -</FUNCTION> -<STRUCT> -<NAME>GConfDatabase</NAME> -</STRUCT> -<STRUCT> -<NAME>GConfDatabase</NAME> -struct GConfDatabase -{ - /* "inherit" from the servant, - must be first in struct */ - POA_ConfigDatabase servant; - - ConfigDatabase objref; - - GConfListeners* listeners; - GConfSources* sources; - - GTime last_access; - guint sync_idle; - guint sync_timeout; -}; -</STRUCT> -<FUNCTION> -<NAME>gconf_database_new</NAME> -<RETURNS>GConfDatabase *</RETURNS> -GConfSources *sources -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_free</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_add_listener</NAME> -<RETURNS>CORBA_unsigned_long </RETURNS> -GConfDatabase *db,ConfigListener who,const gchar *where -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_remove_listener</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,CORBA_unsigned_long cnxn -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_notify_listeners</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,const gchar *key,const ConfigValue *value,gboolean is_default -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_query_value</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfDatabase *db,const gchar *key,const gchar **locales,gboolean use_schema_default,gboolean *value_is_default,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_query_default_value</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfDatabase *db,const gchar *key,const gchar **locales,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_set</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,const gchar *key,GConfValue *value,const ConfigValue *cvalue,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_unset</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,const gchar *key,const gchar *locale,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_dir_exists</NAME> -<RETURNS>gboolean </RETURNS> -GConfDatabase *db,const gchar *dir,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_remove_dir</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,const gchar *dir,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_all_entries</NAME> -<RETURNS>GSList *</RETURNS> -GConfDatabase *db,const gchar *dir,const gchar **locales,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_all_dirs</NAME> -<RETURNS>GSList *</RETURNS> -GConfDatabase *db,const gchar *dir,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_set_schema</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,const gchar *key,const gchar *schema_key,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_sync</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_synchronous_sync</NAME> -<RETURNS>gboolean </RETURNS> -GConfDatabase *db,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_clear_cache</NAME> -<RETURNS>void </RETURNS> -GConfDatabase *db,GError **err -</FUNCTION> -<FUNCTION> -<NAME>gconfd_locale_cache_expire</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gconfd_locale_cache_drop</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gconf_database_to_node</NAME> -<RETURNS>GMarkupNode *</RETURNS> -GConfDatabase *db, gboolean is_default -</FUNCTION> -<FUNCTION> -<NAME>gconf_get_poa</NAME> -<RETURNS>PortableServer_POA </RETURNS> - -</FUNCTION> -<FUNCTION> -<NAME>gconf_set_exception</NAME> -<RETURNS>gboolean </RETURNS> -GError** err, CORBA_Environment* ev -</FUNCTION> -<FUNCTION> -<NAME>gconf_logfile_queue_save</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> <MACRO> <NAME>MO_REVISION_NUMBER</NAME> #define MO_REVISION_NUMBER 0 @@ -3595,11 +3799,6 @@ struct msg_ent (struct loaded_l10nfile **l10nfile_list,const char *dirlist, size_t dirlist_len, int mask,const char *language, const char *territory,const char *codeset,const char *normalized_codeset,const char *modifier, const char *special,const char *sponsor, const char *revision,const char *filename, int do_allocate) </FUNCTION> <FUNCTION> -<NAME>gce_install_menus_and_toolbar</NAME> -<RETURNS>void </RETURNS> -GtkWidget* app -</FUNCTION> -<FUNCTION> <NAME>gce_app_new</NAME> <RETURNS>GtkWidget *</RETURNS> const gchar* geometry @@ -3610,6 +3809,11 @@ const gchar* geometry GtkWidget* app </FUNCTION> <FUNCTION> +<NAME>gce_install_menus_and_toolbar</NAME> +<RETURNS>void </RETURNS> +GtkWidget* app +</FUNCTION> +<FUNCTION> <NAME>set</NAME> <RETURNS>void </RETURNS> const string& key, int val @@ -3719,17 +3923,23 @@ typedef enum { <USER_FUNCTION> <NAME>GConfClientNotifyFunc</NAME> <RETURNS>void </RETURNS> -GConfClient* client, guint cnxn_id, const gchar* key, GConfValue* value, gboolean is_default, gpointer user_data +GConfClient* client, + guint cnxn_id, + GConfEntry *entry, + gpointer user_data </USER_FUNCTION> <USER_FUNCTION> <NAME>GConfClientParentWindowFunc</NAME> <RETURNS>GtkWidget *</RETURNS> -GConfClient* client, gpointer user_data +GConfClient* client, + gpointer user_data </USER_FUNCTION> <USER_FUNCTION> <NAME>GConfClientErrorHandlerFunc</NAME> <RETURNS>void </RETURNS> -GConfClient* client, GConfClientParentWindowFunc parent_func, gpointer parent_user_data, GError* error +GConfClient* client, + GConfClientParentWindowFunc parent_func, + gpointer parent_user_data, GError* error </USER_FUNCTION> <MACRO> <NAME>GCONF_TYPE_CLIENT</NAME> @@ -3839,9 +4049,9 @@ GConfClient* client,const gchar* key,GError** err GConfClient* client,const gchar* key,GError** err </FUNCTION> <FUNCTION> -<NAME>gconf_client_get_full</NAME> -<RETURNS>GConfValue *</RETURNS> -GConfClient* client,const gchar* key, const gchar* locale,gboolean use_schema_default,gboolean* value_is_default,GError** err +<NAME>gconf_client_get_entry</NAME> +<RETURNS>GConfEntry *</RETURNS> +GConfClient* client,const gchar* key,const gchar* locale,gboolean use_schema_default,GError** err </FUNCTION> <FUNCTION> <NAME>gconf_client_get_default_from_schema</NAME> @@ -3874,6 +4084,11 @@ GConfClient* client,GError** err GConfClient* client,const gchar* dir, GError** err </FUNCTION> <FUNCTION> +<NAME>gconf_client_key_is_writable</NAME> +<RETURNS>gboolean </RETURNS> +GConfClient* client,const gchar* key,GError** err +</FUNCTION> +<FUNCTION> <NAME>gconf_client_get_float</NAME> <RETURNS>gdouble </RETURNS> GConfClient* client, const gchar* key,GError** err diff --git a/doc/gconf/gconf-sections.txt b/doc/gconf/gconf-sections.txt index c5f48e55..312ca2cd 100644 --- a/doc/gconf/gconf-sections.txt +++ b/doc/gconf/gconf-sections.txt @@ -20,7 +20,7 @@ gconf_client_preload gconf_client_set gconf_client_get gconf_client_get_without_default -gconf_client_get_full +gconf_client_get_entry gconf_client_get_default_from_schema gconf_client_unset gconf_client_all_entries @@ -127,6 +127,7 @@ gconf_value_list_to_primitive_list_destructive gconf_value_pair_to_primitive_pair_destructive gconf_set_daemon_mode gconf_handle_oaf_exception +gconf_engine_get_full </SECTION> <SECTION> @@ -196,7 +197,6 @@ gconf_sources_query_default_value GConfValueType GConfValue GCONF_VALUE_TYPE_VALID -GCONF_INTERNAL_VALUE_TYPE_VALID gconf_value_new gconf_value_copy gconf_value_free @@ -254,12 +254,12 @@ gconf_is_initialized GConfNotifyFunc gconf_engine_notify_add gconf_engine_notify_remove -gconf_get +gconf_engine_get gconf_engine_get_with_locale gconf_engine_get_without_default -gconf_engine_get_full +gconf_engine_get_entry gconf_engine_get_default_from_schema -gconf_set +gconf_engine_set gconf_engine_unset gconf_engine_associate_schema gconf_engine_all_entries diff --git a/doc/gconf/tmpl/gconf-client.sgml b/doc/gconf/tmpl/gconf-client.sgml index 3b907130..058a25f8 100644 --- a/doc/gconf/tmpl/gconf-client.sgml +++ b/doc/gconf/tmpl/gconf-client.sgml @@ -160,10 +160,12 @@ is called). @client: the #GConfClient notifying us. @cnxn_id: connection ID from gconf_client_notify_add(). +@entry: +@user_data: user data from gconf_client_notify_add(). +<!-- # Unused Parameters # --> @key: key that has changed. @value: new value, or <symbol>NULL</symbol> for unset. @is_default: -@user_data: user data from gconf_client_notify_add(). <!-- ##### USER_FUNCTION GConfClientParentWindowFunc ##### --> @@ -382,7 +384,7 @@ modified. @Returns: -<!-- ##### FUNCTION gconf_client_get_full ##### --> +<!-- ##### FUNCTION gconf_client_get_entry ##### --> <para> </para> @@ -391,7 +393,6 @@ modified. @key: @locale: @use_schema_default: -@value_is_default: @err: @Returns: diff --git a/doc/gconf/tmpl/gconf-engine.sgml b/doc/gconf/tmpl/gconf-engine.sgml index 3fcf66f5..cb9545c7 100644 --- a/doc/gconf/tmpl/gconf-engine.sgml +++ b/doc/gconf/tmpl/gconf-engine.sgml @@ -30,7 +30,6 @@ configuration values. An opaque data type representing one or more configuration sources. </para> -@dummy: <!-- ##### FUNCTION gconf_engine_get_default ##### --> <para> @@ -48,7 +47,7 @@ before exiting your application. <!-- ##### FUNCTION gconf_engine_get_for_address ##### --> <para> -Creates a special #GConfEngine; mostly useful for specialized +Obtains a special #GConfEngine; mostly useful for specialized GConf-related tools. Normal clients shouldn't need to use it. As with gconf_engine_get_default(), the returned #GConfEngine should be unreferenced by the caller of this function. @@ -56,17 +55,20 @@ unreferenced by the caller of this function. @address: a configuration source address. @err: the return location for an allocated #GError, or <symbol>NULL</symbol> to ignore errors. -@Returns: a new #GConfEngine. +@Returns: a #GConfEngine. <!-- ##### FUNCTION gconf_engine_get_local ##### --> <para> - +Obtain a local (non-process-transparent) #GConfEngine. Local engines +do not support notification, and can only access config databases +directly (they do not use the multiple sources in a path system +supported by nonlocal engines). </para> -@address: -@err: -@Returns: +@address: address of local database +@err: return location of an allocated #GError +@Returns: a #GConfEngine <!-- ##### FUNCTION gconf_engine_unref ##### --> diff --git a/doc/gconf/tmpl/gconf-error.sgml b/doc/gconf/tmpl/gconf-error.sgml index 835906ed..bc9b7537 100644 --- a/doc/gconf/tmpl/gconf-error.sgml +++ b/doc/gconf/tmpl/gconf-error.sgml @@ -97,6 +97,7 @@ specific actions depending on the error type. @GCONF_ERROR_OAF_ERROR: @GCONF_ERROR_LOCAL_ENGINE: @GCONF_ERROR_LOCK_FAILED: +@GCONF_ERROR_NO_WRITABLE_DATABASE: <!-- ##### FUNCTION gconf_error_new ##### --> <para> diff --git a/doc/gconf/tmpl/gconf-internals.sgml b/doc/gconf/tmpl/gconf-internals.sgml index cd16bb59..d93d9e4d 100644 --- a/doc/gconf/tmpl/gconf-internals.sgml +++ b/doc/gconf/tmpl/gconf-internals.sgml @@ -384,3 +384,20 @@ This function does not work. Don't use it. @Returns: +<!-- ##### FUNCTION gconf_engine_get_full ##### --> +<para> +This function is basically for internal use. +</para> + +@conf: +@key: +@locale: +@use_schema_default: +@is_default_p: +@is_writable_p: +@err: +@Returns: +<!-- # Unused Parameters # --> +@value_is_default: + + diff --git a/doc/gconf/tmpl/gconf-sources.sgml b/doc/gconf/tmpl/gconf-sources.sgml index 4d2a0195..c37064c9 100644 --- a/doc/gconf/tmpl/gconf-sources.sgml +++ b/doc/gconf/tmpl/gconf-sources.sgml @@ -95,6 +95,7 @@ gconf-sources @locales: @use_schema_default: @value_is_default: +@value_is_writable: @err: @Returns: @@ -205,6 +206,7 @@ gconf-sources @sources: @key: @locales: +@is_writable: @err: @Returns: diff --git a/doc/gconf/tmpl/gconf-unused.sgml b/doc/gconf/tmpl/gconf-unused.sgml index fdfde1f9..33afec3d 100644 --- a/doc/gconf/tmpl/gconf-unused.sgml +++ b/doc/gconf/tmpl/gconf-unused.sgml @@ -143,6 +143,26 @@ Copies a #GError. GConf CORBA +<!-- ##### MACRO GCONF_INTERNAL_VALUE_TYPE_VALID ##### --> +<para> + +</para> + +@x: + +<!-- ##### FUNCTION gconf_client_get_full ##### --> +<para> + +</para> + +@client: +@key: +@locale: +@use_schema_default: +@value_is_default: +@err: +@Returns: + <!-- ##### SECTION ./tmpl/gconf-orbit.sgml:Short_Description ##### --> Interface for setting up CORBA diff --git a/doc/gconf/tmpl/gconf-value.sgml b/doc/gconf/tmpl/gconf-value.sgml index efee7f57..442f921b 100644 --- a/doc/gconf/tmpl/gconf-value.sgml +++ b/doc/gconf/tmpl/gconf-value.sgml @@ -74,14 +74,6 @@ list value. @x: -<!-- ##### MACRO GCONF_INTERNAL_VALUE_TYPE_VALID ##### --> -<para> - -</para> - -@x: - - <!-- ##### FUNCTION gconf_value_new ##### --> <para> Creates a new #GConfValue with type @type. The type is immutable after @@ -465,16 +457,23 @@ with g_free(). <!-- ##### STRUCT GConfEntry ##### --> <para> -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_get_key() and gconf_entry_get_value(). +Stores an entry from a GConf "directory," including a key-value pair, +the name of the schema applicable to this entry, whether the value is +a default value, and whether GConf can write a new value at this +key. @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_get_key() and gconf_entry_get_value(). </para> +<warning><para>Value can be <symbol>NULL</symbol>, indicating that the +value is not set.</para></warning> + @key: an absolute key name @value: a #GConfValue -@schema_name: -@is_default: +@schema_name: name of the schema applied to this entry +@is_default: whether @value is a default from the schema +@is_writable: whether a new value could be set for this entry <!-- ##### FUNCTION gconf_entry_new_nocopy ##### --> <para> diff --git a/doc/gconf/tmpl/gconf.sgml b/doc/gconf/tmpl/gconf.sgml index 6352b051..30b9e8c2 100644 --- a/doc/gconf/tmpl/gconf.sgml +++ b/doc/gconf/tmpl/gconf.sgml @@ -79,10 +79,12 @@ gconf_engine_notify_add(). @conf: the #GConfEngine passed to gconf_engine_notify_add(). @cnxn_id: the ID returned from gconf_engine_notify_add(). +@entry: +@user_data: the user data passed to gconf_engine_notify_add(). +<!-- # Unused Parameters # --> @key: the full path of the changed key. @value: the new value, or <symbol>NULL</symbol> if the key was unset. @is_default: if <symbol>TRUE</symbol>, the key is unset but this is the default value for it. -@user_data: the user data passed to gconf_engine_notify_add(). <!-- ##### FUNCTION gconf_engine_notify_add ##### --> @@ -163,16 +165,15 @@ return <symbol>NULL</symbol> if no default exists or an error occurs. @Returns: newly-allocated #GConfValue, or <symbol>NULL</symbol> if unset. -<!-- ##### FUNCTION gconf_engine_get_full ##### --> +<!-- ##### FUNCTION gconf_engine_get_entry ##### --> <para> -This function is basically for internal use. +Obtain the full #GConfEntry for a value. </para> @conf: @key: @locale: @use_schema_default: -@value_is_default: @err: @Returns: diff --git a/examples/basic-gconf-app.c b/examples/basic-gconf-app.c index 1dae53b1..07690303 100644 --- a/examples/basic-gconf-app.c +++ b/examples/basic-gconf-app.c @@ -123,9 +123,7 @@ configurable_widget_destroy_callback(GtkWidget* widget, gpointer data) static void configurable_widget_config_notify(GConfClient* client, guint cnxn_id, - const gchar* key, - GConfValue* value, - gboolean is_default, + GConfEntry *entry, gpointer user_data) { GtkWidget* label = user_data; @@ -136,13 +134,14 @@ configurable_widget_config_notify(GConfClient* client, /* Note that value can be NULL (unset) or it can have the wrong type! */ - if (value == NULL) + if (entry->value == NULL) { gtk_label_set_text(GTK_LABEL(label), ""); } - else if (value->type == GCONF_VALUE_STRING) + else if (entry->value->type == GCONF_VALUE_STRING) { - gtk_label_set_text(GTK_LABEL(label), gconf_value_get_string(value)); + gtk_label_set_text(GTK_LABEL(label), + gconf_value_get_string(entry->value)); } else { diff --git a/examples/simple-view.c b/examples/simple-view.c index 8b852bd7..fb44a919 100644 --- a/examples/simple-view.c +++ b/examples/simple-view.c @@ -27,24 +27,23 @@ void key_changed_callback(GConfClient* client, guint cnxn_id, - const gchar* key, - GConfValue* value, - gboolean is_default, + GConfEntry *entry, gpointer user_data) { GtkWidget* label; label = GTK_WIDGET(user_data); - if (value == NULL) + if (entry->value == NULL) { gtk_label_set(GTK_LABEL(label), "<unset>"); } else { - if (value->type == GCONF_VALUE_STRING) + if (entry->value->type == GCONF_VALUE_STRING) { - gtk_label_set(GTK_LABEL(label), gconf_value_get_string(value)); + gtk_label_set(GTK_LABEL(label), + gconf_value_get_string(entry->value)); } else { diff --git a/gconf/GConf.idl b/gconf/GConf.idl index ddb3bc9c..ae931f22 100644 --- a/gconf/GConf.idl +++ b/gconf/GConf.idl @@ -69,7 +69,8 @@ interface ConfigListener { in unsigned long cnxn, in string key, in ConfigValue value, - in boolean is_default); + in boolean is_default, + in boolean is_writable); oneway void ping (); @@ -103,6 +104,7 @@ interface ConfigDatabase { typedef sequence<string> KeyList; typedef sequence<ConfigValue> ValueList; typedef sequence<boolean> IsDefaultList; + typedef sequence<boolean> IsWritableList; // "where" is the portion of the namespace to listen to // Returns a connection ID for removal @@ -118,7 +120,8 @@ interface ConfigDatabase { ConfigValue lookup_with_locale(in string key, in string locale, in boolean use_schema_default, - out boolean value_is_default) + out boolean value_is_default, + out boolean value_is_writable) raises (ConfigException); // syntactic sugar, semi-hack: should maybe use a get_metainfo() @@ -146,7 +149,8 @@ interface ConfigDatabase { in string locale, out KeyList keys, out ValueList values, - out IsDefaultList is_defaults) + out IsDefaultList is_defaults, + out IsWritableList is_writables) raises (ConfigException); void all_dirs(in string dir, diff --git a/gconf/GConfX.idl b/gconf/GConfX.idl index ddb3bc9c..ae931f22 100644 --- a/gconf/GConfX.idl +++ b/gconf/GConfX.idl @@ -69,7 +69,8 @@ interface ConfigListener { in unsigned long cnxn, in string key, in ConfigValue value, - in boolean is_default); + in boolean is_default, + in boolean is_writable); oneway void ping (); @@ -103,6 +104,7 @@ interface ConfigDatabase { typedef sequence<string> KeyList; typedef sequence<ConfigValue> ValueList; typedef sequence<boolean> IsDefaultList; + typedef sequence<boolean> IsWritableList; // "where" is the portion of the namespace to listen to // Returns a connection ID for removal @@ -118,7 +120,8 @@ interface ConfigDatabase { ConfigValue lookup_with_locale(in string key, in string locale, in boolean use_schema_default, - out boolean value_is_default) + out boolean value_is_default, + out boolean value_is_writable) raises (ConfigException); // syntactic sugar, semi-hack: should maybe use a get_metainfo() @@ -146,7 +149,8 @@ interface ConfigDatabase { in string locale, out KeyList keys, out ValueList values, - out IsDefaultList is_defaults) + out IsDefaultList is_defaults, + out IsWritableList is_writables) raises (ConfigException); void all_dirs(in string dir, diff --git a/gconf/gconf-changeset.c b/gconf/gconf-changeset.c index b3e29014..4fa86ca0 100644 --- a/gconf/gconf-changeset.c +++ b/gconf/gconf-changeset.c @@ -43,6 +43,8 @@ struct _GConfChangeSet { guint refcount; GHashTable* hash; gint in_foreach; + gpointer user_data; + GDestroyNotify dnotify; }; GConfChangeSet* @@ -55,6 +57,8 @@ gconf_change_set_new (void) cs->refcount = 1; cs->hash = g_hash_table_new(g_str_hash, g_str_equal); cs->in_foreach = 0; + cs->user_data = NULL; + cs->dnotify = NULL; return cs; } @@ -88,6 +92,24 @@ gconf_change_set_unref (GConfChangeSet* cs) } } +void +gconf_change_set_set_user_data (GConfChangeSet *cs, + gpointer data, + GDestroyNotify dnotify) +{ + if (cs->dnotify) + (* cs->dnotify) (cs->user_data); + + cs->user_data = data; + cs->dnotify = dnotify; +} + +gpointer +gconf_change_set_get_user_data (GConfChangeSet *cs) +{ + return cs->user_data; +} + static Change* get_change_unconditional (GConfChangeSet* cs, const gchar* key) diff --git a/gconf/gconf-changeset.h b/gconf/gconf-changeset.h index 01cc779e..040d1334 100644 --- a/gconf/gconf-changeset.h +++ b/gconf/gconf-changeset.h @@ -124,6 +124,15 @@ void gconf_change_set_set_pair (GConfChangeSet* cs, const gchar* key, gconstpointer address_of_car, gconstpointer address_of_cdr); + +/* For use by language bindings only */ +void gconf_change_set_set_user_data (GConfChangeSet *cs, + gpointer data, + GDestroyNotify dnotify); +gpointer gconf_change_set_get_user_data (GConfChangeSet *cs); + + + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gconf/gconf-client.c b/gconf/gconf-client.c index 31397745..5414a65e 100644 --- a/gconf/gconf-client.c +++ b/gconf/gconf-client.c @@ -24,20 +24,6 @@ #include <gtk/gtktypeutils.h> #include <gconf/gconf-internals.h> -/* Quick hack so I can mark strings */ - -#ifdef _ -#warning "_ already defined" -#else -#define _(x) x -#endif - -#ifdef N_ -#warning "N_ already defined" -#else -#define N_(x) x -#endif - /* * Error handler override */ @@ -61,10 +47,13 @@ struct _CacheEntry { /* Whether "value" was a default from a schema; i.e. if this is TRUE, then value wasn't set, we just used a default. */ - gboolean is_default; + guint is_default : 1; + guint is_writable : 1; }; -static CacheEntry* cache_entry_new(GConfValue* val, gboolean is_default); +static CacheEntry* cache_entry_new(GConfValue* val, + gboolean is_default, + gboolean is_writable); static void cache_entry_destroy(CacheEntry* ce); /* @@ -127,12 +116,14 @@ static void gconf_client_finalize (GtkObject* object); static void gconf_client_cache (GConfClient* client, const gchar* key, gboolean is_default, + gboolean is_writable, GConfValue* value); /* takes ownership of value */ static gboolean gconf_client_lookup (GConfClient* client, const gchar* key, gboolean use_default, gboolean* is_default, + gboolean* is_writable, GConfValue** valp); static void gconf_client_real_remove_dir (GConfClient* client, @@ -346,8 +337,7 @@ handle_error(GConfClient* client, GError* error, GError** err) struct client_and_val { GConfClient* client; - GConfValue* val; - gboolean is_default; + GConfEntry* entry; }; static void @@ -366,13 +356,12 @@ notify_listeners_callback(GConfListeners* listeners, g_return_if_fail(l != NULL); g_return_if_fail(l->func != NULL); - (*l->func)(cav->client, cnxn_id, key, cav->val, cav->is_default, l->data); + (*l->func)(cav->client, cnxn_id, cav->entry, l->data); } static void notify_from_server_callback(GConfEngine* conf, guint cnxn_id, - const gchar* key, GConfValue* value, - gboolean is_default, + GConfEntry *entry, gpointer user_data) { GConfClient* client = user_data; @@ -386,14 +375,17 @@ notify_from_server_callback(GConfEngine* conf, guint cnxn_id, * We know this key is under a directory in our dir list. */ gconf_client_cache(client, - key, - is_default, - value ? gconf_value_copy(value) : NULL); + entry->key, + entry->is_default, + entry->is_writable, + entry->value ? gconf_value_copy(entry->value) : NULL); /* Emit the value_changed signal before notifying specific listeners; * I'm not sure there's a reason this matters though */ - gconf_client_value_changed(client, key, value); + gconf_client_value_changed(client, + entry->key, + entry->value); /* Now notify our listeners, if any */ if (client->listeners != NULL) @@ -401,11 +393,10 @@ notify_from_server_callback(GConfEngine* conf, guint cnxn_id, struct client_and_val cav; cav.client = client; - cav.val = value; - cav.is_default = is_default; + cav.entry = entry; gconf_listeners_notify(client->listeners, - key, + entry->key, notify_listeners_callback, &cav); } @@ -826,6 +817,7 @@ cache_pairs_in_dir(GConfClient* client, const gchar* dir) gconf_client_cache(client, gconf_entry_get_key (pair), gconf_entry_get_is_default(pair), + gconf_entry_get_is_writable(pair), gconf_entry_steal_value(pair)); gconf_entry_free(pair); @@ -976,6 +968,15 @@ gconf_client_dir_exists (GConfClient* client, return retval; } +gboolean +gconf_client_key_is_writable(GConfClient* client, + const gchar* key, + GError** err) +{ + /* FIXME */ + return TRUE; +} + static gboolean check_type(const gchar* key, GConfValue* val, GConfValueType t, GError** err) { @@ -994,11 +995,14 @@ check_type(const gchar* key, GConfValue* val, GConfValueType t, GError** err) static GConfValue* get(GConfClient* client, const gchar* key, - gboolean use_default, gboolean* is_default_retloc, + gboolean use_default, + gboolean* is_default_retloc, + gboolean *is_writable_retloc, GError** error) { GConfValue* val = NULL; gboolean is_default = FALSE; + gboolean is_writable = TRUE; g_return_val_if_fail(client != NULL, NULL); g_return_val_if_fail(GCONF_IS_CLIENT(client), NULL); @@ -1006,11 +1010,17 @@ get(GConfClient* client, const gchar* key, g_return_val_if_fail(*error == NULL, NULL); /* Check our client-side cache */ - if (gconf_client_lookup(client, key, use_default, &is_default, &val)) + if (gconf_client_lookup(client, key, use_default, + &is_default, + &is_writable, + &val)) { if (is_default_retloc) *is_default_retloc = is_default; - + + if (is_writable_retloc) + *is_writable_retloc = is_writable; + /* stored in cache, not necessarily set though, so check NULL */ return val ? gconf_value_copy(val) : NULL; } @@ -1018,11 +1028,16 @@ get(GConfClient* client, const gchar* key, g_assert(val == NULL); /* if it was in the cache we should have returned */ /* Check the GConfEngine */ - val = gconf_engine_get_full(client->engine, key, gconf_current_locale(), - use_default, &is_default, error); + val = gconf_engine_get_full(client->engine, key, + gconf_current_locale(), + use_default, &is_default, &is_writable, + error); if (is_default_retloc) *is_default_retloc = is_default; + + if (is_writable_retloc) + *is_writable_retloc = is_writable; if (*error != NULL) { @@ -1045,7 +1060,7 @@ get(GConfClient* client, const gchar* key, if (g_hash_table_lookup(client->dir_hash, parent) != NULL) { /* note that we cache a _copy_ */ - gconf_client_cache(client, key, is_default, + gconf_client_cache(client, key, is_default, is_writable, val ? gconf_value_copy(val) : NULL); break; } @@ -1059,29 +1074,74 @@ get(GConfClient* client, const gchar* key, } } -GConfValue* + +static GConfValue* gconf_client_get_full (GConfClient* client, const gchar* key, const gchar* locale, gboolean use_schema_default, gboolean* value_is_default, + gboolean* value_is_writable, GError** err) { GError* error = NULL; GConfValue* val = NULL; + gboolean is_default = FALSE; + gboolean is_writable = TRUE; + + g_return_val_if_fail(err == NULL || *err == NULL, NULL); + + if (locale != NULL) + g_warning("haven't implemented getting a specific locale in GConfClient"); + + val = get(client, key, use_schema_default, + &is_default, &is_writable, &error); + if (val == NULL && error != NULL) + handle_error(client, error, err); + else + g_assert(error == NULL); + + + if (value_is_default) + *value_is_default = is_default; + + if (value_is_writable) + *value_is_writable = is_writable; + + return val; +} + +GConfEntry* +gconf_client_get_entry (GConfClient* client, + const gchar* key, + const gchar* locale, + gboolean use_schema_default, + GError** err) +{ + GError* error = NULL; + GConfValue* val = NULL; + gboolean is_default = FALSE; + gboolean is_writable = TRUE; + GConfEntry *entry; + g_return_val_if_fail(err == NULL || *err == NULL, NULL); if (locale != NULL) g_warning("haven't implemented getting a specific locale in GConfClient"); - val = get(client, key, use_schema_default, value_is_default, &error); + val = get(client, key, use_schema_default, + &is_default, &is_writable, &error); if (val == NULL && error != NULL) handle_error(client, error, err); else g_assert(error == NULL); + + entry = gconf_entry_new_nocopy (g_strdup (key), val); + entry->is_default = is_default; + entry->is_writable = is_writable; - return val; + return entry; } GConfValue* @@ -1089,7 +1149,7 @@ gconf_client_get (GConfClient* client, const gchar* key, GError** err) { - return gconf_client_get_full(client, key, NULL, TRUE, NULL, err); + return gconf_client_get_full(client, key, NULL, TRUE, NULL, NULL, err); } GConfValue* @@ -1097,7 +1157,7 @@ gconf_client_get_without_default (GConfClient* client, const gchar* key, GError** err) { - return gconf_client_get_full(client, key, NULL, FALSE, NULL, err); + return gconf_client_get_full(client, key, NULL, FALSE, NULL, NULL, err); } GConfValue* @@ -1116,7 +1176,10 @@ gconf_client_get_default_from_schema (GConfClient* client, /* Check our client-side cache to see if the default is the same as the regular value (FIXME put a default_value field in the CacheEntry and store both, lose the is_default flag in CacheEntry) */ - if (gconf_client_lookup(client, key, TRUE, &is_default, &val)) + if (gconf_client_lookup(client, key, TRUE, + &is_default, + NULL, + &val)) { if (is_default) return val ? gconf_value_copy(val) : NULL; @@ -1124,7 +1187,7 @@ gconf_client_get_default_from_schema (GConfClient* client, /* Check the GConfEngine */ val = gconf_engine_get_default_from_schema(client->engine, key, - &error); + &error); if (error != NULL) { @@ -1150,7 +1213,7 @@ gconf_client_get_float (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, 0.0); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1185,7 +1248,7 @@ gconf_client_get_int (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, 0); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1220,7 +1283,7 @@ gconf_client_get_string(GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, NULL); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1263,7 +1326,7 @@ gconf_client_get_bool (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, FALSE); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1297,7 +1360,7 @@ gconf_client_get_schema (GConfClient* client, g_return_val_if_fail(err == NULL || *err == NULL, NULL); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1335,7 +1398,7 @@ gconf_client_get_list (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, NULL); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1374,7 +1437,7 @@ gconf_client_get_pair (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, FALSE); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1609,6 +1672,7 @@ static void gconf_client_cache (GConfClient* client, const gchar* key, gboolean is_default, + gboolean is_writable, GConfValue* value) { /* Remember: value may be NULL */ @@ -1627,11 +1691,12 @@ gconf_client_cache (GConfClient* client, ce->value = value; ce->is_default = is_default; + ce->is_writable = is_writable; } else { /* Create a new entry */ - CacheEntry* ce = cache_entry_new(value, is_default); + CacheEntry* ce = cache_entry_new(value, is_default, is_writable); g_hash_table_insert(client->cache_hash, g_strdup(key), ce); } } @@ -1641,6 +1706,7 @@ gconf_client_lookup (GConfClient* client, const gchar* key, gboolean use_default, gboolean* is_default, + gboolean* is_writable, GConfValue** valp) { CacheEntry* ce; @@ -1667,6 +1733,9 @@ gconf_client_lookup (GConfClient* client, *valp = ce->value; } + + if (is_writable) + *is_writable = ce->is_writable; return TRUE; } @@ -1680,7 +1749,8 @@ gconf_client_lookup (GConfClient* client, */ static CacheEntry* -cache_entry_new(GConfValue* val, gboolean is_default) +cache_entry_new(GConfValue* val, + gboolean is_default, gboolean is_writable) { CacheEntry* ce; @@ -1689,7 +1759,8 @@ cache_entry_new(GConfValue* val, gboolean is_default) /* val may be NULL */ ce->value = val; ce->is_default = is_default; - + ce->is_writable = is_writable; + return ce; } diff --git a/gconf/gconf-client.h b/gconf/gconf-client.h index 2b527928..5504b359 100644 --- a/gconf/gconf-client.h +++ b/gconf/gconf-client.h @@ -74,16 +74,22 @@ typedef struct _GConfClient GConfClient; typedef struct _GConfClientClass GConfClientClass; -typedef void (*GConfClientNotifyFunc)(GConfClient* client, guint cnxn_id, const gchar* key, GConfValue* value, gboolean is_default, gpointer user_data); +typedef void (*GConfClientNotifyFunc)(GConfClient* client, + guint cnxn_id, + GConfEntry *entry, + gpointer user_data); /* - * Return the parent window error dialogs should be associated with, or NULL for - * none. + * Return the parent window error dialogs should be associated with, + * or NULL for none. */ -typedef GtkWidget* (*GConfClientParentWindowFunc) (GConfClient* client, gpointer user_data); +typedef GtkWidget* (*GConfClientParentWindowFunc) (GConfClient* client, + gpointer user_data); -typedef void (*GConfClientErrorHandlerFunc) (GConfClient* client, GConfClientParentWindowFunc parent_func, gpointer parent_user_data, GError* error); +typedef void (*GConfClientErrorHandlerFunc) (GConfClient* client, + GConfClientParentWindowFunc parent_func, + gpointer parent_user_data, GError* error); #define GCONF_TYPE_CLIENT (gconf_client_get_type ()) #define GCONF_CLIENT(obj) (GTK_CHECK_CAST ((obj), GCONF_TYPE_CLIENT, GConfClient)) @@ -244,12 +250,11 @@ GConfValue* gconf_client_get_without_default (GConfClient* client, const gchar* key, GError** err); -/* Try not to use this function, it makes me nervous. */ -GConfValue* gconf_client_get_full (GConfClient* client, - const gchar* key, const gchar* locale, - gboolean use_schema_default, - gboolean* value_is_default, - GError** err); +GConfEntry* gconf_client_get_entry (GConfClient* client, + const gchar* key, + const gchar* locale, + gboolean use_schema_default, + GError** err); GConfValue* gconf_client_get_default_from_schema (GConfClient* client, const gchar* key, @@ -270,6 +275,10 @@ void gconf_client_suggest_sync (GConfClient* client, gboolean gconf_client_dir_exists (GConfClient* client, const gchar* dir, GError** err); +gboolean gconf_client_key_is_writable(GConfClient* client, + const gchar* key, + GError** err); + /* Get/Set convenience wrappers */ gdouble gconf_client_get_float (GConfClient* client, const gchar* key, diff --git a/gconf/gconf-database.c b/gconf/gconf-database.c index efc281ab..0b01aaf6 100644 --- a/gconf/gconf-database.c +++ b/gconf/gconf-database.c @@ -95,21 +95,26 @@ impl_ConfigDatabase_lookup_with_locale(PortableServer_Servant servant, const CORBA_char * locale, CORBA_boolean use_schema_default, CORBA_boolean * value_is_default, + CORBA_boolean * value_is_writable, CORBA_Environment * ev) { GConfDatabase *db = (GConfDatabase*) servant; GConfValue* val; GError* error = NULL; GConfLocaleList* locale_list; - gboolean is_default = FALSE; + gboolean is_default = FALSE; + gboolean is_writable = TRUE; locale_list = locale_cache_lookup(locale); val = gconf_database_query_value(db, key, locale_list->list, use_schema_default, - &is_default, &error); + &is_default, + &is_writable, + &error); *value_is_default = is_default; + *value_is_writable = is_writable; gconf_locale_list_unref(locale_list); @@ -137,7 +142,8 @@ impl_ConfigDatabase_lookup(PortableServer_Servant servant, CORBA_Environment * ev) { return impl_ConfigDatabase_lookup_with_locale (servant, key, - NULL, TRUE, NULL, ev); + NULL, TRUE, NULL, + NULL, ev); } static ConfigValue* @@ -155,6 +161,7 @@ impl_ConfigDatabase_lookup_default_value(PortableServer_Servant servant, val = gconf_database_query_default_value(db, key, locale_list->list, + NULL, &error); gconf_locale_list_unref(locale_list); @@ -276,6 +283,7 @@ impl_ConfigDatabase_all_entries(PortableServer_Servant servant, ConfigDatabase_KeyList ** keys, ConfigDatabase_ValueList ** values, ConfigDatabase_IsDefaultList ** is_defaults, + ConfigDatabase_IsWritableList ** is_writables, CORBA_Environment * ev) { GConfDatabase *db = (GConfDatabase*) servant; @@ -308,6 +316,11 @@ impl_ConfigDatabase_all_entries(PortableServer_Servant servant, (*is_defaults)->_buffer = CORBA_sequence_CORBA_boolean_allocbuf(n); (*is_defaults)->_length = n; (*is_defaults)->_maximum = n; + + *is_writables = ConfigDatabase_IsWritableList__alloc(); + (*is_writables)->_buffer = CORBA_sequence_CORBA_boolean_allocbuf(n); + (*is_writables)->_length = n; + (*is_writables)->_maximum = n; tmp = pairs; i = 0; @@ -322,6 +335,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_get_is_default(p); + (*is_writables)->_buffer[i] = gconf_entry_get_is_writable(p); gconf_entry_free(p); @@ -745,6 +759,7 @@ struct _ListenerNotifyClosure { GConfDatabase* db; const ConfigValue* value; gboolean is_default; + gboolean is_writable; GSList* dead; CORBA_Environment ev; }; @@ -765,6 +780,7 @@ notify_listeners_cb(GConfListeners* listeners, (gchar*)all_above_key, closure->value, closure->is_default, + closure->is_writable, &closure->ev); if(closure->ev._major != CORBA_NO_EXCEPTION) @@ -787,7 +803,8 @@ void gconf_database_notify_listeners (GConfDatabase *db, const gchar *key, const ConfigValue *value, - gboolean is_default) + gboolean is_default, + gboolean is_writable) { ListenerNotifyClosure closure; GSList* tmp; @@ -797,6 +814,7 @@ gconf_database_notify_listeners (GConfDatabase *db, closure.db = db; closure.value = value; closure.is_default = is_default; + closure.is_writable = is_writable; closure.dead = NULL; CORBA_exception_init(&closure.ev); @@ -821,6 +839,7 @@ gconf_database_query_value (GConfDatabase *db, const gchar **locales, gboolean use_schema_default, gboolean *value_is_default, + gboolean *value_is_writable, GError **err) { GConfValue* val; @@ -832,7 +851,9 @@ gconf_database_query_value (GConfDatabase *db, val = gconf_sources_query_value(db->sources, key, locales, use_schema_default, - value_is_default, err); + value_is_default, + value_is_writable, + err); if (err && *err != NULL) { gconf_log(GCL_ERR, _("Error getting value for `%s': %s"), @@ -846,6 +867,7 @@ GConfValue* gconf_database_query_default_value (GConfDatabase *db, const gchar *key, const gchar **locales, + gboolean *is_writable, GError **err) { g_return_val_if_fail(err == NULL || *err == NULL, NULL); @@ -853,7 +875,9 @@ gconf_database_query_default_value (GConfDatabase *db, db->last_access = time(NULL); - return gconf_sources_query_default_value(db->sources, key, locales, err); + return gconf_sources_query_default_value(db->sources, key, locales, + is_writable, + err); } void @@ -863,26 +887,36 @@ gconf_database_set (GConfDatabase *db, const ConfigValue *cvalue, GError **err) { + GError *error = NULL; + g_assert(db->listeners != NULL); g_return_if_fail(err == NULL || *err == NULL); db->last_access = time(NULL); - gconf_sources_set_value(db->sources, key, value, err); + gconf_sources_set_value(db->sources, key, value, &error); - if (err && *err != NULL) + if (error) { gconf_log(GCL_ERR, _("Error setting value for `%s': %s"), - key, (*err)->message); + key, error->message); + + g_propagate_error (err, error); + + return; } else { gconf_database_schedule_sync(db); - + gconf_database_notify_listeners(db, key, cvalue, /* Can't possibly be the default, - since we just set it */ - FALSE); + since we just set it, + and must be writable since + setting it succeeded. + */ + FALSE, + TRUE); } } @@ -908,7 +942,7 @@ gconf_database_unset (GConfDatabase *db, if (error != NULL) { gconf_log(GCL_ERR, _("Error unsetting `%s': %s"), - key, error->message); + key, error->message); if (err) *err = error; @@ -921,11 +955,13 @@ gconf_database_unset (GConfDatabase *db, { GConfValue* def_value; const gchar* locale_list[] = { locale, NULL }; - + gboolean is_writable = TRUE; + def_value = gconf_database_query_default_value(db, - key, - locale_list, - err); + key, + locale_list, + &is_writable, + err); if (err && *err) gconf_log(GCL_ERR, _("Error getting default value for `%s': %s"), @@ -942,7 +978,8 @@ gconf_database_unset (GConfDatabase *db, } gconf_database_schedule_sync(db); - gconf_database_notify_listeners(db, key, val, TRUE); + + gconf_database_notify_listeners(db, key, val, TRUE, is_writable); CORBA_free(val); } diff --git a/gconf/gconf-database.h b/gconf/gconf-database.h index e320a2be..5c24ae73 100644 --- a/gconf/gconf-database.h +++ b/gconf/gconf-database.h @@ -69,7 +69,8 @@ CORBA_unsigned_long gconf_database_readd_listener (GConfDatabase *db, void gconf_database_notify_listeners (GConfDatabase *db, const gchar *key, const ConfigValue *value, - gboolean is_default); + gboolean is_default, + gboolean is_writable); GConfValue* gconf_database_query_value (GConfDatabase *db, @@ -77,10 +78,12 @@ GConfValue* gconf_database_query_value (GConfDatabase *db, const gchar **locales, gboolean use_schema_default, gboolean *value_is_default, + gboolean *value_is_writable, GError **err); GConfValue* gconf_database_query_default_value (GConfDatabase *db, const gchar *key, const gchar **locales, + gboolean *is_writable, GError **err); diff --git a/gconf/gconf-engine.h b/gconf/gconf-engine.h index b9b02359..692d1155 100644 --- a/gconf/gconf-engine.h +++ b/gconf/gconf-engine.h @@ -43,6 +43,15 @@ void gconf_engine_ref (GConfEngine* conf); GConfEngine* gconf_engine_get_local (const gchar* address, GError** err); #endif +/* For use by language bindings only, will be deprecated in GNOME 2.0 + * when we can make GConfEngine a GObject + */ +void gconf_engine_set_user_data (GConfEngine *engine, + gpointer data, + GDestroyNotify dnotify); +gpointer gconf_engine_get_user_data (GConfEngine *engine); + + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gconf/gconf-error.c b/gconf/gconf-error.c index 518e1505..6c038b66 100644 --- a/gconf/gconf-error.c +++ b/gconf/gconf-error.c @@ -36,7 +36,8 @@ static const gchar* err_msgs[] = { N_("Can't overwrite existing read-only value"), N_("Object Activation Framework error"), N_("Operation not allowed without configuration server"), - N_("Failed to get a lock") + N_("Failed to get a lock"), + N_("No database available to save your configuration") }; static const int n_err_msgs = sizeof(err_msgs)/sizeof(err_msgs[0]); @@ -126,7 +127,7 @@ gconf_compose_errors (GError* err1, GError* err2) { GError *n; - n = g_error_new (GCONF_ERROR, GCONF_ERROR_FAILED, ""); + n = g_error_new (GCONF_ERROR, GCONF_ERROR_FAILED, " "); if (err1->code == err2->code) n->code = err1->code; diff --git a/gconf/gconf-error.h b/gconf/gconf-error.h index f530f378..7694418a 100644 --- a/gconf/gconf-error.h +++ b/gconf/gconf-error.h @@ -51,7 +51,8 @@ typedef enum { GCONF_ERROR_OVERRIDDEN = 11, /* Read-only source at front of path has set the value */ GCONF_ERROR_OAF_ERROR = 12, /* liboaf error */ GCONF_ERROR_LOCAL_ENGINE = 13, /* Tried to use remote operations on a local engine */ - GCONF_ERROR_LOCK_FAILED = 14 /* Failed to get a lockfile */ + GCONF_ERROR_LOCK_FAILED = 14, /* Failed to get a lockfile */ + GCONF_ERROR_NO_WRITABLE_DATABASE = 14 /* nowhere to write a value */ } GConfError; GQuark gconf_error_quark (void); diff --git a/gconf/gconf-glib-public.h b/gconf/gconf-glib-public.h index dec89e47..5788896e 100644 --- a/gconf/gconf-glib-public.h +++ b/gconf/gconf-glib-public.h @@ -63,6 +63,12 @@ void g_set_error (GError **err, /* if (err && *err) { g_error_free(*err); *err = NULL; } */ void g_clear_error (GError **err); +/* if (dest) *dest = src; also has some sanity checks. + */ +void g_propagate_error (GError **dest, + GError *src); + + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gconf/gconf-glib.c b/gconf/gconf-glib.c index bd651643..9de53912 100644 --- a/gconf/gconf-glib.c +++ b/gconf/gconf-glib.c @@ -160,6 +160,32 @@ g_set_error (GError **err, va_end (args); } +#define ERROR_OVERWRITTEN_WARNING "GError set over the top of a previous GError or uninitialized memory.\n" \ + "This indicates a bug in someone's code. You must ensure an error is NULL before it's set." + +/** + * g_propagate_error: + * @dest: error return location + * @src: error to move into the return location + * + * Does nothing if @dest is NULL; otherwise, + * moves @src into *@dest. *@dest must be NULL. + **/ +void +g_propagate_error (GError **dest, + GError *src) +{ + g_return_if_fail (src != NULL); + + if (dest == NULL) + return; + + if (*dest != NULL) + g_warning (ERROR_OVERWRITTEN_WARNING); + + *dest = src; +} + void g_clear_error (GError **err) { @@ -170,6 +196,8 @@ g_clear_error (GError **err) } } + + /**********************************************************/ diff --git a/gconf/gconf-sources.c b/gconf/gconf-sources.c index e4f52783..d4f80ca5 100644 --- a/gconf/gconf-sources.c +++ b/gconf/gconf-sources.c @@ -22,6 +22,7 @@ #include "gconf-sources.h" #include "gconf-internals.h" #include "gconf-schema.h" +#include "gconf.h" #include <string.h> #include <sys/stat.h> #include <sys/types.h> @@ -182,6 +183,7 @@ gconf_source_unset_value (GConfSource* source, if ( source_is_writable(source, key, err) ) { g_return_val_if_fail(err == NULL || *err == NULL, FALSE); + (*source->backend->vtable->unset_value)(source, key, locale, err); return TRUE; } @@ -384,6 +386,7 @@ gconf_sources_query_value (GConfSources* sources, const gchar** locales, gboolean use_schema_default, gboolean* value_is_default, + gboolean* value_is_writable, GError** err) { GList* tmp; @@ -393,12 +396,21 @@ gconf_sources_query_value (GConfSources* sources, g_return_val_if_fail(sources != NULL, NULL); g_return_val_if_fail(key != NULL, NULL); g_return_val_if_fail((err == NULL) || (*err == NULL), NULL); + + /* A value is writable if it is unset and a writable source exists, + * or if it's set and the setting is within or after a writable source. + * So basically if we see a writable source before we get the value, + * or get the value from a writable source, the value is writable. + */ if (!gconf_key_check(key, err)) return NULL; if (value_is_default) *value_is_default = FALSE; + + if (value_is_writable) + *value_is_writable = FALSE; tmp = sources->sources; @@ -415,6 +427,9 @@ gconf_sources_query_value (GConfSources* sources, schema_name_retloc = NULL; source = tmp->data; + + if (source_is_writable (source, key, NULL)) /* ignore errors */ + *value_is_writable = TRUE; val = gconf_source_query_value(source, key, locales, schema_name_retloc, &error); @@ -471,7 +486,7 @@ gconf_sources_query_value (GConfSources* sources, /* We do look for a schema describing the schema, just for funnies */ val = gconf_sources_query_value(sources, schema_name, locales, - TRUE, NULL, &error); + TRUE, NULL, NULL, &error); if (error != NULL) { @@ -572,6 +587,13 @@ gconf_sources_set_value (GConfSources* sources, tmp = g_list_next(tmp); } + + /* If we arrived here, then there was nowhere to write a value */ + g_set_error (err, + GCONF_ERROR, + GCONF_ERROR_NO_WRITABLE_DATABASE, + _("Unable to store a value at key '%s'"), + key); } void @@ -766,6 +788,7 @@ hash_lookup_defaults_func(gpointer key, gpointer value, gpointer user_data) locales, TRUE, NULL, + NULL, NULL); if (val != NULL && @@ -786,6 +809,37 @@ hash_lookup_defaults_func(gpointer key, gpointer value, gpointer user_data) } +static gboolean +key_is_writable (GConfSources *sources, + GConfSource *value_in_src, + const gchar *key, + GError **err) +{ + GList *tmp; + + tmp = sources->sources; + + while (tmp != NULL) + { + GConfSource* src; + + src = tmp->data; + + if (source_is_writable (src, key, NULL)) + return TRUE; + + if (src == value_in_src) + return FALSE; /* didn't find a writable source before value-containing + source. + */ + + tmp = g_list_next (tmp); + } + + /* This shouldn't be reached actually */ + return FALSE; +} + GSList* gconf_sources_all_entries (GConfSources* sources, const gchar* dir, @@ -839,13 +893,15 @@ gconf_sources_all_entries (GConfSources* sources, } } - /* Iterate over the list of entries, stuffing them - in the hash if they're new */ + /* Iterate over the list of entries, stuffing them in the hash + and setting their writability flag if they're new + */ while (iter != NULL) { GConfEntry* pair = iter->data; GConfEntry* previous; + gchar *full; if (first_pass) previous = NULL; /* Can't possibly be there. */ @@ -858,9 +914,24 @@ gconf_sources_all_entries (GConfSources* sources, /* Discard this latest one */ ; else - /* Save the new value, previously we had an entry but no value */ - gconf_entry_set_value_nocopy(previous, - gconf_entry_steal_value(pair)); + { + /* Save the new value, previously we had an entry but no value */ + gconf_entry_set_value_nocopy(previous, + gconf_entry_steal_value(pair)); + + /* As an efficiency hack, remember that + * entry->key is relative not absolute on the + * gconfd side + */ + full = gconf_concat_dir_and_key (dir, previous->key); + + previous->is_writable = key_is_writable (sources, + src, + full, + NULL); + + g_free (full); + } gconf_entry_free(pair); } @@ -868,6 +939,19 @@ gconf_sources_all_entries (GConfSources* sources, { /* Save */ g_hash_table_insert(hash, pair->key, pair); + + /* As an efficiency hack, remember that + * entry->key is relative not absolute on the + * gconfd side + */ + full = gconf_concat_dir_and_key (dir, pair->key); + + previous->is_writable = key_is_writable (sources, + src, + full, + NULL); + + g_free (full); } iter = g_slist_next(iter); @@ -888,7 +972,7 @@ gconf_sources_all_entries (GConfSources* sources, g_hash_table_foreach(hash, hash_listify_func, &flattened); g_hash_table_destroy(hash); - + return flattened; } @@ -1107,6 +1191,7 @@ GConfValue* gconf_sources_query_default_value(GConfSources* sources, const gchar* key, const gchar** locales, + gboolean* is_writable, GError** err) { GError* error = NULL; @@ -1114,6 +1199,9 @@ gconf_sources_query_default_value(GConfSources* sources, GConfMetaInfo* mi; g_return_val_if_fail(err == NULL || *err == NULL, NULL); + + if (is_writable) + *is_writable = key_is_writable (sources, NULL, key, NULL); mi = gconf_sources_query_metainfo(sources, key, &error); @@ -1140,7 +1228,7 @@ gconf_sources_query_default_value(GConfSources* sources, val = gconf_sources_query_value(sources, gconf_meta_info_get_schema(mi), locales, - TRUE, NULL, &error); + TRUE, NULL, NULL, &error); if (val != NULL) { diff --git a/gconf/gconf-sources.h b/gconf/gconf-sources.h index 2f07a286..d090f151 100644 --- a/gconf/gconf-sources.h +++ b/gconf/gconf-sources.h @@ -76,6 +76,7 @@ GConfValue* gconf_sources_query_value (GConfSources *sources, const gchar **locales, gboolean use_schema_default, gboolean *value_is_default, + gboolean *value_is_writable, GError **err); void gconf_sources_set_value (GConfSources *sources, const gchar *key, @@ -113,6 +114,7 @@ GConfMetaInfo*gconf_sources_query_metainfo (GConfSources* sources, GConfValue* gconf_sources_query_default_value(GConfSources* sources, const gchar* key, const gchar** locales, + gboolean* is_writable, GError** err); #endif diff --git a/gconf/gconf-value.c b/gconf/gconf-value.c index 692c8821..f5f42ff6 100644 --- a/gconf/gconf-value.c +++ b/gconf/gconf-value.c @@ -975,6 +975,7 @@ gconf_entry_new_nocopy(gchar* key, GConfValue* val) pair->value = val; pair->schema_name = NULL; pair->is_default = FALSE; + pair->is_writable = TRUE; return pair; } diff --git a/gconf/gconf-value.h b/gconf/gconf-value.h index 0b75ca5f..a38d8cfe 100644 --- a/gconf/gconf-value.h +++ b/gconf/gconf-value.h @@ -154,13 +154,15 @@ struct _GConfEntry { gchar* key; GConfValue* value; gchar* schema_name; - gboolean is_default; + guint is_default : 1; + guint is_writable : 1; }; #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) +#define gconf_entry_get_is_writable(x) ((x)->is_writable) GConfEntry* gconf_entry_new (const gchar *key, GConfValue *val); diff --git a/gconf/gconf.c b/gconf/gconf.c index 26ce15dc..a2b44949 100644 --- a/gconf/gconf.c +++ b/gconf/gconf.c @@ -77,6 +77,9 @@ struct _GConfEngine { */ gchar *address; + gpointer user_data; + GDestroyNotify dnotify; + guint is_default : 1; /* If TRUE, this is a local engine (and therefore @@ -105,9 +108,7 @@ static GConfCnxn* gconf_cnxn_new (GConfEngine *conf, gpointer user_data); static void gconf_cnxn_destroy (GConfCnxn *cnxn); static void gconf_cnxn_notify (GConfCnxn *cnxn, - const gchar *key, - GConfValue *value, - gboolean is_default); + GConfEntry *entry); static ConfigServer gconf_get_config_server (gboolean start_if_not_found, @@ -504,6 +505,11 @@ gconf_engine_unref (GConfEngine* conf) g_slist_free(removed); + if (conf->dnotify) + { + (* conf->dnotify) (conf->user_data); + } + /* do this after removing the notifications, to avoid funky race conditions */ if (conf->address) @@ -519,12 +525,32 @@ gconf_engine_unref (GConfEngine* conf) } } +void +gconf_engine_set_user_data (GConfEngine *engine, + gpointer data, + GDestroyNotify dnotify) +{ + if (engine->dnotify) + { + (* engine->dnotify) (engine->user_data); + } + + engine->dnotify = dnotify; + engine->user_data = data; +} + +gpointer +gconf_engine_get_user_data (GConfEngine *engine) +{ + return engine->user_data; +} + guint gconf_engine_notify_add(GConfEngine* conf, - const gchar* namespace_section, /* dir or key to listen to */ - GConfNotifyFunc func, - gpointer user_data, - GError** err) + const gchar* namespace_section, + GConfNotifyFunc func, + gpointer user_data, + GError** err) { ConfigDatabase db; ConfigListener cl; @@ -636,12 +662,14 @@ gconf_engine_notify_remove(GConfEngine* conf, gconf_cnxn_destroy(gcnxn); } -GConfValue* -gconf_engine_get_full(GConfEngine* conf, - const gchar* key, const gchar* locale, - gboolean use_schema_default, - gboolean* value_is_default, - GError** err) +GConfValue * +gconf_engine_get_full (GConfEngine *conf, + const gchar *key, + const gchar *locale, + gboolean use_schema_default, + gboolean *is_default_p, + gboolean *is_writable_p, + GError **err) { GConfValue* val; ConfigValue* cv; @@ -649,7 +677,8 @@ gconf_engine_get_full(GConfEngine* conf, ConfigDatabase db; gint tries = 0; CORBA_boolean is_default = FALSE; - + CORBA_boolean is_writable = TRUE; + g_return_val_if_fail(conf != NULL, NULL); g_return_val_if_fail(key != NULL, NULL); g_return_val_if_fail(err == NULL || *err == NULL, NULL); @@ -660,19 +689,29 @@ gconf_engine_get_full(GConfEngine* conf, if (gconf_engine_is_local(conf)) { gchar** locale_list; - + gboolean tmp_is_default = FALSE; + gboolean tmp_is_writable = TRUE; + locale_list = gconf_split_locale(locale); val = gconf_sources_query_value(conf->local_sources, key, (const gchar**)locale_list, use_schema_default, - value_is_default, + &tmp_is_default, + &tmp_is_writable, err); if (locale_list != NULL) g_strfreev(locale_list); + + if (is_default_p) + *is_default_p = tmp_is_default; + + if (is_writable_p) + *is_writable_p = tmp_is_writable; + return val; } @@ -696,11 +735,10 @@ gconf_engine_get_full(GConfEngine* conf, (locale ? locale : gconf_current_locale()), use_schema_default, &is_default, + &is_writable, &ev); - - if (value_is_default) - *value_is_default = !!is_default; /* canonicalize */ - + + if (gconf_server_broken(&ev)) { if (tries < MAX_RETRIES) @@ -722,9 +760,45 @@ gconf_engine_get_full(GConfEngine* conf, val = gconf_value_from_corba_value(cv); CORBA_free(cv); + if (is_default_p) + *is_default_p = !!is_default; + if (is_writable_p) + *is_writable_p = !!is_writable; + return val; } } + +GConfEntry* +gconf_engine_get_entry(GConfEngine* conf, + const gchar* key, + const gchar* locale, + gboolean use_schema_default, + GError** err) +{ + gboolean is_writable = TRUE; + gboolean is_default = FALSE; + GConfValue *val; + GError *error; + GConfEntry *entry; + + error = NULL; + val = gconf_engine_get_full (conf, key, locale, use_schema_default, + &is_default, &is_writable, &error); + if (error != NULL) + { + g_propagate_error (err, error); + return NULL; + } + + entry = gconf_entry_new_nocopy (g_strdup (key), + val); + + entry->is_default = is_default; + entry->is_writable = is_writable; + + return entry; +} GConfValue* gconf_engine_get (GConfEngine* conf, const gchar* key, GError** err) @@ -733,22 +807,25 @@ gconf_engine_get (GConfEngine* conf, const gchar* key, GError** err) } GConfValue* -gconf_engine_get_with_locale(GConfEngine* conf, const gchar* key, const gchar* locale, - GError** err) +gconf_engine_get_with_locale(GConfEngine* conf, const gchar* key, + const gchar* locale, + GError** err) { - return gconf_engine_get_full(conf, key, locale, TRUE, NULL, err); + return gconf_engine_get_full(conf, key, locale, TRUE, + NULL, NULL, err); } GConfValue* -gconf_engine_get_without_default(GConfEngine* conf, const gchar* key, GError** err) +gconf_engine_get_without_default(GConfEngine* conf, const gchar* key, + GError** err) { - return gconf_engine_get_full(conf, key, NULL, FALSE, NULL, err); + return gconf_engine_get_full(conf, key, NULL, FALSE, NULL, NULL, err); } GConfValue* gconf_engine_get_default_from_schema (GConfEngine* conf, - const gchar* key, - GError** err) + const gchar* key, + GError** err) { GConfValue* val; ConfigValue* cv; @@ -772,6 +849,7 @@ gconf_engine_get_default_from_schema (GConfEngine* conf, val = gconf_sources_query_default_value(conf->local_sources, key, (const gchar**)locale_list, + NULL, err); if (locale_list != NULL) @@ -1085,6 +1163,7 @@ gconf_engine_all_entries(GConfEngine* conf, const gchar* dir, GError** err) ConfigDatabase_ValueList* values; ConfigDatabase_KeyList* keys; ConfigDatabase_IsDefaultList* is_defaults; + ConfigDatabase_IsWritableList* is_writables; CORBA_Environment ev; ConfigDatabase db; guint i; @@ -1151,7 +1230,7 @@ gconf_engine_all_entries(GConfEngine* conf, const gchar* dir, GError** err) ConfigDatabase_all_entries(db, (gchar*)dir, (gchar*)gconf_current_locale(), - &keys, &values, &is_defaults, + &keys, &values, &is_defaults, &is_writables, &ev); if (gconf_server_broken(&ev)) @@ -1187,6 +1266,7 @@ gconf_engine_all_entries(GConfEngine* conf, const gchar* dir, GError** err) /* note, there's an accesor function for setting this that we are cheating and not using */ pair->is_default = is_defaults->_buffer[i]; + pair->is_writable = is_writables->_buffer[i]; pairs = g_slist_prepend(pairs, pair); @@ -1196,7 +1276,8 @@ gconf_engine_all_entries(GConfEngine* conf, const gchar* dir, GError** err) CORBA_free(keys); CORBA_free(values); CORBA_free(is_defaults); - + CORBA_free(is_writables); + return pairs; } @@ -1542,6 +1623,16 @@ gconf_engine_dir_exists(GConfEngine *conf, const gchar *dir, GError** err) return (server_ret == CORBA_TRUE); } +gboolean +gconf_engine_key_is_writable (GConfEngine *conf, + const gchar *key, + GError **err) +{ + /* FIXME */ + + return TRUE; +} + /* * Connection maintenance */ @@ -1579,12 +1670,11 @@ gconf_cnxn_destroy(GConfCnxn* cnxn) static void gconf_cnxn_notify(GConfCnxn* cnxn, - const gchar* key, - GConfValue* value, - gboolean is_default) + GConfEntry *entry) { - (*cnxn->func)(cnxn->conf, cnxn->client_id, key, value, - is_default, cnxn->user_data); + (*cnxn->func)(cnxn->conf, cnxn->client_id, + entry, + cnxn->user_data); } /* @@ -1691,6 +1781,7 @@ static void notify (PortableServer_Servant servant, const CORBA_char *key, const ConfigValue *value, CORBA_boolean is_default, + CORBA_boolean is_writable, CORBA_Environment *ev); static void ping (PortableServer_Servant _servant, CORBA_Environment *ev); @@ -1719,12 +1810,14 @@ notify(PortableServer_Servant servant, const CORBA_char* key, const ConfigValue* value, CORBA_boolean is_default, + CORBA_boolean is_writable, CORBA_Environment *ev) { GConfCnxn* cnxn; GConfValue* gvalue; GConfEngine* conf; - + GConfEntry* entry; + conf = lookup_engine_by_database (db); if (conf == NULL) @@ -1748,10 +1841,14 @@ notify(PortableServer_Servant servant, gvalue = gconf_value_from_corba_value(value); - gconf_cnxn_notify(cnxn, key, gvalue, is_default); + entry = gconf_entry_new_nocopy (g_strdup (key), + gvalue); + entry->is_default = is_default; + entry->is_writable = is_writable; + + gconf_cnxn_notify(cnxn, entry); - if (gvalue != NULL) - gconf_value_free(gvalue); + gconf_entry_free (entry); } static void diff --git a/gconf/gconf.h b/gconf/gconf.h index 9aed04d0..758198db 100644 --- a/gconf/gconf.h +++ b/gconf/gconf.h @@ -34,9 +34,7 @@ gboolean gconf_is_initialized (void); typedef void (*GConfNotifyFunc) (GConfEngine* conf, guint cnxn_id, - const gchar* key, - GConfValue* value, - gboolean is_default, + GConfEntry *entry, gpointer user_data); /* Returns ID of the notification */ @@ -62,12 +60,11 @@ GConfValue* gconf_engine_get_without_default (GConfEngine *conf, const gchar *key, GError **err); -GConfValue* gconf_engine_get_full (GConfEngine *conf, - const gchar *key, - const gchar *locale, - gboolean use_schema_default, - gboolean *value_is_default, - GError **err); +GConfEntry* gconf_engine_get_entry (GConfEngine *conf, + const gchar *key, + const gchar *locale, + gboolean use_schema_default, + GError **err); /* Locale only matters if you are expecting to get a schema, or if you @@ -114,6 +111,9 @@ gboolean gconf_engine_dir_exists (GConfEngine *conf, const gchar *dir, GError **err); +gboolean gconf_engine_key_is_writable (GConfEngine *conf, + const gchar *key, + GError **err); /* if you pass non-NULL for why_invalid, it gives a user-readable explanation of the problem in g_malloc()'d memory @@ -278,6 +278,15 @@ extern struct poptOption gconf_options[]; void gconf_clear_cache(GConfEngine* conf, GError** err); void gconf_synchronous_sync(GConfEngine* conf, GError** err); + +GConfValue * gconf_engine_get_full (GConfEngine *conf, + const gchar *key, + const gchar *locale, + gboolean use_schema_default, + gboolean *is_default_p, + gboolean *is_writable_p, + GError **err); + #endif #ifdef __cplusplus diff --git a/gconf/testgconfclient.c b/gconf/testgconfclient.c index c1404b02..c6fb0a6f 100644 --- a/gconf/testgconfclient.c +++ b/gconf/testgconfclient.c @@ -55,14 +55,17 @@ main(int argc, char** argv) } static void -entry_notify_func(GConfClient* client, guint cnxn_id, const gchar* key, GConfValue* value, gboolean is_default, gpointer user_data) +entry_notify_func(GConfClient* client, guint cnxn_id, + GConfEntry *gconf_entry, + gpointer user_data) { GtkWidget* entry = user_data; 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_get_string(value)); + gtk_entry_set_text(GTK_ENTRY(entry), + gconf_value_get_string(gconf_entry->value)); gtk_signal_handler_unblock_by_data(GTK_OBJECT(entry), client); } diff --git a/wrappers/gtk/gconf-client.c b/wrappers/gtk/gconf-client.c index 31397745..5414a65e 100644 --- a/wrappers/gtk/gconf-client.c +++ b/wrappers/gtk/gconf-client.c @@ -24,20 +24,6 @@ #include <gtk/gtktypeutils.h> #include <gconf/gconf-internals.h> -/* Quick hack so I can mark strings */ - -#ifdef _ -#warning "_ already defined" -#else -#define _(x) x -#endif - -#ifdef N_ -#warning "N_ already defined" -#else -#define N_(x) x -#endif - /* * Error handler override */ @@ -61,10 +47,13 @@ struct _CacheEntry { /* Whether "value" was a default from a schema; i.e. if this is TRUE, then value wasn't set, we just used a default. */ - gboolean is_default; + guint is_default : 1; + guint is_writable : 1; }; -static CacheEntry* cache_entry_new(GConfValue* val, gboolean is_default); +static CacheEntry* cache_entry_new(GConfValue* val, + gboolean is_default, + gboolean is_writable); static void cache_entry_destroy(CacheEntry* ce); /* @@ -127,12 +116,14 @@ static void gconf_client_finalize (GtkObject* object); static void gconf_client_cache (GConfClient* client, const gchar* key, gboolean is_default, + gboolean is_writable, GConfValue* value); /* takes ownership of value */ static gboolean gconf_client_lookup (GConfClient* client, const gchar* key, gboolean use_default, gboolean* is_default, + gboolean* is_writable, GConfValue** valp); static void gconf_client_real_remove_dir (GConfClient* client, @@ -346,8 +337,7 @@ handle_error(GConfClient* client, GError* error, GError** err) struct client_and_val { GConfClient* client; - GConfValue* val; - gboolean is_default; + GConfEntry* entry; }; static void @@ -366,13 +356,12 @@ notify_listeners_callback(GConfListeners* listeners, g_return_if_fail(l != NULL); g_return_if_fail(l->func != NULL); - (*l->func)(cav->client, cnxn_id, key, cav->val, cav->is_default, l->data); + (*l->func)(cav->client, cnxn_id, cav->entry, l->data); } static void notify_from_server_callback(GConfEngine* conf, guint cnxn_id, - const gchar* key, GConfValue* value, - gboolean is_default, + GConfEntry *entry, gpointer user_data) { GConfClient* client = user_data; @@ -386,14 +375,17 @@ notify_from_server_callback(GConfEngine* conf, guint cnxn_id, * We know this key is under a directory in our dir list. */ gconf_client_cache(client, - key, - is_default, - value ? gconf_value_copy(value) : NULL); + entry->key, + entry->is_default, + entry->is_writable, + entry->value ? gconf_value_copy(entry->value) : NULL); /* Emit the value_changed signal before notifying specific listeners; * I'm not sure there's a reason this matters though */ - gconf_client_value_changed(client, key, value); + gconf_client_value_changed(client, + entry->key, + entry->value); /* Now notify our listeners, if any */ if (client->listeners != NULL) @@ -401,11 +393,10 @@ notify_from_server_callback(GConfEngine* conf, guint cnxn_id, struct client_and_val cav; cav.client = client; - cav.val = value; - cav.is_default = is_default; + cav.entry = entry; gconf_listeners_notify(client->listeners, - key, + entry->key, notify_listeners_callback, &cav); } @@ -826,6 +817,7 @@ cache_pairs_in_dir(GConfClient* client, const gchar* dir) gconf_client_cache(client, gconf_entry_get_key (pair), gconf_entry_get_is_default(pair), + gconf_entry_get_is_writable(pair), gconf_entry_steal_value(pair)); gconf_entry_free(pair); @@ -976,6 +968,15 @@ gconf_client_dir_exists (GConfClient* client, return retval; } +gboolean +gconf_client_key_is_writable(GConfClient* client, + const gchar* key, + GError** err) +{ + /* FIXME */ + return TRUE; +} + static gboolean check_type(const gchar* key, GConfValue* val, GConfValueType t, GError** err) { @@ -994,11 +995,14 @@ check_type(const gchar* key, GConfValue* val, GConfValueType t, GError** err) static GConfValue* get(GConfClient* client, const gchar* key, - gboolean use_default, gboolean* is_default_retloc, + gboolean use_default, + gboolean* is_default_retloc, + gboolean *is_writable_retloc, GError** error) { GConfValue* val = NULL; gboolean is_default = FALSE; + gboolean is_writable = TRUE; g_return_val_if_fail(client != NULL, NULL); g_return_val_if_fail(GCONF_IS_CLIENT(client), NULL); @@ -1006,11 +1010,17 @@ get(GConfClient* client, const gchar* key, g_return_val_if_fail(*error == NULL, NULL); /* Check our client-side cache */ - if (gconf_client_lookup(client, key, use_default, &is_default, &val)) + if (gconf_client_lookup(client, key, use_default, + &is_default, + &is_writable, + &val)) { if (is_default_retloc) *is_default_retloc = is_default; - + + if (is_writable_retloc) + *is_writable_retloc = is_writable; + /* stored in cache, not necessarily set though, so check NULL */ return val ? gconf_value_copy(val) : NULL; } @@ -1018,11 +1028,16 @@ get(GConfClient* client, const gchar* key, g_assert(val == NULL); /* if it was in the cache we should have returned */ /* Check the GConfEngine */ - val = gconf_engine_get_full(client->engine, key, gconf_current_locale(), - use_default, &is_default, error); + val = gconf_engine_get_full(client->engine, key, + gconf_current_locale(), + use_default, &is_default, &is_writable, + error); if (is_default_retloc) *is_default_retloc = is_default; + + if (is_writable_retloc) + *is_writable_retloc = is_writable; if (*error != NULL) { @@ -1045,7 +1060,7 @@ get(GConfClient* client, const gchar* key, if (g_hash_table_lookup(client->dir_hash, parent) != NULL) { /* note that we cache a _copy_ */ - gconf_client_cache(client, key, is_default, + gconf_client_cache(client, key, is_default, is_writable, val ? gconf_value_copy(val) : NULL); break; } @@ -1059,29 +1074,74 @@ get(GConfClient* client, const gchar* key, } } -GConfValue* + +static GConfValue* gconf_client_get_full (GConfClient* client, const gchar* key, const gchar* locale, gboolean use_schema_default, gboolean* value_is_default, + gboolean* value_is_writable, GError** err) { GError* error = NULL; GConfValue* val = NULL; + gboolean is_default = FALSE; + gboolean is_writable = TRUE; + + g_return_val_if_fail(err == NULL || *err == NULL, NULL); + + if (locale != NULL) + g_warning("haven't implemented getting a specific locale in GConfClient"); + + val = get(client, key, use_schema_default, + &is_default, &is_writable, &error); + if (val == NULL && error != NULL) + handle_error(client, error, err); + else + g_assert(error == NULL); + + + if (value_is_default) + *value_is_default = is_default; + + if (value_is_writable) + *value_is_writable = is_writable; + + return val; +} + +GConfEntry* +gconf_client_get_entry (GConfClient* client, + const gchar* key, + const gchar* locale, + gboolean use_schema_default, + GError** err) +{ + GError* error = NULL; + GConfValue* val = NULL; + gboolean is_default = FALSE; + gboolean is_writable = TRUE; + GConfEntry *entry; + g_return_val_if_fail(err == NULL || *err == NULL, NULL); if (locale != NULL) g_warning("haven't implemented getting a specific locale in GConfClient"); - val = get(client, key, use_schema_default, value_is_default, &error); + val = get(client, key, use_schema_default, + &is_default, &is_writable, &error); if (val == NULL && error != NULL) handle_error(client, error, err); else g_assert(error == NULL); + + entry = gconf_entry_new_nocopy (g_strdup (key), val); + entry->is_default = is_default; + entry->is_writable = is_writable; - return val; + return entry; } GConfValue* @@ -1089,7 +1149,7 @@ gconf_client_get (GConfClient* client, const gchar* key, GError** err) { - return gconf_client_get_full(client, key, NULL, TRUE, NULL, err); + return gconf_client_get_full(client, key, NULL, TRUE, NULL, NULL, err); } GConfValue* @@ -1097,7 +1157,7 @@ gconf_client_get_without_default (GConfClient* client, const gchar* key, GError** err) { - return gconf_client_get_full(client, key, NULL, FALSE, NULL, err); + return gconf_client_get_full(client, key, NULL, FALSE, NULL, NULL, err); } GConfValue* @@ -1116,7 +1176,10 @@ gconf_client_get_default_from_schema (GConfClient* client, /* Check our client-side cache to see if the default is the same as the regular value (FIXME put a default_value field in the CacheEntry and store both, lose the is_default flag in CacheEntry) */ - if (gconf_client_lookup(client, key, TRUE, &is_default, &val)) + if (gconf_client_lookup(client, key, TRUE, + &is_default, + NULL, + &val)) { if (is_default) return val ? gconf_value_copy(val) : NULL; @@ -1124,7 +1187,7 @@ gconf_client_get_default_from_schema (GConfClient* client, /* Check the GConfEngine */ val = gconf_engine_get_default_from_schema(client->engine, key, - &error); + &error); if (error != NULL) { @@ -1150,7 +1213,7 @@ gconf_client_get_float (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, 0.0); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1185,7 +1248,7 @@ gconf_client_get_int (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, 0); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1220,7 +1283,7 @@ gconf_client_get_string(GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, NULL); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1263,7 +1326,7 @@ gconf_client_get_bool (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, FALSE); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1297,7 +1360,7 @@ gconf_client_get_schema (GConfClient* client, g_return_val_if_fail(err == NULL || *err == NULL, NULL); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1335,7 +1398,7 @@ gconf_client_get_list (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, NULL); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1374,7 +1437,7 @@ gconf_client_get_pair (GConfClient* client, const gchar* key, g_return_val_if_fail(err == NULL || *err == NULL, FALSE); - val = get(client, key, TRUE, NULL, &error); + val = get(client, key, TRUE, NULL, NULL, &error); if (val != NULL) { @@ -1609,6 +1672,7 @@ static void gconf_client_cache (GConfClient* client, const gchar* key, gboolean is_default, + gboolean is_writable, GConfValue* value) { /* Remember: value may be NULL */ @@ -1627,11 +1691,12 @@ gconf_client_cache (GConfClient* client, ce->value = value; ce->is_default = is_default; + ce->is_writable = is_writable; } else { /* Create a new entry */ - CacheEntry* ce = cache_entry_new(value, is_default); + CacheEntry* ce = cache_entry_new(value, is_default, is_writable); g_hash_table_insert(client->cache_hash, g_strdup(key), ce); } } @@ -1641,6 +1706,7 @@ gconf_client_lookup (GConfClient* client, const gchar* key, gboolean use_default, gboolean* is_default, + gboolean* is_writable, GConfValue** valp) { CacheEntry* ce; @@ -1667,6 +1733,9 @@ gconf_client_lookup (GConfClient* client, *valp = ce->value; } + + if (is_writable) + *is_writable = ce->is_writable; return TRUE; } @@ -1680,7 +1749,8 @@ gconf_client_lookup (GConfClient* client, */ static CacheEntry* -cache_entry_new(GConfValue* val, gboolean is_default) +cache_entry_new(GConfValue* val, + gboolean is_default, gboolean is_writable) { CacheEntry* ce; @@ -1689,7 +1759,8 @@ cache_entry_new(GConfValue* val, gboolean is_default) /* val may be NULL */ ce->value = val; ce->is_default = is_default; - + ce->is_writable = is_writable; + return ce; } diff --git a/wrappers/gtk/gconf-client.h b/wrappers/gtk/gconf-client.h index 2b527928..5504b359 100644 --- a/wrappers/gtk/gconf-client.h +++ b/wrappers/gtk/gconf-client.h @@ -74,16 +74,22 @@ typedef struct _GConfClient GConfClient; typedef struct _GConfClientClass GConfClientClass; -typedef void (*GConfClientNotifyFunc)(GConfClient* client, guint cnxn_id, const gchar* key, GConfValue* value, gboolean is_default, gpointer user_data); +typedef void (*GConfClientNotifyFunc)(GConfClient* client, + guint cnxn_id, + GConfEntry *entry, + gpointer user_data); /* - * Return the parent window error dialogs should be associated with, or NULL for - * none. + * Return the parent window error dialogs should be associated with, + * or NULL for none. */ -typedef GtkWidget* (*GConfClientParentWindowFunc) (GConfClient* client, gpointer user_data); +typedef GtkWidget* (*GConfClientParentWindowFunc) (GConfClient* client, + gpointer user_data); -typedef void (*GConfClientErrorHandlerFunc) (GConfClient* client, GConfClientParentWindowFunc parent_func, gpointer parent_user_data, GError* error); +typedef void (*GConfClientErrorHandlerFunc) (GConfClient* client, + GConfClientParentWindowFunc parent_func, + gpointer parent_user_data, GError* error); #define GCONF_TYPE_CLIENT (gconf_client_get_type ()) #define GCONF_CLIENT(obj) (GTK_CHECK_CAST ((obj), GCONF_TYPE_CLIENT, GConfClient)) @@ -244,12 +250,11 @@ GConfValue* gconf_client_get_without_default (GConfClient* client, const gchar* key, GError** err); -/* Try not to use this function, it makes me nervous. */ -GConfValue* gconf_client_get_full (GConfClient* client, - const gchar* key, const gchar* locale, - gboolean use_schema_default, - gboolean* value_is_default, - GError** err); +GConfEntry* gconf_client_get_entry (GConfClient* client, + const gchar* key, + const gchar* locale, + gboolean use_schema_default, + GError** err); GConfValue* gconf_client_get_default_from_schema (GConfClient* client, const gchar* key, @@ -270,6 +275,10 @@ void gconf_client_suggest_sync (GConfClient* client, gboolean gconf_client_dir_exists (GConfClient* client, const gchar* dir, GError** err); +gboolean gconf_client_key_is_writable(GConfClient* client, + const gchar* key, + GError** err); + /* Get/Set convenience wrappers */ gdouble gconf_client_get_float (GConfClient* client, const gchar* key, diff --git a/wrappers/gtk/testgconfclient.c b/wrappers/gtk/testgconfclient.c index c1404b02..c6fb0a6f 100644 --- a/wrappers/gtk/testgconfclient.c +++ b/wrappers/gtk/testgconfclient.c @@ -55,14 +55,17 @@ main(int argc, char** argv) } static void -entry_notify_func(GConfClient* client, guint cnxn_id, const gchar* key, GConfValue* value, gboolean is_default, gpointer user_data) +entry_notify_func(GConfClient* client, guint cnxn_id, + GConfEntry *gconf_entry, + gpointer user_data) { GtkWidget* entry = user_data; 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_get_string(value)); + gtk_entry_set_text(GTK_ENTRY(entry), + gconf_value_get_string(gconf_entry->value)); gtk_signal_handler_unblock_by_data(GTK_OBJECT(entry), client); } |