Update remoteManager.py
This commit is contained in:
parent
c3ab4fabcb
commit
44c75a90ee
@ -46,7 +46,8 @@ class remoteManager():
|
|||||||
# setting controll
|
# setting controll
|
||||||
self.settingConst = 'SETTING '
|
self.settingConst = 'SETTING '
|
||||||
self.setSettingConst = 'SET '
|
self.setSettingConst = 'SET '
|
||||||
self.saveSettingConst = 'SAVE '
|
self.saveAsSettingConst = 'SAVEAS '
|
||||||
|
self.saveSettingConst = 'SAVE'
|
||||||
self.resetSettingConst = 'RESET'
|
self.resetSettingConst = 'RESET'
|
||||||
def initialize(self, environment):
|
def initialize(self, environment):
|
||||||
self.env = environment
|
self.env = environment
|
||||||
@ -64,10 +65,13 @@ class remoteManager():
|
|||||||
if upperSettingsText.startswith(self.setSettingConst):
|
if upperSettingsText.startswith(self.setSettingConst):
|
||||||
parameterText = settingsText[len(self.setSettingConst):]
|
parameterText = settingsText[len(self.setSettingConst):]
|
||||||
self.setSettings(parameterText)
|
self.setSettings(parameterText)
|
||||||
|
# save as setting
|
||||||
|
if upperSettingsText.startswith(self.saveAsSettingConst):
|
||||||
|
parameterText = settingsText[len(self.saveAsSettingConst):]
|
||||||
|
self.saveSettings(parameterText)
|
||||||
# save setting
|
# save setting
|
||||||
if upperSettingsText.startswith(self.saveSettingConst):
|
if upperSettingsText.startswith(self.saveSettingConst):
|
||||||
parameterText = settingsText[len(self.saveSettingConst):]
|
self.saveSettings()
|
||||||
self.saveSettings(parameterText)
|
|
||||||
# reset setting
|
# reset setting
|
||||||
if upperSettingsText.startswith(self.resetSettingConst):
|
if upperSettingsText.startswith(self.resetSettingConst):
|
||||||
self.resetSettings()
|
self.resetSettings()
|
||||||
@ -144,9 +148,9 @@ class remoteManager():
|
|||||||
self.env['runtime']['outputManager'].speakText(text)
|
self.env['runtime']['outputManager'].speakText(text)
|
||||||
def interruptSpeech(self):
|
def interruptSpeech(self):
|
||||||
self.env['runtime']['outputManager'].interruptOutput()
|
self.env['runtime']['outputManager'].interruptOutput()
|
||||||
def saveSettings(self, settingConfigPath):
|
def saveSettings(self, settingConfigPath = None):
|
||||||
if not settingConfigPath:
|
if not settingConfigPath:
|
||||||
return
|
settingConfigPath = self.env['runtime']['settingsManager'].getSettingsFile()
|
||||||
if settingConfigPath == '':
|
if settingConfigPath == '':
|
||||||
return
|
return
|
||||||
self.env['runtime']['settingsManager'].saveSettings(settingConfigPath)
|
self.env['runtime']['settingsManager'].saveSettings(settingConfigPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user