PreferencesWindow

A window to present an application's preferences.

<picture> <source srcset="preferences-window-dark.png" media="(prefers-color-scheme: dark)"> <img src="preferences-window.png" alt="preferences-window"> </picture>

The adw.preferences_window.PreferencesWindow widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user.

CSS nodes

adw.preferences_window.PreferencesWindow has a main CSS node with the name window and the style class .preferences.

Constructors

this
this()

Creates a new adw.preferences_window.PreferencesWindow.

Members

Functions

add
void add(adw.preferences_page.PreferencesPage page)

Adds a preferences page to self.

addToast
void addToast(adw.toast.Toast toast)

Displays toast.

closeSubpage
void closeSubpage()

Closes the current subpage.

getCanNavigateBack
bool getCanNavigateBack()

Gets whether gestures and shortcuts for closing subpages are enabled.

getSearchEnabled
bool getSearchEnabled()

Gets whether search is enabled for self.

getVisiblePage
adw.preferences_page.PreferencesPage getVisiblePage()

Gets the currently visible page of self.

getVisiblePageName
string getVisiblePageName()

Gets the name of currently visible page of self.

popSubpage
bool popSubpage()

Pop the visible page from the subpage stack of self.

presentSubpage
void presentSubpage(gtk.widget.Widget subpage)

Sets subpage as the window's subpage and opens it.

pushSubpage
void pushSubpage(adw.navigation_page.NavigationPage page)

Pushes page onto the subpage stack of self.

remove
void remove(adw.preferences_page.PreferencesPage page)

Removes a page from self.

setCanNavigateBack
void setCanNavigateBack(bool canNavigateBack)

Sets whether gestures and shortcuts for closing subpages are enabled.

setSearchEnabled
void setSearchEnabled(bool searchEnabled)

Sets whether search is enabled for self.

setVisiblePage
void setVisiblePage(adw.preferences_page.PreferencesPage page)

Makes page the visible page of self.

setVisiblePageName
void setVisiblePageName(string name)

Makes the page with the given name visible.

Inherited Members

From Window

addBreakpoint
void addBreakpoint(adw.breakpoint.Breakpoint breakpoint)

Adds breakpoint to self.

getContent
gtk.widget.Widget getContent()

Gets the content widget of self.

getCurrentBreakpoint
adw.breakpoint.Breakpoint getCurrentBreakpoint()

Gets the current breakpoint.

getDialogs
gio.list_model.ListModel getDialogs()

Returns a gio.list_model.ListModel that contains the open dialogs of self.

getVisibleDialog
adw.dialog.Dialog getVisibleDialog()

Returns the currently visible dialog in self, if there's one.

setContent
void setContent(gtk.widget.Widget content)

Sets the content widget of self.