:right-sidebar: True PreferencesWindow =================================================================== .. currentmodule:: gi.repository.Adw .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. .. class:: PreferencesWindow(*args, **kwargs) :no-contents-entry: Superclasses: :class:`~gi.repository.Adw.Window`, :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.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Native`, :class:`~gi.repository.Gtk.Root`, :class:`~gi.repository.Gtk.ShortcutManager` A window to present an application's preferences. .. image:: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/preferences-window.png The ``AdwPreferencesWindow`` widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user. CSS nodes -------------------------------------------------------------------------------- ``AdwPreferencesWindow`` has a main CSS node with the name ``window`` and the style class ``.preferences``\. Constructors ------------ .. rst-class:: interim-class .. class:: PreferencesWindow :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwPreferencesWindow``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. Methods ------- .. rst-class:: interim-class .. class:: PreferencesWindow :no-index: .. method:: add(page: ~gi.repository.Adw.PreferencesPage) -> None Adds a preferences page to ``self``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. :param page: the page to add .. method:: add_toast(toast: ~gi.repository.Adw.Toast) -> None Displays ``toast``\. See :obj:`~gi.repository.ToastOverlay.add_toast`\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. :param toast: a toast .. method:: close_subpage() -> None Closes the current subpage. If there is no presented subpage, this does nothing. .. deprecated:: 1.4 Use :obj:`~gi.repository.PreferencesWindow.pop_subpage` instead. .. method:: get_can_navigate_back() -> bool Gets whether gestures and shortcuts for closing subpages are enabled. .. deprecated:: 1.4 Use :obj:`~gi.repository.NavigationPage.get_can_pop` instead. .. method:: get_search_enabled() -> bool Gets whether search is enabled for ``self``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. .. method:: get_visible_page() -> ~gi.repository.Adw.PreferencesPage | None Gets the currently visible page of ``self``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. .. method:: get_visible_page_name() -> str | None Gets the name of currently visible page of ``self``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. .. method:: pop_subpage() -> bool Pop the visible page from the subpage stack of ``self``\. .. versionadded:: 1.4 .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. .. method:: present_subpage(subpage: ~gi.repository.Gtk.Widget) -> None Sets ``subpage`` as the window's subpage and opens it. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child. .. deprecated:: 1.4 Use :obj:`~gi.repository.PreferencesWindow.push_subpage` instead. :param subpage: the subpage .. method:: push_subpage(page: ~gi.repository.Adw.NavigationPage) -> None Pushes ``page`` onto the subpage stack of ``self``\. The page will be automatically removed when popped. .. versionadded:: 1.4 .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. :param page: the subpage .. method:: remove(page: ~gi.repository.Adw.PreferencesPage) -> None Removes a page from ``self``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. :param page: the page to remove .. method:: set_can_navigate_back(can_navigate_back: bool) -> None Sets whether gestures and shortcuts for closing subpages are enabled. The supported gestures are: - One-finger swipe on touchscreens - Horizontal scrolling on touchpads (usually two-finger swipe) - Back mouse button The keyboard back key is also supported, as well as the :kbd:`Alt`\+:kbd:`←` shortcut. For right-to-left locales, gestures and shortcuts are reversed. Has no effect for subpages added with :obj:`~gi.repository.PreferencesWindow.push_subpage`\. .. deprecated:: 1.4 Use :obj:`~gi.repository.NavigationPage.set_can_pop` instead. :param can_navigate_back: the new value .. method:: set_search_enabled(search_enabled: bool) -> None Sets whether search is enabled for ``self``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. :param search_enabled: whether search is enabled .. method:: set_visible_page(page: ~gi.repository.Adw.PreferencesPage) -> None Makes ``page`` the visible page of ``self``\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. :param page: a page of ``self`` .. method:: set_visible_page_name(name: str) -> None Makes the page with the given name visible. See :obj:`~gi.repository.Adw.PreferencesWindow.props.visible_page`\. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. :param name: the name of the page to make visible Properties ---------- .. rst-class:: interim-class .. class:: PreferencesWindow :no-index: .. attribute:: props.can_navigate_back :type: bool The type of the None singleton. .. deprecated:: 1.4 Use :obj:`~gi.repository.Adw.NavigationPage.props.can_pop` instead. .. attribute:: props.search_enabled :type: bool The type of the None singleton. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. .. attribute:: props.visible_page :type: ~gi.repository.Gtk.Widget The type of the None singleton. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. .. attribute:: props.visible_page_name :type: str The type of the None singleton. .. deprecated:: 1.6 Use :obj:`~gi.repository.Adw.PreferencesDialog`\. Fields ------ .. rst-class:: interim-class .. class:: PreferencesWindow :no-index: .. attribute:: parent_instance