orca r3492 - in trunk: . src/orca



Author: joanied
Date: Tue Jan 22 20:03:02 2008
New Revision: 3492
URL: http://svn.gnome.org/viewvc/orca?rev=3492&view=rev

Log:
* src/orca/Gecko.py:
  Fix for bug #511118 - We sometimes get stuck on images that are
  also links.



Modified:
   trunk/ChangeLog
   trunk/src/orca/Gecko.py

Modified: trunk/src/orca/Gecko.py
==============================================================================
--- trunk/src/orca/Gecko.py	(original)
+++ trunk/src/orca/Gecko.py	Tue Jan 22 20:03:02 2008
@@ -7903,6 +7903,17 @@
             while self._objectForFocusGrab and obj:
                 if self._objectForFocusGrab.getState().contains(\
                     pyatspi.STATE_FOCUSABLE):
+                    # If we're on an image that's in a link and the link
+                    # contains more text than the EOC that represents the
+                    # image, we are in danger of getting stuck on the link
+                    # should we grab focus on it.
+                    #
+                    role = self._objectForFocusGrab.getRole()
+                    if role == pyatspi.ROLE_LINK \
+                       and obj.getRole() == pyatspi.ROLE_IMAGE:
+                        text = self.queryNonEmptyText(self._objectForFocusGrab)
+                        if text and text.characterCount > 1:
+                            self._objectForFocusGrab = None
                     break
                 else:
                     self._objectForFocusGrab = self._objectForFocusGrab.parent



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