orca r3929 - in trunk: . src/orca/scripts/toolkits/Gecko



Author: joanied
Date: Wed May 28 04:41:31 2008
New Revision: 3929
URL: http://svn.gnome.org/viewvc/orca?rev=3929&view=rev

Log:
* src/orca/scripts/toolkits/Gecko/script.py:
  Fix for bug #532069 - Orca should read field labels on the NLS
  site.



Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/toolkits/Gecko/script.py

Modified: trunk/src/orca/scripts/toolkits/Gecko/script.py
==============================================================================
--- trunk/src/orca/scripts/toolkits/Gecko/script.py	(original)
+++ trunk/src/orca/scripts/toolkits/Gecko/script.py	Wed May 28 04:41:31 2008
@@ -4598,13 +4598,16 @@
         # to be ignored.  Let's try that for now and adjust based on feedback
         # and testing.]]]
         #
-        leftIsInForm = self.getAncestor(onLeft,
-                                        [pyatspi.ROLE_FORM],
-                                        [pyatspi.ROLE_DOCUMENT_FRAME])
-        rightIsInForm = self.getAncestor(onRight,
-                                         [pyatspi.ROLE_FORM],
-                                         [pyatspi.ROLE_DOCUMENT_FRAME])
-
+        leftIsInForm = (onLeft and onLeft.getRole() == pyatspi.ROLE_FORM)
+        if not leftIsInForm:
+            leftIsInForm = self.getAncestor(onLeft,
+                                            [pyatspi.ROLE_FORM],
+                                            [pyatspi.ROLE_DOCUMENT_FRAME])
+        rightIsInForm = (onRight and onRight.getRole() == pyatspi.ROLE_FORM)
+        if not rightIsInForm:
+            rightIsInForm = self.getAncestor(onRight,
+                                             [pyatspi.ROLE_FORM],
+                                             [pyatspi.ROLE_DOCUMENT_FRAME])
         # If it's a radio button, we'll waive the requirement of the text
         # on the right being within the form (or rather, we'll just act as
         # if it were even if it's not).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]