Adw.PreferencesWindow¶
- Subclasses:
None
Methods¶
- Inherited:
Adw.Window (7), Gtk.Window (62), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Native (6), Gtk.Root (3)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Adw.Window (4), Gtk.Window (25), Gtk.Widget (34), Gtk.Accessible (1)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
d/r/w/en |
|
||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Adw.PreferencesWindow(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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
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 namewindow
and the style class.preferences
.- classmethod new()¶
- Returns:
the newly created
AdwPreferencesWindow
- Return type:
Creates a new
AdwPreferencesWindow
.
- add(page)¶
- Parameters:
page (
Adw.PreferencesPage
) – the page to add
Adds a preferences page to self.
- add_toast(toast)¶
- Parameters:
toast (
Adw.Toast
) – a toast
Displays toast.
See [method`ToastOverlay`.add_toast].
- close_subpage()¶
Closes the current subpage.
If there is no presented subpage, this does nothing.
Deprecated since version 1.4: Use [method`PreferencesWindow`.pop_subpage] instead.
- Returns:
whether gestures and shortcuts are enabled.
- Return type:
Gets whether gestures and shortcuts for closing subpages are enabled.
Deprecated since version 1.4: Use [method`NavigationPage`.get_can_pop] instead.
- get_search_enabled()¶
- Returns:
whether search is enabled for self.
- Return type:
Gets whether search is enabled for self.
- get_visible_page()¶
- Returns:
the visible page
- Return type:
Gets the currently visible page of self.
- get_visible_page_name()¶
-
Gets the name of currently visible page of self.
- pop_subpage()¶
- Returns:
TRUE
if a page has been popped- Return type:
Pop the visible page from the subpage stack of self.
New in version 1.4.
- present_subpage(subpage)¶
- Parameters:
subpage (
Gtk.Widget
) – the subpage
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 [method`PreferencesWindow`.push_subpage] instead.
- push_subpage(page)¶
- Parameters:
page (
Adw.NavigationPage
) – the subpage
Pushes page onto the subpage stack of self.
The page will be automatically removed when popped.
New in version 1.4.
- remove(page)¶
- Parameters:
page (
Adw.PreferencesPage
) – the page to remove
Removes a page from self.
- Parameters:
can_navigate_back (
bool
) – the new value
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 <kbd>Alt</kbd>+<kbd>←</kbd> shortcut.
For right-to-left locales, gestures and shortcuts are reversed.
Deprecated since version 1.4: Use [method`NavigationPage`.set_can_pop] instead. Has no effect for subpages added with [method`PreferencesWindow`.push_subpage].
- set_search_enabled(search_enabled)¶
- Parameters:
search_enabled (
bool
) – whether search is enabled
Sets whether search is enabled for self.
- set_visible_page(page)¶
- Parameters:
page (
Adw.PreferencesPage
) – a page of self
Makes page the visible page of self.
Property Details¶
- Name:
can-navigate-back
- Type:
- Default Value:
- Flags:
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 <kbd>Alt</kbd>+<kbd>←</kbd> shortcut.
For right-to-left locales, gestures and shortcuts are reversed.
Deprecated since version 1.4: Use [property`NavigationPage`:can-pop] instead. Has no effect for subpages added with [method`PreferencesWindow`.push_subpage].
- Adw.PreferencesWindow.props.search_enabled¶
- Name:
search-enabled
- Type:
- Default Value:
- Flags:
Whether search is enabled.
- Adw.PreferencesWindow.props.visible_page¶
- Name:
visible-page
- Type:
- Default Value:
- Flags:
The currently visible page.