Description
a GConfChangeSet allows you to collect a set of changes to
configuration keys (set/unset operations). You can then commit
all the changes at once. This is convenient for something like a
preferences dialog; you can collect all the pending changes in a
GConfChangeSet, then when the user clicks "apply" send them all to
the configuration database. The GConfChangeSet allows you to avoid
sending every preferences setting when "apply" is clicked; you only
have to send the settings the user changed.
In the future, GConf may also have optimizations so that
changing a group of values with GConfChangeSet is faster than calling
gconf_engine_set() for each value. In the future, GConfChangeSet may also
represent an atomic transaction, where all or none of the values are
set; however, for now the operation is not
atomic.
Details
struct GConfChangeSet
An opaque data type representing a set of changes to be made.
A change set can contain "set" and "unset" operations.
GConfChangeSetForeachFunc ()
The type of a function passed to gconf_change_set_foreach().
The cs argument is the GConfChangeSet you're iterating over. key is
a key in the change set. value is the value the key will be set to,
or NULL if the key will be unset. user_data is the
user data passed to gconf_change_set_foreach().
gconf_engine_commit_change_set ()
Applies the changes in the change set to the GConfEngine passed as
the first argument. If remove_committed is TRUE,
then any successfully-committed changes are removed from the change
set. If remove_committed is FALSE, the
GConfChangeSet is left unmodified.
If any set or unset operation results in an error, then processing
terminates and the error is returned in err (unless err was
NULL). If remove_committed was
TRUE, then all the changes committed before the error
occurred will have been removed from the set. If any error occurs,
FALSE is returned.
gconf_change_set_ref ()
Increases the reference count of a GConfChangeSet by one.
gconf_change_set_unref ()
Decreases the reference count of a GConfChangeSet by one. If the
reference count reaches 0, destroys the GConfChangeSet.
gconf_change_set_clear ()
Clears all changes from a GConfChangeSet, so that committing the
change set would have no effect.
gconf_change_set_remove ()
Removes a change from a GConfChangeSet. The key given as the key
argument will not be modified if this change set is committed.
If key is not in the change set, this function has no effect.
gconf_change_set_set ()
Adds a "set" operation to a change set. This function is similar to
gconf_engine_set(), except that no errors can occur (errors occur later, when
you try to commit the change set).
gconf_change_set_set_float ()
void gconf_change_set_set_float (GConfChangeSet *cs,
const gchar *key,
gdouble val); |
Adds a "set" operation; takes a gdouble argument, so you can avoid
creating a GConfValue.
gconf_change_set_set_int ()
void gconf_change_set_set_int (GConfChangeSet *cs,
const gchar *key,
gint val); |
Adds a "set" operation; takes a gint argument, so you can avoid
creating a GConfValue.
gconf_change_set_set_string ()
void gconf_change_set_set_string (GConfChangeSet *cs,
const gchar *key,
const gchar *val); |
Adds a "set" operation; takes a gchar* argument, so you can avoid
creating a GConfValue.
gconf_change_set_set_bool ()
void gconf_change_set_set_bool (GConfChangeSet *cs,
const gchar *key,
gboolean val); |
Adds a "set" operation; takes a gboolean argument, so you can avoid
creating a GConfValue.
gconf_change_set_set_schema ()
Adds a "set" operation; takes a GConfSchema argument, so you can
avoid creating a GConfValue. The schema is copied, val is left
unmodified.
gconf_change_set_set_list ()
gconf_change_set_set_pair ()
gconf_change_set_check_value ()
gconf_engine_change_set_from_currentv ()
gconf_engine_change_set_from_current ()
gconf_engine_reverse_change_set ()