orca r3791 - in branches/gnome-2-22: . src/orca



Author: richb
Date: Tue Apr  1 22:16:42 2008
New Revision: 3791
URL: http://svn.gnome.org/viewvc/orca?rev=3791&view=rev

Log:
        * src/orca/default.py:
          Fix for bug #523235 - gtk-demo/role_column_header.py regression
          tests #3, #4, #7 and #8 produce the wrong results.


Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/src/orca/default.py

Modified: branches/gnome-2-22/src/orca/default.py
==============================================================================
--- branches/gnome-2-22/src/orca/default.py	(original)
+++ branches/gnome-2-22/src/orca/default.py	Tue Apr  1 22:16:42 2008
@@ -2726,15 +2726,24 @@
             parentRole = newLocusOfFocus.parent.getRole()
             state = newLocusOfFocus.getState()
 
-            if objRole == pyatspi.ROLE_ICON and \
-                parentRole == pyatspi.ROLE_LAYERED_PANE:
-                checkIfSelected = True
-
             if objRole == pyatspi.ROLE_TABLE_CELL and \
                (parentRole == pyatspi.ROLE_TREE_TABLE or \
                 parentRole == pyatspi.ROLE_TABLE):
                 checkIfSelected = True
 
+            # If we met the last set of conditions, but we got here by 
+            # moving left or right on the same row, then don't announce the 
+            # selection state to the user. See bug #523235 for more details.
+            #
+            if checkIfSelected == True and \
+               (orca_state.lastNonModifierKeyEvent.event_string == "Left" or \
+               orca_state.lastNonModifierKeyEvent.event_string == "Right"):
+                checkIfSelected = False
+
+            if objRole == pyatspi.ROLE_ICON and \
+                parentRole == pyatspi.ROLE_LAYERED_PANE:
+                checkIfSelected = True
+
             if checkIfSelected and not state.contains(pyatspi.STATE_SELECTED):
                 # Translators: this is in reference to a table cell being
                 # selected or not.



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