Functions
gtk_app_chooser_widget_new ()
GtkWidget *
gtk_app_chooser_widget_new (const gchar *content_type);
Creates a new GtkAppChooserWidget for applications
that can handle content of the given type.
Since: 3.0
gtk_app_chooser_widget_set_show_default ()
void
gtk_app_chooser_widget_set_show_default
(GtkAppChooserWidget *self,
gboolean setting);
Sets whether the app chooser should show the default handler
for the content type in a separate section.
Since: 3.0
gtk_app_chooser_widget_set_show_recommended ()
void
gtk_app_chooser_widget_set_show_recommended
(GtkAppChooserWidget *self,
gboolean setting);
Sets whether the app chooser should show recommended applications
for the content type in a separate section.
Since: 3.0
gtk_app_chooser_widget_set_show_fallback ()
void
gtk_app_chooser_widget_set_show_fallback
(GtkAppChooserWidget *self,
gboolean setting);
Sets whether the app chooser should show related applications
for the content type in a separate section.
Since: 3.0
gtk_app_chooser_widget_set_show_other ()
void
gtk_app_chooser_widget_set_show_other (GtkAppChooserWidget *self,
gboolean setting);
Sets whether the app chooser should show applications
which are unrelated to the content type.
Since: 3.0
gtk_app_chooser_widget_set_show_all ()
void
gtk_app_chooser_widget_set_show_all (GtkAppChooserWidget *self,
gboolean setting);
Sets whether the app chooser should show all applications
in a flat list.
Since: 3.0
gtk_app_chooser_widget_set_default_text ()
void
gtk_app_chooser_widget_set_default_text
(GtkAppChooserWidget *self,
const gchar *text);
Sets the text that is shown if there are not applications
that can handle the content type.
gtk_app_chooser_widget_get_default_text ()
const gchar *
gtk_app_chooser_widget_get_default_text
(GtkAppChooserWidget *self);
Returns the text that is shown if there are not applications
that can handle the content type.
Since: 3.0
Types and Values
struct GtkAppChooserWidget
struct GtkAppChooserWidget;
struct GtkAppChooserWidgetClass
struct GtkAppChooserWidgetClass {
GtkBoxClass parent_class;
void (* application_selected) (GtkAppChooserWidget *self,
GAppInfo *app_info);
void (* application_activated) (GtkAppChooserWidget *self,
GAppInfo *app_info);
void (* populate_popup) (GtkAppChooserWidget *self,
GtkMenu *menu,
GAppInfo *app_info);
};
Property Details
The “default-text” property
“default-text” gchar *
The “default-text” property determines the text
that appears in the widget when there are no applications for the
given content type.
See also gtk_app_chooser_widget_set_default_text().
Owner: GtkAppChooserWidget
Flags: Read / Write
Default value: NULL
The “show-all” property
“show-all” gboolean
If the “show-all” property is TRUE, the app
chooser presents all applications in a single list, without
subsections for default, recommended or related applications.
Owner: GtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
The “show-default” property
“show-default” gboolean
The ::show-default property determines whether the app chooser
should show the default handler for the content type in a
separate section. If FALSE, the default handler is listed
among the recommended applications.
Owner: GtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
The “show-fallback” property
“show-fallback” gboolean
The “show-fallback” property determines whether
the app chooser should show a section for fallback applications.
If FALSE, the fallback applications are listed among the other
applications.
Owner: GtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
The “show-other” property
“show-other” gboolean
The “show-other” property determines whether
the app chooser should show a section for other applications.
Owner: GtkAppChooserWidget
Flags: Read / Write / Construct
Default value: FALSE
The “show-recommended” property
“show-recommended” gboolean
The “show-recommended” property determines
whether the app chooser should show a section for recommended
applications. If FALSE, the recommended applications are listed
among the other applications.
Owner: GtkAppChooserWidget
Flags: Read / Write / Construct
Default value: TRUE
Signal Details
The “application-activated” signal
void
user_function (GtkAppChooserWidget *self,
GAppInfo *application,
gpointer user_data)
Emitted when an application item is activated from the widget's list.
This usually happens when the user double clicks an item, or an item
is selected and the user presses one of the keys Space, Shift+Space,
Return or Enter.
Flags: Run First
The “populate-popup” signal
void
user_function (GtkAppChooserWidget *self,
GtkMenu *menu,
GAppInfo *application,
gpointer user_data)
Emitted when a context menu is about to popup over an application item.
Clients can insert menu items into the provided GtkMenu object in the
callback of this signal; the context menu will be shown over the item
if at least one item has been added to the menu.
Flags: Run First