module-gsettings: new module to store configuration using gsettings
authorSylvain Baubeau <lebauce@gmail.com>
Mon, 25 Jul 2016 19:58:48 +0000 (21:58 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 19 Apr 2018 11:30:30 +0000 (14:30 +0300)
commit785b660d8a3854204dbb85f025dbe95df1e3c4fd
tree1c219ebb885e36f076ab36e5171b71c9ce987ab8
parentba2b748d40f78b9d9f945b5422ca74d05f8d0d07
module-gsettings: new module to store configuration using gsettings

GConf is deprecated, and distributions are removing it. paprefs depends
on GConf, so in order to avoid paprefs getting removed as well, paprefs
has to be changed to use something else than GConf. GSettings is the
easiest alternative to migrate to, although it has the same problems
that GConf had: no support for system mode or networking.

This patch takes the non-GConf specific code from module-gconf and puts
it in stdin-util.[ch], which is then reused by module-gsettings.
module-gsettings is designed to be very similar to module-gconf.

Migration is expected to happen as follows: Distributions update
PulseAudio and paprefs at the same time, or first PulseAudio and then
paprefs. paprefs depends on module-gsettings, and module-gsettings
conflicts with module-gconf. Therefore module-gconf gets automatically
removed during the paprefs update. After the update an old PulseAudio is
likely to be running with module-gconf loaded. If the user tries to use
paprefs during this period, whatever the user does in paprefs won't have
any effect until PulseAudio is restarted (probably by a reboot or
relogin). This is not ideal, but will have to do.

When module-gsettings is loaded, it runs gsettings-data-convert
(implemented in a later patch). That will copy the settings from GConf
to GSettings. If gsettings-data-convert is not available (it's part of
GConf, so it may have already been uninstalled), then any previous
paprefs settings are lost.
configure.ac
src/Makefile.am
src/modules/gconf/module-gconf.c
src/modules/gsettings/gsettings-helper.c [new file with mode: 0644]
src/modules/gsettings/module-gsettings.c [new file with mode: 0644]
src/modules/gsettings/org.freedesktop.pulseaudio.gschema.xml [new file with mode: 0644]
src/modules/stdin-util.c [new file with mode: 0644]
src/modules/stdin-util.h [new file with mode: 0644]