![]() |
![]() |
![]() |
exo Reference Manual | ![]() |
---|---|---|---|---|
#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);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----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.
typedef struct _ExoIconChooserDialog ExoIconChooserDialog;
The ExoIconChooserDialog struct contains only private fields and should not be directly accessed.
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
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
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