The
gtk:app-chooser-button widget is a widget that lets the user
select an application. It implements the
gtk:app-chooser interface.
Initially, a
gtk:app-chooser-button widget selects the first application
in its list, which will either be the most recently used application or, if the
show-default-item property is
true, the default application.
The list of applications shown in a
gtk:app-chooser-button widget
includes the recommended applications for the given content type. When the
show-default-item property is set, the default application is also
included. To let the user chooser other applications, you can set the
show-dialog-item property, which allows to open a full
gtk:app-chooser-dialog widget.
It is possible to add custom items to the list, using the
gtk:app-chooser-button-append-custom-item function. These items cause the
"custom-item-activated" signal to be emitted when they are
selected.
To track changes in the selected application, use the
"changed"
signal.
Signal Details
The "custom-item-activated" signal
lambda (widget name) :has-details
Emitted when a custom item, previously added with the
gtk:app-chooser-button-append-custom-item function, is activated
from the dropdown menu.
- widget
- The gtk:app-chooser-button widget which received the signal.
- name
- A string with the name of the activated item.