## GimpConfig-utils GimpConfig-utils — Miscellaneous utility functions for libgimpconfig. |

## Synopsis

    GList *             gimp_config_diff                    (GObject *a,
                                                             GObject *b,
                                                             GParamFlags flags);
    gboolean            gimp_config_sync                    (GObject *src,
                                                             GObject *dest,
                                                             GParamFlags flags);
    void                gimp_config_reset_properties        (GObject *object);
    void                gimp_config_reset_property          (GObject *object,
                                                             const gchar *property_name);
    void                gimp_config_string_append_escaped   (GString *string,
                                                             const gchar *val);

## Description

Miscellaneous utility functions for libgimpconfig.

## Details

### gimp_config_diff ()

    GList *             gimp_config_diff                    (GObject *a,
                                                             GObject *b,
                                                             GParamFlags flags);

Compares all properties of `a` and `b` that have all `flags` set. If `flags` is 0, all properties are compared.

If the two objects are not of the same type, only properties that exist in both object classes and are of the same value_type are compared.

`a` : | a GObject
`b` : | another GObject object
`flags` : | a mask of GParamFlags
Returns : | a GList of differing GParamSpecs.

Since GIMP 2.4

### gimp_config_sync ()

    gboolean            gimp_config_sync                    (GObject *src,
                                                             GObject *dest,
                                                             GParamFlags flags);

Compares all read- and write-able properties from `src` and `dest` that have all `flags` set. Differing values are then copied from `src` to `dest`. If `flags` is 0, all differing read/write properties.

Properties marked as "construct-only" are not touched.

If the two objects are not of the same type, only properties that exist in both object classes and are of the same value_type are synchronized

`src` : | a GObject
`dest` : | another GObject
`flags` : | a mask of GParamFlags
Returns : | `TRUE` if `dest` was modified, `FALSE` otherwise

Since GIMP 2.4

### gimp_config_reset_properties ()

    void                gimp_config_reset_properties        (GObject *object);

Resets all writable properties of `object` to the default values as defined in their GParamSpec. Properties marked as "construct-only" are not touched.

If you want to reset a GimpConfig object, please use `gimp_config_reset()`.

`object` : | a GObject

Since GIMP 2.4

### gimp_config_reset_property ()

    void                gimp_config_reset_property          (GObject *object,
                                                             const gchar *property_name);

Resets the property named `property_name` to its default value. The property must be writable and must not be marked as "construct-only".

`object` : | a GObject
`property_name` : | name of the property to reset

Since GIMP 2.4

### gimp_config_string_append_escaped ()

    void                gimp_config_string_append_escaped   (GString *string,
                                                             const gchar *val);

Escapes and quotes `val` and appends it to `string`. The escape algorithm is different from the one used by `g_strescape()` since it leaves non-ASCII characters intact and thus preserves UTF-8 strings. Only control characters and quotes are being escaped.

`string` : | pointer to a GString
`val` : | a string to append or `NULL`

Since GIMP 2.4