Skip to content
Permalink
Browse files

Store speech priorities in an enum (PR #10471)

  • Loading branch information...
leonardder authored and feerrenrut committed Nov 8, 2019
1 parent df0211c commit 0124e647c2c58f04370b9ec5c9fd8ba957315441
@@ -1469,10 +1469,10 @@ def event_alert(self):
api.processPendingEvents()
if self in api.getFocusAncestors():
return
speech.speakObject(self, reason=controlTypes.REASON_FOCUS,priority=speech.SPRI_NOW)
speech.speakObject(self, reason=controlTypes.REASON_FOCUS, priority=speech.Spri.NOW)
for child in self.recursiveDescendants:
if controlTypes.STATE_FOCUSABLE in child.states:
speech.speakObject(child, reason=controlTypes.REASON_FOCUS,priority=speech.SPRI_NOW)
speech.speakObject(child, reason=controlTypes.REASON_FOCUS, priority=speech.Spri.NOW)

def event_caret(self):
focus = api.getFocusObject()
@@ -178,7 +178,7 @@ def fetchAppModule(processID,appName):
# Translators: This is presented when errors are found in an appModule
# (example output: error in appModule explorer).
_("Error in appModule %s") % modName,
speechPriority=speech.priorities.SPRI_NOW
speechPriority=speech.priorities.Spri.NOW
)

# Use the base AppModule.
@@ -2385,7 +2385,7 @@ def script_toggleScreenCurtain(self, gesture):
message = _("Screen curtain enabled")
finally:
if message is not None:
ui.message(message, speechPriority=speech.priorities.SPRI_NOW)
ui.message(message, speechPriority=speech.priorities.Spri.NOW)

__gestures = {
# Basic

0 comments on commit 0124e64

Please sign in to comment.
You can’t perform that action at this time.