PreferencesDialog#

Added in version 1.5.

class PreferencesDialog(**properties: Any)#

Superclasses: Dialog, Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Buildable, ConstraintTarget

A dialog showing application’s preferences.

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 pop_subpage.

CSS nodes#

AdwPreferencesDialog has a main CSS node with the name dialog and the style class .preferences.

Constructors#

class PreferencesDialog
classmethod new() Dialog#

Creates a new AdwPreferencesDialog.

Added in version 1.5.

Methods#

class PreferencesDialog
add(page: PreferencesPage) None#

Adds a preferences page to self.

Added in version 1.5.

Parameters:

page – the page to add

add_toast(toast: Toast) None#

Displays toast.

See add_toast.

Added in version 1.5.

Parameters:

toast – a toast

get_search_enabled() bool#

Gets whether search is enabled for self.

Added in version 1.5.

get_visible_page() PreferencesPage | None#

Gets the currently visible page of self.

Added in version 1.5.

get_visible_page_name() str | None#

Gets the name of currently visible page of self.

Added in version 1.5.

pop_subpage() bool#

Pop the visible page from the subpage stack of self.

Added in version 1.5.

push_subpage(page: NavigationPage) None#

Pushes page onto the subpage stack of self.

The page will be automatically removed when popped.

Added in version 1.5.

Parameters:

page – the subpage

remove(page: PreferencesPage) None#

Removes a page from self.

Added in version 1.5.

Parameters:

page – the page to remove

set_search_enabled(search_enabled: bool) None#

Sets whether search is enabled for self.

Added in version 1.5.

Parameters:

search_enabled – whether search is enabled

set_visible_page(page: PreferencesPage) None#

Makes page the visible page of self.

Added in version 1.5.

Parameters:

page – a page of self

set_visible_page_name(name: str) None#

Makes the page with the given name visible.

See visible_page.

Added in version 1.5.

Parameters:

name – the name of the page to make visible

Properties#

class PreferencesDialog
props.search_enabled: bool#

The type of the None singleton.

Added in version 1.5.

props.visible_page: Widget#

The type of the None singleton.

Added in version 1.5.

props.visible_page_name: str#

The type of the None singleton.

Added in version 1.5.

Fields#

class PreferencesDialog
parent_instance#