Comment 2 for bug 836443

Revision history for this message
Jeremy BĂ­cha (jbicha) wrote :

An exception to the broken gconf is gnome-tweak-tool which is still able to set gconf values (like the previously mentioned window theme). gnome-tweak-tool uses the following code:

from gi.repository import GConf

class GConfSetting:
    def __init__(self, key, _type):
        self._key = key
        self._type = _type
        assert(self._type in (str, bool))
        self._client = GConf.Client.get_default()

    def set_value(self, value):
        if self._type == bool:
            self._client.set_bool(self._key, value)
        elif self._type == str:
            self._client.set_string(self._key, value)
        else:
            assert(False)