## Application chooser dialog Application chooser dialog — Dialog for application selection. |

## Synopsis

    GAppInfo *          fm_app_chooser_dlg_dup_selected_app (GtkDialog *dlg,
                                                             gboolean *set_default);
    GtkDialog *         fm_app_chooser_dlg_new              (FmMimeType *mime_type,
                                                             gboolean can_set_default);
    GAppInfo *          fm_choose_app_for_mime_type         (GtkWindow *parent,
                                                             FmMimeType *mime_type,
                                                             gboolean can_set_default);

## Description

`include`: libfm/fm-gtk.h

The dialog to choose application from tree of known applications. Also allows user to create custom one. The tree itself is represented by `fm_app_menu_view_new()`.

## Details

### fm_app_chooser_dlg_dup_selected_app ()

    GAppInfo *          fm_app_chooser_dlg_dup_selected_app (GtkDialog *dlg,
                                                             gboolean *set_default);

Retrieves a currently selected application from `dlg`.

Before 1.0.0 this call had name fm_app_chooser_dlg_get_selected_app.

`dlg` : | a widget
`set_default` : | location to get value that was used for `fm_app_chooser_dlg_new()`
Returns : | selected application. [transfer full]

Since 0.1.0

### fm_app_chooser_dlg_new ()

    GtkDialog *         fm_app_chooser_dlg_new              (FmMimeType *mime_type,
                                                             gboolean can_set_default);

Creates a widget for choosing an application either from tree of existing ones or also allows to set up own command for it.

`mime_type` : | MIME type for list creation. [allow-none]
`can_set_default` : | `TRUE` if widget can set selected item as default for `mime_type`
Returns : | a widget. [transfer full]

Since 0.1.0

### fm_choose_app_for_mime_type ()

    GAppInfo *          fm_choose_app_for_mime_type         (GtkWindow *parent,
                                                             FmMimeType *mime_type,
                                                             gboolean can_set_default);

Creates a dialog to choose application for `mime_type`, lets user to choose then returns the chosen application.

If user creates custom application and `mime_type` isn't `NULL` then this custom application will be added to list of supporting the `mime_type`. Otherwise that custom application file will be deleted after usage.

`parent` : | a parent window. [allow-none]
`mime_type` : | MIME type for list creation. [allow-none]
`can_set_default` : | `TRUE` if widget can set selected item as default for `mime_type`
Returns : | user choise.

Since 0.1.0