:right-sidebar: True AppChooserDialog =================================================================== .. 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:: AppChooserDialog(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Dialog`, :class:`~gi.repository.Gtk.Window`, :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`, :class:`~gi.repository.Gtk.Native`, :class:`~gi.repository.Gtk.Root`, :class:`~gi.repository.Gtk.ShortcutManager` :Constructors: :: AppChooserDialog(**properties) new(parent:Gtk.Window=None, flags:Gtk.DialogFlags, file:Gio.File) -> Gtk.Widget new_for_content_type(parent:Gtk.Window=None, flags:Gtk.DialogFlags, content_type:str) -> Gtk.Widget Constructors ------------ .. rst-class:: interim-class .. class:: AppChooserDialog :no-index: .. classmethod:: new(parent: ~gi.repository.Gtk.Window | None, flags: ~gi.repository.Gtk.DialogFlags, file: ~gi.repository.Gio.File) -> ~gi.repository.Gtk.Widget Creates a new ``GtkAppChooserDialog`` for the provided ``GFile``. The dialog will show applications that can open the file. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param parent: a ``GtkWindow`` :param flags: flags for this dialog :param file: a ``GFile`` .. classmethod:: new_for_content_type(parent: ~gi.repository.Gtk.Window | None, flags: ~gi.repository.Gtk.DialogFlags, content_type: str) -> ~gi.repository.Gtk.Widget Creates a new ``GtkAppChooserDialog`` for the provided content type. The dialog will show applications that can open the content type. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param parent: a ``GtkWindow`` :param flags: flags for this dialog :param content_type: a content type string Methods ------- .. rst-class:: interim-class .. class:: AppChooserDialog :no-index: .. method:: get_heading() -> str | None Returns the text to display at the top of the dialog. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: get_widget() -> ~gi.repository.Gtk.Widget Returns the ``GtkAppChooserWidget`` of this dialog. .. deprecated:: 4.10 This widget will be removed in GTK 5 .. method:: set_heading(heading: str) -> None Sets the text to display at the top of the dialog. If the heading is not set, the dialog displays a default text. .. deprecated:: 4.10 This widget will be removed in GTK 5 :param heading: a string containing Pango markup Properties ---------- .. rst-class:: interim-class .. class:: AppChooserDialog :no-index: .. attribute:: props.gfile :type: ~gi.repository.Gio.File The GFile used by the ``GtkAppChooserDialog``. The dialog's ``GtkAppChooserWidget`` content type will be guessed from the file, if present. .. attribute:: props.heading :type: str The text to show at the top of the dialog. The string may contain Pango markup.