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')
|
return _('disables speech until next keypress')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
|
self.env['runtime']['outputManager'].tempDisableSpeech()
|
||||||
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()
|
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
@ -292,7 +292,12 @@ class outputManager():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
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):
|
def announceActiveCursor(self, interrupt_p=False):
|
||||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||||
self.presentText(' review cursor ', interrupt=interrupt_p)
|
self.presentText(' review cursor ', interrupt=interrupt_p)
|
||||||
|
@ -39,6 +39,7 @@ class remoteManager():
|
|||||||
self.resetVmenuConst = 'RESETVMENU'
|
self.resetVmenuConst = 'RESETVMENU'
|
||||||
self.interruptConst = 'INTERRUPT'
|
self.interruptConst = 'INTERRUPT'
|
||||||
self.quitAppConst = 'QUITAPPLICATION'
|
self.quitAppConst = 'QUITAPPLICATION'
|
||||||
|
self.tempDisableSpeechConst = 'TEMPDISABLESPEECH'
|
||||||
self.defineWindowConst = 'WINDOW '
|
self.defineWindowConst = 'WINDOW '
|
||||||
self.resetWindowConst = 'RESETWINDOW'
|
self.resetWindowConst = 'RESETWINDOW'
|
||||||
self.setClipboardConst = 'CLIPBOARD '
|
self.setClipboardConst = 'CLIPBOARD '
|
||||||
@ -70,6 +71,7 @@ class remoteManager():
|
|||||||
# reset setting
|
# reset setting
|
||||||
if upperSettingsText.startswith(self.resetSettingConst):
|
if upperSettingsText.startswith(self.resetSettingConst):
|
||||||
self.resetSettings()
|
self.resetSettings()
|
||||||
|
|
||||||
def handleCommandExecution(self, commandText):
|
def handleCommandExecution(self, commandText):
|
||||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('remote', 'enableCommandRemote'):
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('remote', 'enableCommandRemote'):
|
||||||
return
|
return
|
||||||
@ -83,6 +85,9 @@ class remoteManager():
|
|||||||
# interrupt
|
# interrupt
|
||||||
if upperCommandText.startswith(self.interruptConst):
|
if upperCommandText.startswith(self.interruptConst):
|
||||||
self.interruptSpeech()
|
self.interruptSpeech()
|
||||||
|
# temp disable speech
|
||||||
|
if upperCommandText.startswith(self.tempDisableSpeechConst):
|
||||||
|
self.tempDisableSpeech()
|
||||||
# set vmenu
|
# set vmenu
|
||||||
if upperCommandText.startswith(self.vmenuConst):
|
if upperCommandText.startswith(self.vmenuConst):
|
||||||
parameterText = commandText[len(self.vmenuConst):]
|
parameterText = commandText[len(self.vmenuConst):]
|
||||||
@ -104,6 +109,8 @@ class remoteManager():
|
|||||||
if upperCommandText.startswith(self.setClipboardConst):
|
if upperCommandText.startswith(self.setClipboardConst):
|
||||||
parameterText = commandText[len(self.setClipboardConst):]
|
parameterText = commandText[len(self.setClipboardConst):]
|
||||||
self.setClipboard(parameterText)
|
self.setClipboard(parameterText)
|
||||||
|
def tempDisableSpeech(self):
|
||||||
|
self.env['runtime']['outputManager'].tempDisableSpeech()
|
||||||
def setVMenu(self, vmenu = ''):
|
def setVMenu(self, vmenu = ''):
|
||||||
self.env['runtime']['vmenuManager'].setCurrMenu(vmenu)
|
self.env['runtime']['vmenuManager'].setCurrMenu(vmenu)
|
||||||
def resetVMenu(self):
|
def resetVMenu(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user