Package: gtk

Class gtk:app-chooser-button

Superclasses

Documented Subclasses

None

Direct Slots

heading
The heading property of :string (Read / Write)
The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup.
Default value: nil
show-default-item
The show-default-item property of type :boolean (Read / Write / Construct)
Whether the dropdown menu should show the default application on top for the provided content type.
Default value: false
show-dialog-item
The show-dialog-item property of type :boolean (Read / Write / Construct)
Whether the dropdown menu should show an item that triggers a gtk:app-chooser-dialog widget when clicked.
Default value: false

Details

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.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

#2023-2-14