Application chooser combobox

Application chooser combobox — Combo box for application selection dialogs.

Synopsis

GAppInfo *          fm_app_chooser_combo_box_dup_selected_app
                                                        (GtkComboBox *combo,
                                                         gboolean *is_sel_changed);
const GList *       fm_app_chooser_combo_box_get_custom_apps
                                                        (GtkComboBox *combo);
void                fm_app_chooser_combo_box_setup      (GtkComboBox *combo,
                                                         FmMimeType *mime_type,
                                                         GList *apps,
                                                         GAppInfo *sel);
#define             fm_app_chooser_combo_box_setup_custom(combo,
                                                         apps,
                                                         sel)
#define             fm_app_chooser_combo_box_setup_for_mime_type(combo,
                                                         mime_type)

Description

include: libfm/fm-app-chooser-combo-box.h

The fm_app_chooser_combo_box_setup() allows to create a widget where applications are represented as a tree to choose from it. The dialog itself is represented by fm_app_chooser_dlg_new().

Details

fm_app_chooser_combo_box_dup_selected_app ()

GAppInfo *          fm_app_chooser_combo_box_dup_selected_app
                                                        (GtkComboBox *combo,
                                                         gboolean *is_sel_changed);

Retrieves the currently selected app. is_sel_changed (can be NULL) will get a boolean value which tells you if the currently selected app is different from the one initially selected in the combobox. The returned GAppInfo needs to be freed with g_object_unref()

Before 1.0.0 this call had name fm_app_chooser_combo_box_get_selected.

combo :

a GtkComboBox

is_sel_changed :

location to store TRUE if selection was changed. [out][allow-none]

Returns :

selected application.

Since 0.1.5


fm_app_chooser_combo_box_get_custom_apps ()

const GList *       fm_app_chooser_combo_box_get_custom_apps
                                                        (GtkComboBox *combo);

Retrieves a list of custom apps added with app-chooser. The returned GList is owned by the combo box and shouldn't be freed.

combo :

a GtkComboBox

Returns :

list of applications. [transfer none][element-type GAppInfo]

Since 0.1.5


fm_app_chooser_combo_box_setup ()

void                fm_app_chooser_combo_box_setup      (GtkComboBox *combo,
                                                         FmMimeType *mime_type,
                                                         GList *apps,
                                                         GAppInfo *sel);

Setups a combobox for selecting default application either for specified mime-type or from a list of pre-defined applications. If mime_type is NULL, and sel is provided and found in the apps, then it will be selected. If mime_type is not NULL then default application for the mime_type will be selected. When set up, the combobox will contain a list of available applications.

combo :

a GtkComboBox

mime_type :

a FmMimeType to select application. [allow-none]

apps :

custom list of applications. [allow-none][element-type GAppInfo]

sel :

a selected application in apps. [allow-none]

Since 0.1.5


fm_app_chooser_combo_box_setup_custom()

#define             fm_app_chooser_combo_box_setup_custom(combo, apps, sel)

Setups a combobox for selecting from a list of pre-defined applications. after set up, the combobox will contain a list of available applications the caller provides, and if sel if found in the list, it will be selected.

combo :

a GtkComboBox

apps :

custom GList of applications. [element-type GAppInfo]

sel :

a selected application in apps. [allow-none]

Since 0.1.5


fm_app_chooser_combo_box_setup_for_mime_type()

#define             fm_app_chooser_combo_box_setup_for_mime_type(combo, mime_type)

Setups a combobox for selecting default application for specified mime-type. after set up, the combobox will contain a list of available applications for this mime-type, and the default application of the mime-type will get selected.

combo :

a GtkComboBox

mime_type :

a FmMimeType to select application

Since 0.1.5