Skip to content

gregistrysettingsbackend: Allow a different root key path

Dario Saccavino requested to merge dsacc/glib:registry-settings-root-key into main

The purpose of this patch is to overcome the limitation that GSettings can only store settings under HKEY_CURRENT_USER\Software\GSettings.

This allows an application to keep its installation-time settings in a registry key under e.g. HKEY_LOCAL_MACHINE\Software\Something, while making those settings readable by a regular process using GSettings.

The patch adds:

  • a construct-only registry-key property to GSettingsBackend, containing the full path to the base registry key where settings are stored.
  • a public function g_registry_settings_backend_new to construct the registry backend, optionally specifying a root key path.

Merge request reports