manpagez: man pages & more
html files: gio
Home | html | info | man

Conceptual differences

Conceptually, GConf and GSettings are fairly similar. Both have a concept of pluggable backends. Both keep information about keys and their types in schemas. Both have a concept of mandatory values, which lets you implement lock-down.

There are some differences in the approach to schemas. GConf installs the schemas into the database and has API to handle schema information (gconf_client_get_default_from_schema(), gconf_value_get_schema(), etc). GSettings on the other hand assumes that an application knows its own schemas, and does not provide API to handle schema information at runtime. GSettings is also more strict about requiring a schema whenever you want to read or write a key. To deal with more free-form information that would appear in schema-less entries in GConf, GSettings allows for schemas to be 'relocatable'.

One difference in the way applications interact with their settings is that with GConf you interact with a tree of settings (ie the keys you pass to functions when reading or writing values are actually paths with the actual name of the key as the last element. With GSettings, you create a GSettings object which has an implicit prefix that determines where the settings get stored in the global tree of settings, but the keys you pass when reading or writing values are just the key names, not the full path.

© 2000-2024
Individual documents may contain additional copyright information.