Package: gtk

Class gtk-app-chooser-button

Superclasses

Documented Subclasses

None

Direct Slots

heading
The heading property of g-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 when clicked.
Default value: false

Details

The gtk-app-chooser-button is a widget that lets the user select an application. It implements the gtk-app-chooser interface.

Initially, a gtk-app-chooser-button 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 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.

It is possible to add custom items to the list, using the function gtk-app-chooser-button-append-custom-item. 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 item-name)    : Has Details      
Emitted when a custom item, previously added with the function gtk-app-chooser-button-append-custom-item, is activated from the dropdown menu.
widget
The gtk-app-chooser-button widget which received the signal.
item-name
A string with the name of the activated item.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2020-5-21