## ExoIconChooserDialog

ExoIconChooserDialog — Dialog to select icons

## Synopsis

    #include <exo/exo.h>

                        ExoIconChooserDialog;
    GtkWidget*          exo_icon_chooser_dialog_new         (const gchar *title,
                                                             GtkWindow *parent,
                                                             const gchar *first_button_text,
                                                             ...);
    gchar*              exo_icon_chooser_dialog_get_icon    (ExoIconChooserDialog *icon_chooser_dialog);
    gboolean            exo_icon_chooser_dialog_set_icon    (ExoIconChooserDialog *icon_chooser_dialog,
                                                             const gchar *icon);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkWindow
                                           +----GtkDialog
                                                 +----ExoIconChooserDialog

## Implemented Interfaces

ExoIconChooserDialog implements AtkImplementorIface and GtkBuildable.

## Description

The ExoIconChooserDialog class provides an easy to use dialog to ask the user to select either a named icon from the selected icon theme, or an image file from the local file system.

## Details

### ExoIconChooserDialog

    typedef struct _ExoIconChooserDialog ExoIconChooserDialog;

The ExoIconChooserDialog struct contains only private fields and should not be directly accessed.

### exo_icon_chooser_dialog_new ()

    GtkWidget*          exo_icon_chooser_dialog_new         (const gchar *title,
                                                             GtkWindow *parent,
                                                             const gchar *first_button_text,
                                                             ...);

Creates a new ExoIconChooserDialog. This function is analogous to `gtk_dialog_new_with_buttons()`.

`title` : | title of the dialog, or `NULL`.
`parent` : | transient parent of the dialog, or `NULL`.
`first_button_text` : | stock-id or text to go in the first button, or `NULL`.
`...` : | response-id for the first button, then additional (button, id) pairs, ending with `NULL`.
Returns : | a new ExoIconChooserDialog.

Since 0.3.1.9

### exo_icon_chooser_dialog_get_icon ()

    gchar*              exo_icon_chooser_dialog_get_icon    (ExoIconChooserDialog *icon_chooser_dialog);

Returns the currently selected icon for the `icon_chooser_dialog`. The selected icon can be either a named icon (from the active icon theme) or the absolute path to an image file in the file system. You can distinguish between those two icon types using the `g_path_is_absolute()` function. If no icon is currently selected, `NULL` will be returned.

The caller is responsible to free the returned string using `g_free()` when no longer needed.

`icon_chooser_dialog` : | an ExoIconChooserDialog.
Returns : | the currently selected icon for `icon_chooser_dialog` or `NULL` if no icon is selected.

Since 0.3.1.9

### exo_icon_chooser_dialog_set_icon ()

    gboolean            exo_icon_chooser_dialog_set_icon    (ExoIconChooserDialog *icon_chooser_dialog,
                                                             const gchar *icon);

Preselects the specified `icon` in the `icon_chooser_dialog`, and returns `TRUE` if the `icon` was successfully selected.

`icon_chooser_dialog` : | an ExoIconChooserDialog.
`icon` : | the themed icon or the absolute path to an image file to select.
Returns : | `TRUE` if the `icon` was successfully preselected in the `icon_chooser_dialog`, `FALSE` otherwise.

Since 0.3.1.9

## See Also

GtkIconTheme