:right-sidebar: True FileChooserNative =================================================================== .. currentmodule:: gi.repository.Gtk .. deprecated:: 4.10 Use :obj:`~gi.repository.Gtk.FileDialog` instead .. class:: FileChooserNative(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.NativeDialog`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.FileChooser` :Constructors: :: FileChooserNative(**properties) new(title:str=None, parent:Gtk.Window=None, action:Gtk.FileChooserAction, accept_label:str=None, cancel_label:str=None) -> Gtk.FileChooserNative Constructors ------------ .. rst-class:: interim-class .. class:: FileChooserNative :no-index: .. classmethod:: new(title: str | None, parent: ~gi.repository.Gtk.Window | None, action: ~gi.repository.Gtk.FileChooserAction, accept_label: str | None = None, cancel_label: str | None = None) -> ~gi.repository.Gtk.FileChooserNative Creates a new ``GtkFileChooserNative``. .. deprecated:: 4.10 Use :obj:`~gi.repository.Gtk.FileDialog` instead :param title: Title of the native :param parent: Transient parent of the native :param action: Open or save mode for the dialog :param accept_label: text to go in the accept button, or :const:`None` for the default :param cancel_label: text to go in the cancel button, or :const:`None` for the default Methods ------- .. rst-class:: interim-class .. class:: FileChooserNative :no-index: .. method:: get_accept_label() -> str | None Retrieves the custom label text for the accept button. .. deprecated:: 4.10 Use :obj:`~gi.repository.Gtk.FileDialog` instead .. method:: get_cancel_label() -> str | None Retrieves the custom label text for the cancel button. .. deprecated:: 4.10 Use :obj:`~gi.repository.Gtk.FileDialog` instead .. method:: set_accept_label(accept_label: str | None = None) -> None Sets the custom label text for the accept button. If characters in ``label`` are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use “``__``” (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key should activate the button. .. deprecated:: 4.10 Use :obj:`~gi.repository.Gtk.FileDialog` instead :param accept_label: custom label .. method:: set_cancel_label(cancel_label: str | None = None) -> None Sets the custom label text for the cancel button. If characters in ``label`` are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use “``__``” (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. Pressing Alt and that key should activate the button. .. deprecated:: 4.10 Use :obj:`~gi.repository.Gtk.FileDialog` instead :param cancel_label: custom label Properties ---------- .. rst-class:: interim-class .. class:: FileChooserNative :no-index: .. attribute:: props.accept_label :type: str The text used for the label on the accept button in the dialog, or :const:`None` to use the default text. .. attribute:: props.cancel_label :type: str The text used for the label on the cancel button in the dialog, or :const:`None` to use the default text.