Update toggle_speech.py

This commit is contained in:
chrys 2019-01-07 13:50:20 +01:00 committed by GitHub
parent 7e82042661
commit c1c20f8a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,7 @@ class command():
def run(self):
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
self.env['runtime']['outputManager'].interruptOutput()
self.env['runtime']['outputManager'].presentText(_('speech disabled'), soundIcon='SpeechOff', interrupt=True)
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):