Panel.Settings

g GObject.GInterface GObject.GInterface Gio.ActionGroup Gio.ActionGroup GObject.GInterface->Gio.ActionGroup GObject.Object GObject.Object Panel.Settings Panel.Settings GObject.Object->Panel.Settings Gio.ActionGroup->Panel.Settings

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.ActionGroup (14)

Structs:

GObject.ObjectClass (5)

class

new (identifier, schema_id)

class

new_relocatable (identifier, schema_id, schema_id_prefix, path_prefix, path_suffix)

class

new_with_path (identifier, schema_id, path)

class

resolve_schema_path (schema_id_prefix, schema_id, identifier, path_prefix, path_suffix)

bind (key, object, property, flags)

bind_with_mapping (key, object, property, flags, get_mapping, set_mapping, *user_data)

get_boolean (key)

get_default_value (key)

get_double (key)

get_int (key)

get_schema_id ()

get_string (key)

get_uint (key)

get_user_value (key)

get_value (key)

set_boolean (key, val)

set_double (key, val)

set_int (key, val)

set_string (key, val)

set_uint (key, val)

set_value (key, value)

unbind (property)

Virtual Methods

Inherited:

GObject.Object (7), Gio.ActionGroup (14)

Properties

Name

Type

Flags

Short Description

identifier

str

r/w/co

The identifier used to unique’ify this settings instance

path

str

r/w/co

The path to use for for app settings

path-prefix

str

r/w/co

A path prefix to preprend when generating schema paths

path-suffix

str

r/w/co

A path suffix to append when generating schema paths

schema-id

str

r/w/co

Schema ID

schema-id-prefix

str

r/w/co

The prefix for schema-ids used when generating paths

Signals

Inherited:

GObject.Object (1), Gio.ActionGroup (4)

Name

Short Description

changed

Fields

Inherited:

GObject.Object (1), Gio.ActionGroup (4)

Class Details

class Panel.Settings(**kwargs)
Bases:

GObject.Object, Gio.ActionGroup

Abstract:

No

Structure:

Panel.SettingsClass

classmethod new(identifier, schema_id)
Parameters:
  • identifier (str) –

  • schema_id (str) –

Return type:

Panel.Settings

classmethod new_relocatable(identifier, schema_id, schema_id_prefix, path_prefix, path_suffix)
Parameters:
  • identifier (str) –

  • schema_id (str) –

  • schema_id_prefix (str) –

  • path_prefix (str) –

  • path_suffix (str) –

Return type:

Panel.Settings

classmethod new_with_path(identifier, schema_id, path)
Parameters:
  • identifier (str) –

  • schema_id (str) –

  • path (str) –

Return type:

Panel.Settings

classmethod resolve_schema_path(schema_id_prefix, schema_id, identifier, path_prefix, path_suffix)
Parameters:
  • schema_id_prefix (str) –

  • schema_id (str) –

  • identifier (str) –

  • path_prefix (str) –

  • path_suffix (str) –

Return type:

str

bind(key, object, property, flags)
Parameters:
bind_with_mapping(key, object, property, flags, get_mapping, set_mapping, *user_data)
Parameters:

Like Panel.Settings.bind() but allows transforming to and from settings storage using get_mapping and set_mapping transformation functions.

Call Panel.Settings.unbind() to unbind the mapping.

get_boolean(key)
Parameters:

key (str) –

Return type:

bool

get_default_value(key)
Parameters:

key (str) –

Return type:

GLib.Variant

get_double(key)
Parameters:

key (str) –

Return type:

float

get_int(key)
Parameters:

key (str) –

Return type:

int

get_schema_id()
Return type:

str

get_string(key)
Parameters:

key (str) –

Return type:

str

get_uint(key)
Parameters:

key (str) –

Return type:

int

get_user_value(key)
Parameters:

key (str) – the key to get the user value for

Returns:

the user’s value, if set

Return type:

GLib.Variant or None

get_value(key)
Parameters:

key (str) –

Return type:

GLib.Variant

set_boolean(key, val)
Parameters:
set_double(key, val)
Parameters:
set_int(key, val)
Parameters:
set_string(key, val)
Parameters:
set_uint(key, val)
Parameters:
set_value(key, value)
Parameters:
unbind(property)
Parameters:

property (str) –

Signal Details

Panel.Settings.signals.changed(settings, object)
Signal Name:

changed

Flags:

RUN_LAST, DETAILED

Parameters:
  • settings (Panel.Settings) – The object which received the signal

  • object (str) –

Property Details

Panel.Settings.props.identifier
Name:

identifier

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The “identifier” property is used to make unique paths.

This might be a unique “project-id” for example, in an IDE.

Panel.Settings.props.path
Name:

path

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The path to use for for app settings

Panel.Settings.props.path_prefix
Name:

path-prefix

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

A path prefix to preprend when generating schema paths

Panel.Settings.props.path_suffix
Name:

path-suffix

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

A path suffix to append when generating schema paths

Panel.Settings.props.schema_id
Name:

schema-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Schema ID

Panel.Settings.props.schema_id_prefix
Name:

schema-id-prefix

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The prefix for schema-ids used when generating paths