implemented according to the design of each platform and/or application requiring them.
gtk.app_chooser_button
Module for [AppChooserButton] class
Types 3
The [gtk.app_chooser_button.AppChooserButton] lets the user select an application.
!An example GtkAppChooserButton
Initially, a [gtk.app_chooser_button.AppChooserButton] selects the first application in its list, which will either be the most-recently used application or, if property@Gtk.AppChooserButton:show-default-item is true, the default application.
The list of applications shown in a [gtk.app_chooser_button.AppChooserButton] includes the recommended applications for the given content type. When property@Gtk.AppChooserButton:show-default-item is set, the default application is also included. To let the user chooser other applications, you can set the property@Gtk.AppChooserButton:show-dialog-item property, which allows to open a full [gtk.app_chooser_dialog.AppChooserDialog].
It is possible to add custom items to the list, using [gtk.app_chooser_button.AppChooserButton.appendCustomItem]. These items cause the signal@Gtk.AppChooserButton::custom-item-activated signal to be emitted when they are selected.
To track changes in the selected application, use the [gtk.app_chooser_button.AppChooserButton.changed] signal.
CSS nodes
[gtk.app_chooser_button.AppChooserButton] has a single CSS node with the name “appchooserbutton”.
Deprecated
AppChooserButton self()Returns `this`, for use in `with` statements.AppChooserButtonGidBuilder builder()Get builder for [gtk.appchooserbutton.AppChooserButton] Returns: New builder objectstring heading() @propertyGet `heading` property. Returns: The text to show at the top of the dialog that can be opened from the button.void heading(string propval) @propertySet `heading` property. Params: propval = The text to show at the top of the dialog that can be opened from the button.bool modal() @propertyGet `modal` property. Returns: Whether the app chooser dialog should be modal.void modal(bool propval) @propertySet `modal` property. Params: propval = Whether the app chooser dialog should be modal.bool showDefaultItem() @propertyGet `showDefaultItem` property. Returns: Determines whether the dropdown menu shows the default application on top for the provided content type.void showDefaultItem(bool propval) @propertySet `showDefaultItem` property. Params: propval = Determines whether the dropdown menu shows the default application on top for the provided content type.bool showDialogItem() @propertyGet `showDialogItem` property. Returns: Determines whether the dropdown menu shows an item to open a [gtk.appchooserdialog.AppChooserDialog].void showDialogItem(bool propval) @propertySet `showDialogItem` property. Params: propval = Determines whether the dropdown menu shows an item to open a [gtk.appchooserdialog.AppChooserDialog].void appendCustomItem(string name, string label, gio.icon.Icon icon)Appends a custom item to the list of applications that is shown in the popup.void appendSeparator()Appends a separator to the list of applications that is shown in the popup.string getHeading()Returns the text to display at the top of the dialog. Returns: the text to display at the top of the dialog, or null, in which case a default text is displayedbool getModal()Gets whether the dialog is modal. Returns: true if the dialog is modalbool getShowDefaultItem()Returns whether the dropdown menu should show the default application at the top. Returns: the value of `propertyGtk.AppChooserButton:show-default-item`bool getShowDialogItem()Returns whether the dropdown menu shows an item for a [gtk.appchooserdialog.AppChooserDialog]. Returns: the value of `propertyGtk.AppChooserButton:show-dialog-item`void setActiveCustomItem(string name)Selects a custom item.void setHeading(string heading)Sets the text to display at the top of the dialog.void setModal(bool modal)Sets whether the dialog should be modal.void setShowDefaultItem(bool setting)Sets whether the dropdown menu of this button should show the default application for the given content type at top.void setShowDialogItem(bool setting)Sets whether the dropdown menu of this button should show an entry to trigger a [gtk.appchooserdialog.AppChooserDialog].gulong connectActivate(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.app_chooser_button.AppChooserButton)))
&& Parameters!T.length < 2)Connect to `Activate` signal.gulong connectChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.app_chooser_button.AppChooserButton)))
&& Parameters!T.length < 2)Connect to `Changed` signal.gulong connectCustomItemActivated(T)(string detail = null, T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == string)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.app_chooser_button.AppChooserButton)))
&& Parameters!T.length < 3)Connect to `CustomItemActivated` signal.T heading(string propval)Set `heading` property. Params: propval = The text to show at the top of the dialog that can be opened from the button.T modal(bool propval)Set `modal` property. Params: propval = Whether the app chooser dialog should be modal. Returns: Builder instance for fluent chainingT showDefaultItem(bool propval)Set `showDefaultItem` property. Params: propval = Determines whether the dropdown menu shows the default application on top for the provided content type. Returns: Builder instance for fluent chainingT showDialogItem(bool propval)Set `showDialogItem` property. Params: propval = Determines whether the dropdown menu shows an item to open a [gtk.appchooserdialog.AppChooserDialog]. Returns: Builder instance for fluent chainingFluent builder for [gtk.app_chooser_button.AppChooserButton]