1.40 <AdwPreferencesDialog>

Class: <AdwPreferencesDialog>

It derives from <AdwDialog>.

A dialog showing application’s preferences.

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

CSS nodes

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

Fields

parent-instance

Properties

Property: preferences-dialog:search-enabled self

Whether search is enabled.

Its value is a boolean.

Set it with (set! (preferences-dialog:search-enabled self) value).

Property: preferences-dialog:visible-page self

The currently visible page.

Its value is a <GtkWidget>, or #f.

Set it with (set! (preferences-dialog:visible-page self) value).

Property: preferences-dialog:visible-page-name self

The name of the currently visible page.

See AdwPreferencesDialog:visible-page.

Its value is a string, or #f.

Set it with (set! (preferences-dialog:visible-page-name self) value).

Procedures

Method: preferences-dialog:add self page
Method: add self page

Adds a preferences page to self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

page

Passed: a <AdwPreferencesPage>.

the page to add

Method: preferences-dialog:add-toast self toast
Method: add-toast self toast

Displays toast.

See ToastOverlay.add_toast.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

toast

Passed: a <AdwToast>.

a toast

Method: preferences-dialog:get-search-enabled? self ⇒ %return
Method: get-search-enabled? self ⇒ %return

Gets whether search is enabled for self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

%return

Returned: a boolean.

whether search is enabled for self.

Method: preferences-dialog:get-visible-page self ⇒ %return
Method: get-visible-page self ⇒ %return

Gets the currently visible page of self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

%return

Returned: a <AdwPreferencesPage>, or #f.

the visible page

Method: preferences-dialog:get-visible-page-name self ⇒ %return
Method: get-visible-page-name self ⇒ %return

Gets the name of currently visible page of self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

%return

Returned: a string, or #f.

the name of the visible page

Procedure: preferences-dialog:new ⇒ %return

Creates a new <AdwPreferencesDialog>.

%return

Returned: a <AdwDialog>.

the newly created <AdwPreferencesDialog>

Method: preferences-dialog:pop-subpage? self ⇒ %return
Method: pop-subpage? self ⇒ %return

Pop the visible page from the subpage stack of self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

%return

Returned: a boolean.

TRUE if a page has been popped

Method: preferences-dialog:push-subpage self page
Method: push-subpage self page

Pushes page onto the subpage stack of self.

The page will be automatically removed when popped.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

page

Passed: a <AdwNavigationPage>.

the subpage

Method: preferences-dialog:remove self page
Method: remove self page

Removes a page from self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

page

Passed: a <AdwPreferencesPage>.

the page to remove

Method: preferences-dialog:set-search-enabled self search-enabled
Method: set-search-enabled self search-enabled

Sets whether search is enabled for self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

search-enabled

Passed: a boolean.

whether search is enabled

Method: preferences-dialog:set-visible-page self page
Method: set-visible-page self page

Makes page the visible page of self.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

page

Passed: a <AdwPreferencesPage>.

a page of self

Method: preferences-dialog:set-visible-page-name self name
Method: set-visible-page-name self name

Makes the page with the given name visible.

See PreferencesDialog:visible-page.

self

Passed: a <AdwPreferencesDialog>.

a preferences dialog

name

Passed: a string.

the name of the page to make visible