OSDN Git Service

Object navigation commands (except the report current object command) now report...
authorJames Teh <jamie@jantrid.net>
Mon, 13 Aug 2012 00:26:37 +0000 (10:26 +1000)
committerJames Teh <jamie@jantrid.net>
Mon, 13 Aug 2012 00:26:37 +0000 (10:26 +1000)
Specifically, REASON_FOCUS is used for these scripts instead of REASON_QUERY.
Fixes #2560.

source/globalCommands.py
user_docs/en/changes.t2t

index a073e91..00ef4d3 100755 (executable)
@@ -267,7 +267,7 @@ class GlobalCommands(ScriptableObject):
                        obj=None\r
                if obj and obj!=pos.obj:\r
                        api.setNavigatorObject(obj)\r
-                       speech.speakObject(obj)\r
+                       speech.speakObject(obj,reason=controlTypes.REASON_FOCUS)\r
                else:\r
                        speech.speakMessage(_("No object at flat review position"))\r
        script_navigatorObject_moveToObjectAtFlatReviewPosition.__doc__=_("Moves navigator object to the object represented by the text at the position of the review cursor within flat review")\r
@@ -335,7 +335,7 @@ class GlobalCommands(ScriptableObject):
                        pos=obj.makeTextInfo(textInfos.POSITION_FIRST)\r
                api.setReviewPosition(pos)\r
                speech.speakMessage(_("move to focus"))\r
-               speech.speakObject(obj,reason=controlTypes.REASON_QUERY)\r
+               speech.speakObject(obj,reason=controlTypes.REASON_FOCUS)\r
        script_navigatorObject_toFocus.__doc__=_("Sets the navigator object to the current focus, and the review cursor to the position of the caret inside it, if possible.")\r
 \r
        def script_navigatorObject_moveFocus(self,gesture):\r
@@ -366,7 +366,7 @@ class GlobalCommands(ScriptableObject):
                curObject=curObject.simpleParent if simpleReviewMode else curObject.parent\r
                if curObject is not None:\r
                        api.setNavigatorObject(curObject)\r
-                       speech.speakObject(curObject,reason=controlTypes.REASON_QUERY)\r
+                       speech.speakObject(curObject,reason=controlTypes.REASON_FOCUS)\r
                else:\r
                        speech.speakMessage(_("No containing object"))\r
        script_navigatorObject_parent.__doc__=_("Moves the navigator object to the object containing it")\r
@@ -380,7 +380,7 @@ class GlobalCommands(ScriptableObject):
                curObject=curObject.simpleNext if simpleReviewMode else curObject.next\r
                if curObject is not None:\r
                        api.setNavigatorObject(curObject)\r
-                       speech.speakObject(curObject,reason=controlTypes.REASON_QUERY)\r
+                       speech.speakObject(curObject,reason=controlTypes.REASON_FOCUS)\r
                else:\r
                        speech.speakMessage(_("No next"))\r
        script_navigatorObject_next.__doc__=_("Moves the navigator object to the next object")\r
@@ -394,7 +394,7 @@ class GlobalCommands(ScriptableObject):
                curObject=curObject.simplePrevious if simpleReviewMode else curObject.previous\r
                if curObject is not None:\r
                        api.setNavigatorObject(curObject)\r
-                       speech.speakObject(curObject,reason=controlTypes.REASON_QUERY)\r
+                       speech.speakObject(curObject,reason=controlTypes.REASON_FOCUS)\r
                else:\r
                        speech.speakMessage(_("No previous"))\r
        script_navigatorObject_previous.__doc__=_("Moves the navigator object to the previous object")\r
@@ -408,7 +408,7 @@ class GlobalCommands(ScriptableObject):
                curObject=curObject.simpleFirstChild if simpleReviewMode else curObject.firstChild\r
                if curObject is not None:\r
                        api.setNavigatorObject(curObject)\r
-                       speech.speakObject(curObject,reason=controlTypes.REASON_QUERY)\r
+                       speech.speakObject(curObject,reason=controlTypes.REASON_FOCUS)\r
                else:\r
                        speech.speakMessage(_("No objects inside"))\r
        script_navigatorObject_firstChild.__doc__=_("Moves the navigator object to the first object inside it")\r
index ba0527c..6ebaff9 100644 (file)
@@ -31,6 +31,7 @@
 - When updating a previously installed copy of NVDA, the desktop shortcut key is no longer forced back to control+alt+n if it was manually changed to something different by the user. (#2572)\r
 - The add-ons list in the Add-ons Manager now shows the package name before its status. (#2548)\r
 - If installing the same or another version of a currently installed add-on, NVDA will ask if you wish to remove the old add-on first, rather than just showing an error and aborting installation. (#2501)\r
+- Object navigation commands (except the report current object command) now report with less verbosity. You can still obtain the extra information by using the report current object command. (#2560)\r
 \r
 \r
 == Bug Fixes ==\r