Gtk.AppChooserWidget¶
class — extends Widget, Accessible, AppChooser, Buildable, ConstraintTarget
:::warning Deprecated since 4.10 This API is deprecated. :::
GtkAppChooserWidget is a widget for selecting applications.
It is the main building block for 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.
GtkAppChooserWidget offers detailed control over what applications
are shown, using the
AppChooserWidget.show-default,
AppChooserWidget.show-recommended,
AppChooserWidget.show-fallback,
AppChooserWidget.show-other and
AppChooserWidget.show-all properties. See the
AppChooser documentation for more information about these
groups of applications.
To keep track of the selected application, use the
AppChooserWidget.application-selected and
AppChooserWidget.application-activated signals.
CSS nodes¶
GtkAppChooserWidget has a single CSS node with name appchooser.
Constructors¶
new¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a new GtkAppChooserWidget for applications
that can handle content of the given type.
Parameters:
content_type— the content type to show applications for
Methods¶
get_default_text¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Returns the text that is shown if there are not applications that can handle the content type.
get_show_all¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Gets whether the app chooser should show all applications in a flat list.
get_show_default¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Gets whether the app chooser should show the default handler for the content type in a separate section.
get_show_fallback¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Gets whether the app chooser should show related applications for the content type in a separate section.
get_show_other¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Gets whether the app chooser should show applications which are unrelated to the content type.
get_show_recommended¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Gets whether the app chooser should show recommended applications for the content type in a separate section.
set_default_text¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Sets the text that is shown if there are not applications that can handle the content type.
Parameters:
text— the new value forAppChooserWidget.default-text
set_show_all¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Sets whether the app chooser should show all applications in a flat list.
Parameters:
setting— the new value forAppChooserWidget.show-all
set_show_default¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Sets whether the app chooser should show the default handler for the content type in a separate section.
Parameters:
setting— the new value forAppChooserWidget.show-default
set_show_fallback¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Sets whether the app chooser should show related applications for the content type in a separate section.
Parameters:
setting— the new value forAppChooserWidget.show-fallback
set_show_other¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Sets whether the app chooser should show applications which are unrelated to the content type.
Parameters:
setting— the new value forAppChooserWidget.show-other
set_show_recommended¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Sets whether the app chooser should show recommended applications for the content type in a separate section.
Parameters:
setting— the new value forAppChooserWidget.show-recommended
Properties¶
default_text¶
The text that appears in the widget when there are no applications for the given content type.
show_all¶
If True, the app chooser presents all applications
in a single list, without subsections for default,
recommended or related applications.
show_default¶
Determines whether the app chooser should show the default handler for the content type in a separate section.
If False, the default handler is listed among the recommended
applications.
show_fallback¶
Determines whether the app chooser should show a section for fallback applications.
If False, the fallback applications are listed among the
other applications.
show_other¶
Determines whether the app chooser should show a section for other applications.
show_recommended¶
Determines whether the app chooser should show a section for recommended applications.
If False, the recommended applications are listed
among the other applications.
Signals¶
application-activated¶
Emitted when an application item is activated from the widget's list.
This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.
application-selected¶
Emitted when an application item is selected from the widget's list.