PreferencesWindow#
Deprecated since version 1.6: Use PreferencesDialog
.
- class PreferencesWindow(*args, **kwargs)#
Superclasses: Window
, Window
, Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
, Native
, Root
, ShortcutManager
A window to present an application’s preferences.

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#
- class PreferencesWindow
- classmethod new() Widget #
Creates a new
AdwPreferencesWindow
.Deprecated since version 1.6: Use
PreferencesDialog
.
Methods#
- class PreferencesWindow
- add(page: PreferencesPage) None #
Adds a preferences page to
self
.Deprecated since version 1.6: Use
PreferencesDialog
.- Parameters:
page – the page to add
- add_toast(toast: Toast) None #
Displays
toast
.See
add_toast
.Deprecated since version 1.6: Use
PreferencesDialog
.- Parameters:
toast – a toast
- close_subpage() None #
Closes the current subpage.
If there is no presented subpage, this does nothing.
Deprecated since version 1.4: Use
pop_subpage
instead.
Gets whether gestures and shortcuts for closing subpages are enabled.
Deprecated since version 1.4: Use
get_can_pop
instead.
- get_search_enabled() bool #
Gets whether search is enabled for
self
.Deprecated since version 1.6: Use
PreferencesDialog
.
- get_visible_page() PreferencesPage | None #
Gets the currently visible page of
self
.Deprecated since version 1.6: Use
PreferencesDialog
.
- get_visible_page_name() str | None #
Gets the name of currently visible page of
self
.Deprecated since version 1.6: Use
PreferencesDialog
.
- pop_subpage() bool #
Pop the visible page from the subpage stack of
self
.Added in version 1.4.
Deprecated since version 1.6: Use
PreferencesDialog
.
- present_subpage(subpage: 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 since version 1.4: Use
push_subpage
instead.- Parameters:
subpage – the subpage
- push_subpage(page: NavigationPage) None #
Pushes
page
onto the subpage stack ofself
.The page will be automatically removed when popped.
Added in version 1.4.
Deprecated since version 1.6: Use
PreferencesDialog
.- Parameters:
page – the subpage
- remove(page: PreferencesPage) None #
Removes a page from
self
.Deprecated since version 1.6: Use
PreferencesDialog
.- Parameters:
page – the page to remove
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 Alt+:kbd:
←
shortcut.For right-to-left locales, gestures and shortcuts are reversed.
Has no effect for subpages added with
push_subpage
.Deprecated since version 1.4: Use
set_can_pop
instead.- Parameters:
can_navigate_back – the new value
- set_search_enabled(search_enabled: bool) None #
Sets whether search is enabled for
self
.Deprecated since version 1.6: Use
PreferencesDialog
.- Parameters:
search_enabled – whether search is enabled
- set_visible_page(page: PreferencesPage) None #
Makes
page
the visible page ofself
.Deprecated since version 1.6: Use
PreferencesDialog
.- Parameters:
page – a page of
self
- set_visible_page_name(name: str) None #
Makes the page with the given name visible.
See
visible_page
.Deprecated since version 1.6: Use
PreferencesDialog
.- Parameters:
name – the name of the page to make visible
Properties#
- class PreferencesWindow
The type of the None singleton.
Deprecated since version 1.4: Use
can_pop
instead.
- props.search_enabled: bool#
The type of the None singleton.
Deprecated since version 1.6: Use
PreferencesDialog
.
- props.visible_page: Widget#
The type of the None singleton.
Deprecated since version 1.6: Use
PreferencesDialog
.
- props.visible_page_name: str#
The type of the None singleton.
Deprecated since version 1.6: Use
PreferencesDialog
.
Fields#
- class PreferencesWindow
- parent_instance#