gtk.app_chooser_button
Module for [AppChooserButton] class
Types 3
The #GtkAppChooserButton is a widget that lets the user select an application. It implements the #GtkAppChooser interface.
Initially, a #GtkAppChooserButton selects the first application in its list, which will either be the most-recently used application or, if #GtkAppChooserButton:show-default-item is true, the default application.
The list of applications shown in a #GtkAppChooserButton includes the recommended applications for the given content type. When #GtkAppChooserButton:show-default-item is set, the default application is also included. To let the user chooser other applications, you can set the #GtkAppChooserButton:show-dialog-item property, which allows to open a full #GtkAppChooserDialog.
It is possible to add custom items to the list, using gtk.app_chooser_button.AppChooserButton.appendCustomItem. These items cause the #GtkAppChooserButton::custom-item-activated signal to be emitted when they are selected.
To track changes in the selected application, use the #GtkComboBox::changed signal.
AppChooserButtonGidBuilder builder() static nothrowGet builder for [gtk.app_chooser_button.AppChooserButton] Returns: New builder objectstring heading() @property nothrowGet `heading` property. Returns: The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup.void heading(string propval) @property nothrowSet `heading` property. Params: propval = The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup.bool showDefaultItem() @property nothrowGet `showDefaultItem` property. Returns: The #GtkAppChooserButton:show-default-item property determines whether the dropdown menu should show the default application on top for the provided content...void showDefaultItem(bool propval) @property nothrowSet `showDefaultItem` property. Params: propval = The #GtkAppChooserButton:show-default-item property determines whether the dropdown menu should show the default application on top for the provide...bool showDialogItem() @property nothrowGet `showDialogItem` property. Returns: The #GtkAppChooserButton:show-dialog-item property determines whether the dropdown menu should show an item that triggers a #GtkAppChooserDialog when clicked.void showDialogItem(bool propval) @property nothrowSet `showDialogItem` property. Params: propval = The #GtkAppChooserButton:show-dialog-item property determines whether the dropdown menu should show an item that triggers a #GtkAppChooserDialog whe...void appendCustomItem(string name, string label, gio.icon.Icon icon) nothrowAppends a custom item to the list of applications that is shown in the popup; the item name must be unique per-widget. Clients can use the provided name as a detail for the #GtkAppChooserButton::cu...void appendSeparator() nothrowAppends a separator to the list of applications that is shown in the popup.string getHeading() nothrowReturns 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 getShowDefaultItem() nothrowReturns the current value of the #GtkAppChooserButton:show-default-item property. Returns: the value of #GtkAppChooserButton:show-default-itembool getShowDialogItem() nothrowReturns the current value of the #GtkAppChooserButton:show-dialog-item property. Returns: the value of #GtkAppChooserButton:show-dialog-itemvoid setActiveCustomItem(string name) nothrowSelects a custom item previously added with [gtk.app_chooser_button.AppChooserButton.appendCustomItem].void setHeading(string heading) nothrowSets the text to display at the top of the dialog. If the heading is not set, the dialog displays a default text.void setShowDefaultItem(bool setting) nothrowSets whether the dropdown menu of this button should show the default application for the given content type at top.void setShowDialogItem(bool setting) nothrowSets whether the dropdown menu of this button should show an entry to trigger a #GtkAppChooserDialog.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) nothrowConnect to `CustomItemActivated` signal.Fluent builder implementation template for gtk.app_chooser_button.AppChooserButton
T heading(string propval) nothrowSet `heading` property. Params: propval = The text to show at the top of the dialog that can be opened from the button. The string may contain Pango markup. Returns: Builder instance for fluent cha...T showDefaultItem(bool propval) nothrowSet `showDefaultItem` property. Params: propval = The #GtkAppChooserButton:show-default-item property determines whether the dropdown menu should show the default application on top for the provide...T showDialogItem(bool propval) nothrowSet `showDialogItem` property. Params: propval = The #GtkAppChooserButton:show-dialog-item property determines whether the dropdown menu should show an item that triggers a #GtkAppChooserDialog whe...Fluent builder for gtk.app_chooser_button.AppChooserButton