- # FIXME: should use the Keyfile backend, but that's not available from
- # Python
- self.prefs_settings = Gio.Settings('org.chimara-if.player.preferences')
- self.state_settings = Gio.Settings('org.chimara-if.player.state')
+ if os.path.exists('chimara-config'):
+ keyfile = 'chimara-config'
+ else:
+ keyfile = os.path.expanduser('~/.chimara/config')
+ try:
+ # This only works on my custom-built gobject-introspection; opened
+ # bug #682702
+ backend = Gio.keyfile_settings_backend_new(keyfile, "/org/chimara-if/player/", None)
+ except AttributeError:
+ backend = None
+ self.prefs_settings = Gio.Settings('org.chimara-if.player.preferences', backend=backend)
+ self.state_settings = Gio.Settings('org.chimara-if.player.state', backend=backend)