Top |
Known Implementations
GtkAppChooser is implemented by GtkAppChooserButton, GtkAppChooserDialog and GtkAppChooserWidget.
Description
GtkAppChooser is an interface that can be implemented by widgets which allow the user to choose an application (typically for the purpose of opening a file). The main objects that implement this interface are GtkAppChooserWidget, GtkAppChooserDialog and GtkAppChooserButton.
Applications are represented by GIO GAppInfo objects here. GIO has a concept of recommended and fallback applications for a given content type. Recommended applications are those that claim to handle the content type itself, while fallback also includes applications that handle a more generic content type. GIO also knows the default and last-used application for a given content type. The GtkAppChooserWidget provides detailed control over whether the shown list of applications should include default, recommended or fallback applications.
To obtain the application that has been selected in a GtkAppChooser,
use gtk_app_chooser_get_app_info()
.
Functions
gtk_app_chooser_get_app_info ()
GAppInfo *
gtk_app_chooser_get_app_info (GtkAppChooser *self
);
Returns the currently selected application.
Returns
a GAppInfo for the currently selected
application, or NULL
if none is selected. Free with g_object_unref()
.
[nullable][transfer full]
Since: 3.0
gtk_app_chooser_get_content_type ()
gchar *
gtk_app_chooser_get_content_type (GtkAppChooser *self
);
Returns the current value of the “content-type” property.
Since: 3.0
gtk_app_chooser_refresh ()
void
gtk_app_chooser_refresh (GtkAppChooser *self
);
Reloads the list of applications.
Since: 3.0
Property Details
The “content-type”
property
“content-type” gchar *
The content type of the GtkAppChooser object.
See GContentType for more information about content types.
Flags: Read / Write / Construct Only
Default value: NULL