OSDN Git Service

Windows 8 Toast notifications:
authorJames Teh <jamie@jantrid.net>
Fri, 12 Oct 2012 03:30:37 +0000 (13:30 +1000)
committerJames Teh <jamie@jantrid.net>
Fri, 12 Oct 2012 03:30:37 +0000 (13:30 +1000)
* Don't move the navigator object. Keyboard users can press Windows+v to focus them. Touch users can touch the top right of the screen.
* Only report when reporting of help balloons is enabled.
* Report in braille as well as speech.
Fixes #2143.

source/NVDAObjects/UIA/__init__.py
user_docs/en/changes.t2t

index 14afd41..decb454 100644 (file)
@@ -19,6 +19,7 @@ from logHandler import log
 from NVDAObjects.window import Window\r
 from NVDAObjects import NVDAObjectTextInfo, InvalidNVDAObject\r
 from NVDAObjects.behaviors import ProgressBar, EditableTextWithoutAutoSelectDetection, Dialog\r
+import braille\r
 \r
 class UIATextInfo(textInfos.TextInfo):\r
 \r
@@ -739,8 +740,11 @@ class Dialog(Dialog):
 class Toast(UIA):\r
 \r
        def event_alert(self):\r
-               speech.speakObject(self)\r
-               api.setNavigatorObject(self)\r
+               if not config.conf["presentation"]["reportHelpBalloons"]:\r
+                       return\r
+               speech.speakObject(self,reason=controlTypes.REASON_FOCUS)\r
+               # TODO: Don't use getBrailleTextForProperties directly.\r
+               braille.handler.message(braille.getBrailleTextForProperties(name=self.name, role=self.role))\r
 \r
 class GridTileElement(UIA):\r
 \r
index 8c5785d..3c34058 100644 (file)
@@ -15,7 +15,7 @@ Highlights of this release include support for Asian character input; experiment
 - When the Windows Sticky Keys function is enabled, the NVDA modifier key will now behave like other modifier keys. This allows you to use the NVDA modifier key without needing to hold it down while you press other keys. (#230)\r
 - Automatic reporting of column and row headers is now supported in Microsoft Excel. Press NVDA+shift+c to set the row containing column headers and NVDA+shift+r to set the column containing row headers. Press either command twice in quick succession to clear the setting. (#1519)\r
 - Support for HIMS Braille Sense, Braille EDGE and SyncBraille braille displays. (#1266, #1267)\r
-- When Windows 8 Toast notifications appear, NVDA will announce them and move the navigator object there for further interaction. (#2143)\r
+- When Windows 8 Toast notifications appear, NVDA will report them if reporting of help balloons is enabled. (#2143)\r
 - Experimental support for Touch screens on Windows 8, including:\r
  - Reading text directly under your finger while moving it around\r
  - Many gestures for performing object navigation, text review, and other NVDA commands.\r