OSDN Git Service

Fix for #1285 (focus tracking in Outlook 2010 message list):
authorMichael Curran <mick@kulgan.net>
Fri, 8 Jul 2011 05:53:47 +0000 (15:53 +1000)
committerMichael Curran <mick@kulgan.net>
Fri, 8 Jul 2011 05:53:47 +0000 (15:53 +1000)
* Add the 'SUPERGRID' window class to the list of BAD UIA implementations. We must resort to MSAA for the Outlook 2010 message list as  it 1. does not fire a UIA focus event on each item, and 2. does not set the focused state on the focused item.
* Create a new overlay class in the outlook appModule to handle the client of SUPERGRID, and override its isDuplicateIAccessibleEvent method, always returning false. This is because when the focus moves from message to message, the same focus winEvent is fired, on the client (OBJID_CLIENT,0), but that particular MSAA object keeps mutating itself. Therefore we can not filter out duplicate events.

source/_UIAHandler.py
source/appModules/outlook.py
user_docs/en/changes.t2t

index ea6b568..693b869 100644 (file)
@@ -26,6 +26,7 @@ badUIAWindowClassNames=[
        "Edit",\r
        "CommonPlacesWrapperWndClass",\r
        "SysMonthCal32",\r
+       "SUPERGRID", #Outlook 2010 message list\r
 ]\r
 \r
 UIAControlTypesToNVDARoles={\r
index 97e882b..4bf769a 100644 (file)
@@ -6,6 +6,7 @@
 \r
 from comtypes import COMError\r
 import comtypes.client\r
+import winUser\r
 import appModuleHandler\r
 import eventHandler\r
 import controlTypes\r
@@ -84,7 +85,13 @@ class AppModule(appModuleHandler.AppModule):
                        outlookVersion=self.outlookVersion\r
                        if outlookVersion and outlookVersion<=9:\r
                                clsList.insert(0, MessageList_pre2003)\r
-                       return\r
+                       elif outlookVersion and outlookVersion>=14 and isinstance(obj,IAccessible) and obj.event_objectID==winUser.OBJID_CLIENT:\r
+                               clsList.insert(0,SuperGridClient2010)\r
+\r
+class SuperGridClient2010(IAccessible):\r
+\r
+       def isDuplicateIAccessibleEvent(self,obj):\r
+               return False\r
 \r
 class MessageList_pre2003(IAccessible):\r
 \r
index 87ae979..44a52ee 100644 (file)
@@ -108,6 +108,7 @@ Highlights of this release include major improvements concerning punctuation and
 - In Microsoft Word, say all now works correctly when the document does not end with a sentence ending.\r
 - When opening a plain text message in Windows Live Mail 2011, NVDA will correctly focus on the message document allowing it to be read.\r
 - NVDA no longer temporarily freezes or refuses to speak when in the Move to / Copy to dialogs in Windows Live Mail. (#574)\r
+- In Outlook 2010, NVDA will now correctly track the focus in the message list. (#1285)\r
 \r
 \r
 == Changes for Developers ==\r