:right-sidebar: True PreferencesDialog =================================================================== .. currentmodule:: gi.repository.Adw .. versionadded:: 1.5 .. class:: PreferencesDialog(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Adw.Dialog`, :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` A dialog showing application's preferences. .. image:: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/preferences-dialog.png The ``AdwPreferencesDialog`` widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user. Actions -------------------------------------------------------------------------------- ``AdwPrefencesDialog`` defines the ``navigation.pop`` action, it doesn't take any parameters and pops the current subpage from the navigation stack, equivalent to calling :obj:`~gi.repository.PreferencesDialog.pop_subpage`\. CSS nodes -------------------------------------------------------------------------------- ``AdwPreferencesDialog`` has a main CSS node with the name ``dialog`` and the style class ``.preferences``\. Constructors ------------ .. rst-class:: interim-class .. class:: PreferencesDialog :no-index: .. classmethod:: new() -> ~gi.repository.Adw.Dialog Creates a new ``AdwPreferencesDialog``\. .. versionadded:: 1.5 Methods ------- .. rst-class:: interim-class .. class:: PreferencesDialog :no-index: .. method:: add(page: ~gi.repository.Adw.PreferencesPage) -> None Adds a preferences page to ``self``\. .. versionadded:: 1.5 :param page: the page to add .. method:: add_toast(toast: ~gi.repository.Adw.Toast) -> None Displays ``toast``\. See :obj:`~gi.repository.ToastOverlay.add_toast`\. .. versionadded:: 1.5 :param toast: a toast .. method:: get_search_enabled() -> bool Gets whether search is enabled for ``self``\. .. versionadded:: 1.5 .. method:: get_visible_page() -> ~gi.repository.Adw.PreferencesPage | None Gets the currently visible page of ``self``\. .. versionadded:: 1.5 .. method:: get_visible_page_name() -> str | None Gets the name of currently visible page of ``self``\. .. versionadded:: 1.5 .. method:: pop_subpage() -> bool Pop the visible page from the subpage stack of ``self``\. .. versionadded:: 1.5 .. 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.5 :param page: the subpage .. method:: remove(page: ~gi.repository.Adw.PreferencesPage) -> None Removes a page from ``self``\. .. versionadded:: 1.5 :param page: the page to remove .. method:: set_search_enabled(search_enabled: bool) -> None Sets whether search is enabled for ``self``\. .. versionadded:: 1.5 :param search_enabled: whether search is enabled .. method:: set_visible_page(page: ~gi.repository.Adw.PreferencesPage) -> None Makes ``page`` the visible page of ``self``\. .. versionadded:: 1.5 :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.PreferencesDialog.props.visible_page`\. .. versionadded:: 1.5 :param name: the name of the page to make visible Properties ---------- .. rst-class:: interim-class .. class:: PreferencesDialog :no-index: .. attribute:: props.search_enabled :type: bool The type of the None singleton. .. versionadded:: 1.5 .. attribute:: props.visible_page :type: ~gi.repository.Gtk.Widget The type of the None singleton. .. versionadded:: 1.5 .. attribute:: props.visible_page_name :type: str The type of the None singleton. .. versionadded:: 1.5 Fields ------ .. rst-class:: interim-class .. class:: PreferencesDialog :no-index: .. attribute:: parent_instance