[Nvda-dev] commit r3501 - trunk/source/appModules

NVDA Subversion svn at nvda-project.org
Tue Feb 2 04:40:05 UTC 2010


Author: bzr
Date: Tue Feb  2 04:40:04 2010
New Revision: 3501

Log:
logonui appModule: appropriately report error messages shown for incorrect passwords and such.  The to--level pane is now treeted as a dialog, thus it now has the error messages in its description.

Modified:
   trunk/source/appModules/logonui.py

Modified: trunk/source/appModules/logonui.py
==============================================================================
--- trunk/source/appModules/logonui.py	(original)
+++ trunk/source/appModules/logonui.py	Tue Feb  2 04:40:04 2010
@@ -1,8 +1,19 @@
 import keyUtils
+import speech
+import api
+import braille
 import controlTypes
-from NVDAObjects.IAccessible import IAccessible
+from NVDAObjects.IAccessible import IAccessible, Dialog
 import _default
 
+class LogonDialog(Dialog):
+
+	def _get_role(self):
+		return controlTypes.ROLE_DIALOG
+
+	def _get_description(self):
+		return self.getDialogText(self.parent.firstChild)
+
 class XPPasswordField(IAccessible):
 
 	def bindKeys(self):
@@ -38,6 +49,8 @@
 		if obj.windowClassName in ("NativeHWNDHost", "AUTHUI.DLL: LogonUI Logon Window") and obj.parent and not obj.parent.parent:
 			# Make sure the top level pane is always presented.
 			obj.isPresentableFocusAncestor = True
+			if obj.windowClassName=="AUTHUI.DLL: LogonUI Logon Window":
+				obj.__class__=LogonDialog
 			return
 
 		if obj.windowClassName == "Edit" and not obj.name:
@@ -46,3 +59,12 @@
 				self.overlayCustomNVDAObjectClass(obj, XPPasswordField, outerMost=True)
 				obj.bindKeys()
 				return
+
+	def event_gainFocus(self,obj,nextHandler):
+		if obj.windowClassName=="DirectUIHWND" and obj.role==controlTypes.ROLE_BUTTON:
+			prev=obj.previous
+			if prev and prev.role==controlTypes.ROLE_STATICTEXT:
+				speech.speakObjectProperties(api.getForegroundObject(),name=True,role=True,description=True)
+				braille.invalidateCachedFocusAncestors(1)
+		nextHandler()
+



More information about the Nvda-dev mailing list