:right-sidebar: True AppChooserWidget =================================================================== .. currentmodule:: gi.repository.Gtk .. deprecated:: 4.10 The application selection widgets should be implemented according to the design of each platform and/or application requiring them. .. class:: AppChooserWidget(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.AppChooser`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` ``GtkAppChooserWidget`` is a widget for selecting applications. It is the main building block for :obj:`~gi.repository.Gtk.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 :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_default`\, :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_recommended`\, :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_fallback`\, :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_other` and :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_all` properties. See the :obj:`~gi.repository.Gtk.AppChooser` documentation for more information about these groups of applications. To keep track of the selected application, use the :obj:`~gi.repository.Gtk.AppChooserWidget.signals.application_selected` and :obj:`~gi.repository.Gtk.AppChooserWidget.signals.application_activated` signals. CSS nodes -------------------------------------------------------------------------------- ``GtkAppChooserWidget`` has a single CSS node with name appchooser. Constructors ------------ .. rst-class:: interim-class .. class:: AppChooserWidget :no-index: .. classmethod:: new(content_type: str) -> ~gi.repository.Gtk.Widget Creates a new ``GtkAppChooserWidget`` for applications that can handle content of the given type. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param content_type: the content type to show applications for Methods ------- .. rst-class:: interim-class .. class:: AppChooserWidget :no-index: .. method:: get_default_text() -> str | None Returns the text that is shown if there are not applications that can handle the content type. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: get_show_all() -> bool Gets whether the app chooser should show all applications in a flat list. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: get_show_default() -> bool Gets whether the app chooser should show the default handler for the content type in a separate section. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: get_show_fallback() -> bool Gets whether the app chooser should show related applications for the content type in a separate section. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: get_show_other() -> bool Gets whether the app chooser should show applications which are unrelated to the content type. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: get_show_recommended() -> bool Gets whether the app chooser should show recommended applications for the content type in a separate section. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: set_default_text(text: str) -> None Sets the text that is shown if there are not applications that can handle the content type. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param text: the new value for :obj:`~gi.repository.Gtk.AppChooserWidget.props.default_text` .. method:: set_show_all(setting: bool) -> None Sets whether the app chooser should show all applications in a flat list. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param setting: the new value for :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_all` .. method:: set_show_default(setting: bool) -> None Sets whether the app chooser should show the default handler for the content type in a separate section. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param setting: the new value for :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_default` .. method:: set_show_fallback(setting: bool) -> None Sets whether the app chooser should show related applications for the content type in a separate section. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param setting: the new value for :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_fallback` .. method:: set_show_other(setting: bool) -> None Sets whether the app chooser should show applications which are unrelated to the content type. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param setting: the new value for :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_other` .. method:: set_show_recommended(setting: bool) -> None Sets whether the app chooser should show recommended applications for the content type in a separate section. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param setting: the new value for :obj:`~gi.repository.Gtk.AppChooserWidget.props.show_recommended` Properties ---------- .. rst-class:: interim-class .. class:: AppChooserWidget :no-index: .. attribute:: props.default_text :type: str The type of the None singleton. .. attribute:: props.show_all :type: bool The type of the None singleton. .. attribute:: props.show_default :type: bool The type of the None singleton. .. attribute:: props.show_fallback :type: bool The type of the None singleton. .. attribute:: props.show_other :type: bool The type of the None singleton. .. attribute:: props.show_recommended :type: bool The type of the None singleton. Signals ------- .. rst-class:: interim-class .. class:: AppChooserWidget.signals :no-index: .. method:: application_activated(application: ~gi.repository.Gio.AppInfo) -> None The type of the None singleton. :param application: the activated ``GAppInfo`` .. method:: application_selected(application: ~gi.repository.Gio.AppInfo) -> None The type of the None singleton. :param application: the selected ``GAppInfo``