Update settingsManager.py
This commit is contained in:
parent
3465b96bc6
commit
470bb0c1c6
@ -134,19 +134,26 @@ class settingsManager():
|
|||||||
def initFenrirConfig(self):
|
def initFenrirConfig(self):
|
||||||
return self.reInitFenrirConfig(environment.environment)
|
return self.reInitFenrirConfig(environment.environment)
|
||||||
|
|
||||||
def reInitFenrirConfig(self, environment):
|
def reInitFenrirConfig(self, environment, settingsRoot = '/etc/fenrir/'):
|
||||||
|
|
||||||
environment['runtime']['settingsManager'] = self
|
environment['runtime']['settingsManager'] = self
|
||||||
environment['runtime']['inputManager'] = inputManager.inputManager()
|
environment['runtime']['inputManager'] = inputManager.inputManager()
|
||||||
environment['runtime']['outputManager'] = outputManager.outputManager()
|
environment['runtime']['outputManager'] = outputManager.outputManager()
|
||||||
environment = environment['runtime']['settingsManager'].loadSettings(environment)
|
environment = environment['runtime']['settingsManager'].loadSettings(environment)
|
||||||
if not os.path.exists(self.getSetting('keyboard','keyboardLayout')):
|
if not os.path.exists(self.getSetting('keyboard','keyboardLayout')):
|
||||||
if os.path.exists('/etc/fenrir/'+ self.getSetting('keyboard','keyboardLayout')):
|
if os.path.exists(settingsRoot + 'keyboard/' + self.getSetting('keyboard','keyboardLayout')):
|
||||||
self.setSetting(environment, 'keyboard', 'keyboardLayout', '/etc/fenrir/'+ self.getSetting('keyboard','keyboardLayout')):
|
self.setSetting(environment, 'keyboard', 'keyboardLayout', settingsRoot + 'keyboard/' + self.getSetting('keyboard','keyboardLayout')):
|
||||||
if os.path.exists('/etc/fenrir/'+ self.getSetting('keyboard','keyboardLayout') + '.conf'):
|
if os.path.exists(settingsRoot + 'keyboard/' + self.getSetting('keyboard','keyboardLayout') + '.conf'):
|
||||||
self.setSetting(environment, 'keyboard', 'keyboardLayout', '/etc/fenrir/'+ self.getSetting('keyboard','keyboardLayout') + '.conf'):
|
self.setSetting(environment, 'keyboard', 'keyboardLayout', settingsRoot + 'keyboard/' + self.getSetting('keyboard','keyboardLayout') + '.conf'):
|
||||||
environment = environment['runtime']['settingsManager'].loadShortcuts(environment, self.getSetting('keyboard','keyboardLayout'))
|
environment = environment['runtime']['settingsManager'].loadShortcuts(environment, self.getSetting('keyboard','keyboardLayout'))
|
||||||
|
|
||||||
|
if not os.path.exists(self.getSetting('sound','theme')):
|
||||||
|
if os.path.exists(settingsRoot + 'sound/'+ self.getSetting('sound','theme')):
|
||||||
|
self.setSetting(environment, 'sound', 'theme', settingsRoot + 'theme/'+ self.getSetting('sound','theme')):
|
||||||
|
if os.path.exists(settingsRoot + 'sound/'+ self.getSetting('sound','theme') + '.conf'):
|
||||||
|
self.setSetting(environment, 'sound', 'theme', settingsRoot + 'keyboard/'+ self.getSetting('sound','theme') + '.conf'):
|
||||||
|
environment = environment['runtime']['settingsManager'].loadSoundIcons(environment, self.getSetting('sound','theme'))
|
||||||
|
|
||||||
environment['runtime']['commandManager'] = commandManager.commandManager()
|
environment['runtime']['commandManager'] = commandManager.commandManager()
|
||||||
environment = environment['runtime']['commandManager'].loadCommands(environment,'commands')
|
environment = environment['runtime']['commandManager'].loadCommands(environment,'commands')
|
||||||
environment = environment['runtime']['commandManager'].loadCommands(environment,'onInput')
|
environment = environment['runtime']['commandManager'].loadCommands(environment,'onInput')
|
||||||
|
Loading…
Reference in New Issue
Block a user