awn-config

## awn-config awn-config — Convenience functions for handling dock/applet configuration. |

## Synopsis

    DesktopAgnosticConfigClient* awn_config_get_default     (gint panel_id,
                                                             GError **error);
    DesktopAgnosticConfigClient* awn_config_get_default_for_applet
                                                            (AwnApplet *applet,
                                                             GError **error);
    DesktopAgnosticConfigClient* awn_config_get_default_for_applet_by_info
                                                            (const gchar *name,
                                                             const gchar *uid,
                                                             GError **error);
    void                awn_config_free                     (void);

## Description

Functions used by the dock, applets, and preferences dialogs to associate configuration options with the first two categories. Also handles their memory management.

## Details

### awn_config_get_default ()

    DesktopAgnosticConfigClient* awn_config_get_default     (gint panel_id,
                                                             GError **error);

Looks up or creates a configuration client that is associated with the panel specified.

`panel_id` : | The ID of the panel that is associated with the configuration client.
`error` : | The address of the GError object, if an error occurs.
Returns : | A borrowed reference to a configuration client object.

### awn_config_get_default_for_applet ()

    DesktopAgnosticConfigClient* awn_config_get_default_for_applet
                                                            (AwnApplet *applet,
                                                             GError **error);

Looks up or creates a configuration client that is associated with the given applet.

`applet` : | The applet.
`error` : | The address of the GError object, if an error occurs.
Returns : | A borrowed reference to the configuration client associated with the applet specified via the metadata.

### awn_config_get_default_for_applet_by_info ()

    DesktopAgnosticConfigClient* awn_config_get_default_for_applet_by_info
                                                            (const gchar *name,
                                                             const gchar *uid,
                                                             GError **error);

Looks up or creates a configuration client that is associated with the canonical name of an applet and an optional UID. Should only be used by code where the AwnApplet object is not present, such as the dock's preferences dialog.

`name` : | The canonical applet name.
`uid` : | The UID of the applet (may not be `NULL`).
`error` : | The address of the GError object, if an error occurs.
Returns : | A borrowed reference to the configuration client associated with the applet specified via the metadata.

### awn_config_free ()

    void                awn_config_free                     (void);

Properly frees all of the config clients in the cache.

Should be called on dock shutdown.

## See Also

#DesktopAgnosticConfigClient