## GConf Utilities

GConf Utilities — utility API to use GConf with applets.

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <panel-applet-gconf.h>

    gchar *             panel_applet_gconf_get_full_key     (PanelApplet *applet,
                                                             const gchar *key);
    gboolean            panel_applet_gconf_get_bool         (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);
    gint                panel_applet_gconf_get_int          (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);
    gchar *             panel_applet_gconf_get_string       (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);
    gdouble             panel_applet_gconf_get_float        (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);
    GSList *            panel_applet_gconf_get_list         (PanelApplet *applet,
                                                             const gchar *key,
                                                             GConfValueType list_type,
                                                             GError **error);
    GConfValue *        panel_applet_gconf_get_value        (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);
    void                panel_applet_gconf_set_bool         (PanelApplet *applet,
                                                             const gchar *key,
                                                             gboolean the_bool,
                                                             GError **error);
    void                panel_applet_gconf_set_int          (PanelApplet *applet,
                                                             const gchar *key,
                                                             gint the_int,
                                                             GError **error);
    void                panel_applet_gconf_set_string       (PanelApplet *applet,
                                                             const gchar *key,
                                                             const gchar *the_string,
                                                             GError **error);
    void                panel_applet_gconf_set_float        (PanelApplet *applet,
                                                             const gchar *key,
                                                             gdouble the_float,
                                                             GError **error);
    void                panel_applet_gconf_set_list         (PanelApplet *applet,
                                                             const gchar *key,
                                                             GConfValueType list_type,
                                                             GSList *list,
                                                             GError **error);
    void                panel_applet_gconf_set_value        (PanelApplet *applet,
                                                             const gchar *key,
                                                             GConfValue *value,
                                                             GError **error);

## Description

The `panel_applet_gconf_*()` set of API provides convenience functions to access GConf keys that are specific to an applet instance.

Keep in mind that it might be worth considering using global settings for your applet, instead of settings specific to an instance.

## Details

### panel_applet_gconf_get_full_key ()

    gchar *             panel_applet_gconf_get_full_key     (PanelApplet *applet,
                                                             const gchar *key);

`applet` : | a PanelApplet.
`key` : | a GConf key name.
Returns : | the full GConf path of `key`, in the per-instance GConf directory of `applet`. The string should be freed by the caller.

### panel_applet_gconf_get_bool ()

    gboolean            panel_applet_gconf_get_bool         (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);

Convenience wrapper around `gconf_client_get_bool()` to get the value of `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`error` : | a GError, or `NULL`.
Returns : | the value of `key`.

### panel_applet_gconf_get_int ()

    gint                panel_applet_gconf_get_int          (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);

Convenience wrapper around `gconf_client_get_int()` to get the value of `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`error` : | a GError, or `NULL`.
Returns : | the value of `key`.

### panel_applet_gconf_get_string ()

    gchar *             panel_applet_gconf_get_string       (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);

Convenience wrapper around `gconf_client_get_string()` to get the value of `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`error` : | a GError, or `NULL`.
Returns : | the value of `key`. The string should be freed by the caller.

### panel_applet_gconf_get_float ()

    gdouble             panel_applet_gconf_get_float        (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);

Convenience wrapper around `gconf_client_get_float()` to get the value of `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`error` : | a GError, or `NULL`.
Returns : | the value of `key`.

### panel_applet_gconf_get_list ()

    GSList *            panel_applet_gconf_get_list         (PanelApplet *applet,
                                                             const gchar *key,
                                                             GConfValueType list_type,
                                                             GError **error);

Convenience wrapper around `gconf_client_get_list()` to get the value of `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`error` : | a GError, or `NULL`.
Returns : | the value of `key`. The list and its content should be freed by the caller.

### panel_applet_gconf_get_value ()

    GConfValue *        panel_applet_gconf_get_value        (PanelApplet *applet,
                                                             const gchar *key,
                                                             GError **error);

Convenience wrapper around `gconf_client_get_value()` to get the value of `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`error` : | a GError, or `NULL`.
Returns : | the value of `key`.

### panel_applet_gconf_set_bool ()

    void                panel_applet_gconf_set_bool         (PanelApplet *applet,
                                                             const gchar *key,
                                                             gboolean the_bool,
                                                             GError **error);

Convenience wrapper around `gconf_client_set_bool()` to update `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`the_bool` : | new value for `key`.
`error` : | a GError, or `NULL`.

### panel_applet_gconf_set_int ()

    void                panel_applet_gconf_set_int          (PanelApplet *applet,
                                                             const gchar *key,
                                                             gint the_int,
                                                             GError **error);

Convenience wrapper around `gconf_client_set_int()` to update `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`the_int` : | new value for `key`.
`error` : | a GError, or `NULL`.

### panel_applet_gconf_set_string ()

    void                panel_applet_gconf_set_string       (PanelApplet *applet,
                                                             const gchar *key,
                                                             const gchar *the_string,
                                                             GError **error);

Convenience wrapper around `gconf_client_set_string()` to update `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`the_string` : | new value for `key`.
`error` : | a GError, or `NULL`.

### panel_applet_gconf_set_float ()

    void                panel_applet_gconf_set_float        (PanelApplet *applet,
                                                             const gchar *key,
                                                             gdouble the_float,
                                                             GError **error);

Convenience wrapper around `gconf_client_set_float()` to update `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`the_float` : | new value for `key`.
`error` : | a GError, or `NULL`.

### panel_applet_gconf_set_list ()

    void                panel_applet_gconf_set_list         (PanelApplet *applet,
                                                             const gchar *key,
                                                             GConfValueType list_type,
                                                             GSList *list,
                                                             GError **error);

Convenience wrapper around `gconf_client_set_list()` to update `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`list_type` : | type of items in `list`.
`list` : | new value for `key`.
`error` : | a GError, or `NULL`.

### panel_applet_gconf_set_value ()

    void                panel_applet_gconf_set_value        (PanelApplet *applet,
                                                             const gchar *key,
                                                             GConfValue *value,
                                                             GError **error);

Convenience wrapper around `gconf_client_set_value()` to update `key` in the per-instance GConf directory of `applet`.

`applet` : | a PanelApplet.
`key` : | a GConf key name.
`value` : | new value for `key`.
`error` : | a GError, or `NULL`.