From: Michael Curran Date: Wed, 7 Nov 2012 06:29:04 +0000 (+1000) Subject: synthDriverHandler.setSynth now takes a isFallback keyword argument which is set... X-Git-Tag: jpdev130418~441 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d0e9429e08eb14bde5b0b60ccfbd20ebe52b0233;p=nvdajp%2Fnvdajp.git synthDriverHandler.setSynth now takes a isFallback keyword argument which is set to false by default. If set to true, it will not set the new synth as the synth of choice in the configuration after it successfully loads it. If setSynth calls setSynth again due to a synth failing, isFallback is passed in as true. These changes mean that if a synth fails on NVDA start-up, the configuration won't be changed, thus the origianl synth will be tried again the next time NVDA is started. --- diff --git a/source/synthDriverHandler.py b/source/synthDriverHandler.py index e65426899..deae76176 100644 --- a/source/synthDriverHandler.py +++ b/source/synthDriverHandler.py @@ -59,7 +59,7 @@ def getSynthList(): def getSynth(): return _curSynth -def setSynth(name): +def setSynth(name,isFallback=False): global _curSynth if name is None: _curSynth.terminate() @@ -89,17 +89,18 @@ def setSynth(name): changeVoice(newSynth,voice) newSynth.saveSettings() #save defaults _curSynth=newSynth - config.conf["speech"]["synth"]=name + if not isFallback: + config.conf["speech"]["synth"]=name log.info("Loaded synthDriver %s"%name) return True except: log.error("setSynth", exc_info=True) if prevSynthName: - setSynth(prevSynthName) + setSynth(prevSynthName,isFallback=True) elif name not in ('espeak','silence'): - setSynth('espeak') + setSynth('espeak',isFallback=True) elif name=='espeak': - setSynth('silence') + setSynth('silence',isFallback=True) return False class SynthSetting(object): diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index 29cbd89e0..9a897bd7f 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -11,7 +11,8 @@ == Bug Fixes == - The quick navigation keys for jumping to the next or previous separator in Browse Mode now works in Internet Explorer and other MSHTML controls. (#2781) - +- If NVDA falls back to eSpeak or no speech due to a configured speech synthesizer failing when NVDA starts, the configuration is no longer updated to set the fallback synthesizer as the configured choice, meaning that now the original synthesizer will be tried again next time NVDA starts. + = 2012.3 = Highlights of this release include support for Asian character input; experimental support for touch screens on Windows 8; reporting of page numbers and improved support for tables in Adobe Reader; table navigation commands in focused table rows and Windows list-view controls; support for several more braille displays; and reporting of row and column headers in Microsoft Excel.