ExoIconChooserDialog: exo Reference Manual

## ExoIconChooserDialog ExoIconChooserDialog — Dialog to select icons |

## Functions

GtkWidget * | exo_icon_chooser_dialog_new ()
gchar * | exo_icon_chooser_dialog_get_icon ()
gboolean | exo_icon_chooser_dialog_set_icon ()

## Types and Values

struct | ExoIconChooserDialog

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── GtkDialog
                                ╰── ExoIconChooserDialog

## Implemented Interfaces

ExoIconChooserDialog implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <exo/exo.h>

## 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.

## Functions

### 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()`.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

## Types and Values

### struct ExoIconChooserDialog

    struct ExoIconChooserDialog;

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.

## See Also

GtkIconTheme