add Temp Disable Speech to remoteManager
This commit is contained in:
parent
ddcd0b9071
commit
3461b88969
@ -17,11 +17,7 @@ class command():
|
||||
return _('disables speech until next keypress')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_("speech temporary disabled"), soundIcon='SpeechOff', interrupt=True)
|
||||
self.env['commandBuffer']['enableSpeechOnKeypress'] = True
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
self.env['runtime']['outputManager'].tempDisableSpeech()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -292,7 +292,12 @@ class outputManager():
|
||||
return False
|
||||
|
||||
return False
|
||||
|
||||
def tempDisableSpeech(self):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
|
||||
self.presentText(_("speech temporary disabled"), soundIcon='SpeechOff', interrupt=True)
|
||||
self.env['commandBuffer']['enableSpeechOnKeypress'] = True
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
|
||||
self.interruptOutput()
|
||||
def announceActiveCursor(self, interrupt_p=False):
|
||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.presentText(' review cursor ', interrupt=interrupt_p)
|
||||
|
@ -39,6 +39,7 @@ class remoteManager():
|
||||
self.resetVmenuConst = 'RESETVMENU'
|
||||
self.interruptConst = 'INTERRUPT'
|
||||
self.quitAppConst = 'QUITAPPLICATION'
|
||||
self.tempDisableSpeechConst = 'TEMPDISABLESPEECH'
|
||||
self.defineWindowConst = 'WINDOW '
|
||||
self.resetWindowConst = 'RESETWINDOW'
|
||||
self.setClipboardConst = 'CLIPBOARD '
|
||||
@ -70,6 +71,7 @@ class remoteManager():
|
||||
# reset setting
|
||||
if upperSettingsText.startswith(self.resetSettingConst):
|
||||
self.resetSettings()
|
||||
|
||||
def handleCommandExecution(self, commandText):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('remote', 'enableCommandRemote'):
|
||||
return
|
||||
@ -83,6 +85,9 @@ class remoteManager():
|
||||
# interrupt
|
||||
if upperCommandText.startswith(self.interruptConst):
|
||||
self.interruptSpeech()
|
||||
# temp disable speech
|
||||
if upperCommandText.startswith(self.tempDisableSpeechConst):
|
||||
self.tempDisableSpeech()
|
||||
# set vmenu
|
||||
if upperCommandText.startswith(self.vmenuConst):
|
||||
parameterText = commandText[len(self.vmenuConst):]
|
||||
@ -104,6 +109,8 @@ class remoteManager():
|
||||
if upperCommandText.startswith(self.setClipboardConst):
|
||||
parameterText = commandText[len(self.setClipboardConst):]
|
||||
self.setClipboard(parameterText)
|
||||
def tempDisableSpeech(self):
|
||||
self.env['runtime']['outputManager'].tempDisableSpeech()
|
||||
def setVMenu(self, vmenu = ''):
|
||||
self.env['runtime']['vmenuManager'].setCurrMenu(vmenu)
|
||||
def resetVMenu(self):
|
||||
|
Loading…
Reference in New Issue
Block a user