Skip to content

Commit b55f6a7

Browse files
committed
validate configuration when changing from secons to ms.
1 parent 6c78fd6 commit b55f6a7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

addon/globalPlugins/enhancedPhoneticReading.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
8787
def __init__(self):
8888
super(globalPluginHandler.GlobalPlugin, self).__init__()
8989
gui.settingsDialogs.NVDASettingsDialog.categoryClasses.append(EnhancedPhoneticReadingPanel)
90+
self.validateConfig()
9091
speech.speakTextInfo = speakTextInfo
9192
speech.speak = speak
9293
speech.speakSpelling = speakSpelling
@@ -117,3 +118,12 @@ def terminate(self):
117118
speech.speakSpelling = origSpeakSpelling
118119
speech.cancelSpeech = origCancelSpeech
119120
gui.settingsDialogs.NVDASettingsDialog.categoryClasses.remove(EnhancedPhoneticReadingPanel)
121+
122+
def validateConfig(self):
123+
try:
124+
config.conf['enhancedPhoneticReading']['delay']
125+
except:
126+
config.conf['enhancedPhoneticReading']['delay'] = 1000
127+
128+
def handleConfigProfileSwitch(self):
129+
self.validateConfig()

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Changes for 1.1-dev ##
22
updated the way of using timers, now wx.CallLater is used instead. This should fix an incompatibility with bluetoothAudio add-on.
3+
updated now delay config is saved in ms.
34

45
## Changes for 1.0 ##
56
Updated manifest to add compatibility with NVDA 2021.3.1.

0 commit comments

Comments
 (0)