| Libfm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
Application chooser comboboxApplication chooser combobox — Combo box for application selection dialogs. |
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)
include: libfm/fm-gtk.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().
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.
|
a GtkComboBox |
|
location to store TRUE if selection was changed. [out][allow-none]
|
Returns : |
selected application. |
Since 0.1.5
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.
|
a GtkComboBox |
Returns : |
list of applications. [transfer none][element-type GAppInfo] |
Since 0.1.5
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.
|
a GtkComboBox |
|
a FmMimeType to select application. [allow-none] |
|
custom list of applications. [allow-none][element-type GAppInfo] |
|
a selected application in apps. [allow-none]
|
Since 0.1.5
#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.
|
a GtkComboBox |
|
custom GList of applications. [element-type GAppInfo] |
|
a selected application in apps. [allow-none]
|
Since 0.1.5
#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.
|
a GtkComboBox |
|
a FmMimeType to select application |
Since 0.1.5