Tepl.Settings¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Tepl.Settings(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_range_uint(settings, key)¶
- Parameters:
settings (
Gio.Settings
) – aGio.Settings
.key (
str
) – a key part of settings.
- Returns:
whether the operation was successful.
- min:
the minimum value allowed by the range.
- max:
the maximum value allowed by the range.
- Return type:
This function introspects a
Gio.Settings
key to get its range, if the key as a “u” type (unsigned integer).False
is returned if the introspection failed.See
Gio.SettingsSchemaKey.get_range
() for more flexibility.New in version 6.2.
- classmethod get_singleton()¶
- Returns:
the
Tepl.Settings
singleton instance.- Return type:
New in version 6.2.
- get_selected_font()¶
- Returns:
the selected font name.
- Return type:
If
Tepl.Settings.provide_font_settings
() has *not* been called, this function always returns the current value of the system’s fixed width (monospace) font.If
Tepl.Settings.provide_font_settings
() *has* been called, this function returns the font name depending on the boolean value of use_default_font_key.See also the
Tepl.Settings
::font-changed
signal,Tepl.utils_override_font_string
() andTepl.prefs_create_font_component
().New in version 6.2.
- peek_desktop_interface_settings()¶
- Returns:
the
Gio.Settings
for"org.gnome.desktop.interface"
.- Return type:
New in version 6.2.
- provide_font_settings(font_settings, use_default_font_key, editor_font_key)¶
- Parameters:
font_settings (
Gio.Settings
) – theGio.Settings
object containing the keys.use_default_font_key (
str
) – a key of type boolean.editor_font_key (
str
) – a key of type string.
This function can only be called once, to provide two keys:
use_default_font_key: must be of type boolean, to know whether to use the system’s font (the default font), or the editor font.
editor_font_key: must be of type string, containing the font name to have a different font for the text editor, rather than using the system’s font.
See
Tepl.Settings.get_selected_font
().New in version 6.2.
Signal Details¶
- Tepl.Settings.signals.font_changed(settings)¶
- Signal Name:
font-changed
- Flags:
- Parameters:
settings (
Tepl.Settings
) – The object which received the signal
The
::font-changed
signal is emitted when the return value ofTepl.Settings.get_selected_font
() has potentially changed.It takes into account the use_default_font_key provided with
Tepl.Settings.provide_font_settings
() to avoid unnecessary signal emission. In other words, for example if use_default_font_key isFalse
, the signal is not emitted even if the default (system’s) font has been modified.The relation between this signal and a potential zoom in and zoom out feature, to temporarily make the font larger or smaller (so the zoom level not being stored in
Gio.Settings
): when this signal is emitted, it means that the user has explicitly changed the font setting, and as such he or she probably wants to use that font instead. So the expected behavior in that case is to reset the zoom level. But it’s left as an exercise for another class, sinceTepl.Settings
is only forGio.Settings
.New in version 6.2.