gtk.app_chooser_widget

Module for [AppChooserWidget] class

Types 3

gtk.app_chooser_widget.AppChooserWidget is a widget for selecting applications.

It is the main building block for gtk.app_chooser_dialog.AppChooserDialog. Most applications only need to use the latter; but you can use this widget as part of a larger widget if you have special needs.

gtk.app_chooser_widget.AppChooserWidget offers detailed control over what applications are shown, using the gtk.app_chooser_widget.AppChooserWidget.showDefault, gtk.app_chooser_widget.AppChooserWidget.showRecommended, gtk.app_chooser_widget.AppChooserWidget.showFallback, gtk.app_chooser_widget.AppChooserWidget.showOther and gtk.app_chooser_widget.AppChooserWidget.showAll properties. See the gtk.app_chooser.AppChooser documentation for more information about these groups of applications.

To keep track of the selected application, use the gtk.app_chooser_widget.AppChooserWidget.applicationSelected and gtk.app_chooser_widget.AppChooserWidget.applicationActivated signals.

CSS nodes

gtk.app_chooser_widget.AppChooserWidget has a single CSS node with name appchooser.

Deprecated

The application selection widgets should be

implemented according to the design of each platform and/or application requiring them.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
AppChooserWidget self() nothrowReturns `this`, for use in `with` statements.
AppChooserWidgetGidBuilder builder() static nothrowGet builder for [gtk.app_chooser_widget.AppChooserWidget] Returns: New builder object
string defaultText() @property nothrowGet `defaultText` property. Returns: The text that appears in the widget when there are no applications for the given content type.
void defaultText(string propval) @property nothrowSet `defaultText` property. Params: propval = The text that appears in the widget when there are no applications for the given content type.
bool showAll() @property nothrowGet `showAll` property. Returns: If true, the app chooser presents all applications in a single list, without subsections for default, recommended or related applications.
void showAll(bool propval) @property nothrowSet `showAll` property. Params: propval = If true, the app chooser presents all applications in a single list, without subsections for default, recommended or related applications.
bool showDefault() @property nothrowGet `showDefault` property. Returns: Determines whether the app chooser should show the default handler for the content type in a separate section.
void showDefault(bool propval) @property nothrowSet `showDefault` property. Params: propval = Determines whether the app chooser should show the default handler for the content type in a separate section.
bool showFallback() @property nothrowGet `showFallback` property. Returns: Determines whether the app chooser should show a section for fallback applications.
void showFallback(bool propval) @property nothrowSet `showFallback` property. Params: propval = Determines whether the app chooser should show a section for fallback applications.
bool showOther() @property nothrowGet `showOther` property. Returns: Determines whether the app chooser should show a section for other applications.
void showOther(bool propval) @property nothrowSet `showOther` property. Params: propval = Determines whether the app chooser should show a section for other applications.
bool showRecommended() @property nothrowGet `showRecommended` property. Returns: Determines whether the app chooser should show a section for recommended applications.
void showRecommended(bool propval) @property nothrowSet `showRecommended` property. Params: propval = Determines whether the app chooser should show a section for recommended applications.
string getDefaultText() nothrowReturns the text that is shown if there are not applications that can handle the content type. Returns: the value of [gtk.app_chooser_widget.AppChooserWidget.defaultText]
bool getShowAll() nothrowGets whether the app chooser should show all applications in a flat list. Returns: the value of [gtk.app_chooser_widget.AppChooserWidget.showAll]
bool getShowDefault() nothrowGets whether the app chooser should show the default handler for the content type in a separate section. Returns: the value of [gtk.app_chooser_widget.AppChooserWidget.showDefault]
bool getShowFallback() nothrowGets whether the app chooser should show related applications for the content type in a separate section. Returns: the value of [gtk.app_chooser_widget.AppChooserWidget.showFallback]
bool getShowOther() nothrowGets whether the app chooser should show applications which are unrelated to the content type. Returns: the value of [gtk.app_chooser_widget.AppChooserWidget.showOther]
bool getShowRecommended() nothrowGets whether the app chooser should show recommended applications for the content type in a separate section. Returns: the value of [gtk.app_chooser_widget.AppChooserWidget.showRecommended]
void setDefaultText(string text) nothrowSets the text that is shown if there are not applications that can handle the content type.
void setShowAll(bool setting) nothrowSets whether the app chooser should show all applications in a flat list.
void setShowDefault(bool setting) nothrowSets whether the app chooser should show the default handler for the content type in a separate section.
void setShowFallback(bool setting) nothrowSets whether the app chooser should show related applications for the content type in a separate section.
void setShowOther(bool setting) nothrowSets whether the app chooser should show applications which are unrelated to the content type.
void setShowRecommended(bool setting) nothrowSets whether the app chooser should show recommended applications for the content type in a separate section.
gulong connectApplicationActivated(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] : gio.app_info.AppInfo))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.app_chooser_widget.AppChooserWidget))) && Parameters!T.length < 3) nothrowConnect to `ApplicationActivated` signal.
gulong connectApplicationSelected(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] : gio.app_info.AppInfo))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.app_chooser_widget.AppChooserWidget))) && Parameters!T.length < 3) nothrowConnect to `ApplicationSelected` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(string contentType)Creates a new [gtk.app_chooser_widget.AppChooserWidget] for applications that can handle content of the given type.

Fluent builder implementation template for gtk.app_chooser_widget.AppChooserWidget

Methods
T defaultText(string propval) nothrowSet `defaultText` property. Params: propval = The text that appears in the widget when there are no applications for the given content type. Returns: Builder instance for fluent chaining
T showAll(bool propval) nothrowSet `showAll` property. Params: propval = If true, the app chooser presents all applications in a single list, without subsections for default, recommended or related applications. Returns: Builder...
T showDefault(bool propval) nothrowSet `showDefault` property. Params: propval = Determines whether the app chooser should show the default handler for the content type in a separate section.
T showFallback(bool propval) nothrowSet `showFallback` property. Params: propval = Determines whether the app chooser should show a section for fallback applications.
T showOther(bool propval) nothrowSet `showOther` property. Params: propval = Determines whether the app chooser should show a section for other applications. Returns: Builder instance for fluent chaining
T showRecommended(bool propval) nothrowSet `showRecommended` property. Params: propval = Determines whether the app chooser should show a section for recommended applications.