OSDN Git Service

speech.getControlFieldSpeech: Don't report descriptions if the user has disabled...
authorJames Teh <jamie@jantrid.net>
Thu, 9 Jun 2011 23:58:01 +0000 (09:58 +1000)
committerJames Teh <jamie@jantrid.net>
Thu, 9 Jun 2011 23:58:01 +0000 (09:58 +1000)
source/speech.py

index 2aa4104..ba2d2d1 100755 (executable)
@@ -807,7 +807,8 @@ def getControlFieldSpeech(attrs,ancestorAttrs,fieldType,formatConfig=None,extraD
        stateText=getSpeechTextForProperties(reason=reason,states=states,_role=role)\r
        keyboardShortcutText=getSpeechTextForProperties(reason=reason,keyboardShortcut=keyboardShortcut) if config.conf["presentation"]["reportKeyboardShortcuts"] else ""\r
        nameText=getSpeechTextForProperties(reason=reason,name=name)\r
-       descriptionText=getSpeechTextForProperties(reason=reason,description=description)\r
+       descriptionText=(getSpeechTextForProperties(reason=reason,description=description)\r
+               if config.conf["presentation"]["reportObjectDescriptions"] else "")\r
        levelText=getSpeechTextForProperties(reason=reason,positionInfo_level=level)\r
 \r
        # Determine under what circumstances this node should be spoken.\r