Devhelp.Settings¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
|||
r/w/c |
|||
r/w/c |
|||
r/w/c |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Devhelp.Settings(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_default()¶
- Returns:
the default
Devhelp.Settings
object.- Return type:
Gets the default
Devhelp.Settings
object. It has the defaultGio.Settings
paths (seeDevhelp.SettingsBuilder
) andDevhelp.Settings.bind_all
() has been called.New in version 3.30.
- bind_all()¶
Binds all the
Devhelp.Settings
properties to their correspondingGio.Settings
keys.New in version 3.30.
- bind_fonts()¶
Binds the
Devhelp.Settings
:use-system-fonts
,Devhelp.Settings
:variable-font
andDevhelp.Settings
:fixed-font
properties to their correspondingGio.Settings
keys.New in version 3.30.
- bind_group_books_by_language()¶
Binds the
Devhelp.Settings
:group-books-by-language
property to the correspondingGio.Settings
key.New in version 3.30.
- freeze_books_disabled_changed()¶
Tells self to not emit the
Devhelp.Settings
::books-disabled-changed
signal untilDevhelp.Settings.thaw_books_disabled_changed
() is called.A bit like
GObject.Object.freeze_notify
(), except that there is no freeze count.This function is useful if you call
Devhelp.Settings.set_book_enabled
() several times in a row.New in version 3.30.
- get_fixed_font()¶
- Returns:
the value of the
Devhelp.Settings
:fixed-font
property.- Return type:
Warning: you probably want to use the
Devhelp.Settings.get_selected_fonts
() function instead, to take into account theDevhelp.Settings
:use-system-fonts
property.New in version 3.30.
- get_group_books_by_language()¶
- Returns:
the value of the
Devhelp.Settings
:group-books-by-language
property.- Return type:
New in version 3.30.
- get_selected_fonts()¶
- Returns:
- Return type:
If
Devhelp.Settings
:use-system-fonts
isTrue
, returns the system fonts. Otherwise returns the values of theDevhelp.Settings
:variable-font
andDevhelp.Settings
:fixed-font
properties.New in version 3.30.
- get_use_system_fonts()¶
- Returns:
the value of the
Devhelp.Settings
:use-system-fonts
property.- Return type:
New in version 3.30.
- get_variable_font()¶
- Returns:
the value of the
Devhelp.Settings
:variable-font
property.- Return type:
Warning: you probably want to use the
Devhelp.Settings.get_selected_fonts
() function instead, to take into account theDevhelp.Settings
:use-system-fonts
property.New in version 3.30.
- is_book_enabled(book)¶
- Parameters:
book (
Devhelp.Book
) – aDevhelp.Book
.- Returns:
whether book is enabled.
- Return type:
Returns whether book is enabled according to the “books-disabled”
Gio.Settings
key. If the book ID is present in “books-disabled”, this function returnsFalse
, otherwiseTrue
is returned.New in version 3.30.
- set_book_enabled(book, enabled)¶
- Parameters:
book (
Devhelp.Book
) – aDevhelp.Book
.enabled (
bool
) – the new value.
Modifies the “books-disabled”
Gio.Settings
key. It adds or removes the book ID from “books-disabled”.New in version 3.30.
- set_fixed_font(fixed_font)¶
- Parameters:
fixed_font (
str
) – the new value.
Sets the
Devhelp.Settings
:fixed-font
property.New in version 3.30.
- set_group_books_by_language(group_books_by_language)¶
- Parameters:
group_books_by_language (
bool
) – the new value.
Sets the
Devhelp.Settings
:group-books-by-language
property.New in version 3.30.
- set_use_system_fonts(use_system_fonts)¶
- Parameters:
use_system_fonts (
bool
) – the new value.
Sets the
Devhelp.Settings
:use-system-fonts
property.New in version 3.30.
- set_variable_font(variable_font)¶
- Parameters:
variable_font (
str
) – the new value.
Sets the
Devhelp.Settings
:variable-font
property.New in version 3.30.
- thaw_books_disabled_changed()¶
Stops the effect of
Devhelp.Settings.freeze_books_disabled_changed
(), and emits theDevhelp.Settings
::books-disabled-changed
signal.A bit like
GObject.Object.thaw_notify
(), except that there is no freeze count.New in version 3.30.
- do_books_disabled_changed() virtual¶
- do_fonts_changed() virtual¶
Signal Details¶
- Devhelp.Settings.signals.books_disabled_changed(settings)¶
- Signal Name:
books-disabled-changed
- Flags:
- Parameters:
settings (
Devhelp.Settings
) – The object which received the signal
The
::books-disabled-changed
signal is emitted when the “books-disabled”Gio.Settings
key changes.New in version 3.30.
- Devhelp.Settings.signals.fonts_changed(settings)¶
- Signal Name:
fonts-changed
- Flags:
- Parameters:
settings (
Devhelp.Settings
) – The object which received the signal
The
::fonts-changed
signal is emitted when the return values ofDevhelp.Settings.get_selected_fonts
() have potentially changed.New in version 3.30.
Property Details¶
- Devhelp.Settings.props.fixed_font¶
-
Font for text with fixed width, such as code examples.
This property is independent of
Devhelp.Settings
:use-system-fonts
.New in version 3.30.
- Devhelp.Settings.props.group_books_by_language¶
-
Whether books should be grouped by programming language in the UI.
New in version 3.30.
- Devhelp.Settings.props.use_system_fonts¶
-
Whether to use the system default fonts.
New in version 3.30.
- Devhelp.Settings.props.variable_font¶
-
Font for text with variable width.
This property is independent of
Devhelp.Settings
:use-system-fonts
.New in version 3.30.