Settings#

class Settings(**properties: Any)#

Superclasses: Object

A representation of the settings exposed by the portal.

The Settings object is used to access and observe the settings exposed by xdg-desktop-portal.

It is obtained from get_settings. Call read_value to read a settings value. Connect to changed to observe value changes.

Methods#

class Settings
read_all_values(namespaces: str, cancellable: Cancellable | None = None) Variant#

Read all the setting values within namespace.

Parameters:
  • namespaces – List of namespaces to filter results by, supports simple globbing explained below.

  • cancellable – a GCancellable or NULL.

read_string(namespace: str, key: str, cancellable: Cancellable | None = None) str#

Read a setting value as unsigned int within namespace, with key.

Parameters:
  • namespace – the namespace of the value.

  • key – the key of the value.

  • cancellable – a GCancellable or NULL.

read_uint(namespace: str, key: str, cancellable: Cancellable | None = None) int#

Read a setting value as unsigned int within namespace, with key.

Parameters:
  • namespace – the namespace of the value.

  • key – the key of the value.

  • cancellable – a GCancellable or NULL.

read_value(namespace: str, key: str, cancellable: Cancellable | None = None) Variant#

Read a setting value within namespace, with key.

Parameters:
  • namespace – the namespace of the value.

  • key – the key of the value.

  • cancellable – a GCancellable or NULL.

Signals#

class Settings.signals
changed(namespace: str, key: str, value: Variant) None#

The type of the None singleton.

Parameters:
  • namespace – the value namespace

  • key – the value key

  • value – the value