orca r3724 - in trunk: . src/orca/scripts



Author: richb
Date: Tue Mar 18 19:59:42 2008
New Revision: 3724
URL: http://svn.gnome.org/viewvc/orca?rev=3724&view=rev

Log:
        * src/orca/scripts/StarOffice.py:
          Fix for bug #523018 - Orca does not speak the role for edits 
          in the find and replace dialog in openoffice.


Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/StarOffice.py

Modified: trunk/src/orca/scripts/StarOffice.py
==============================================================================
--- trunk/src/orca/scripts/StarOffice.py	(original)
+++ trunk/src/orca/scripts/StarOffice.py	Tue Mar 18 19:59:42 2008
@@ -2267,16 +2267,23 @@
 
     def onFocus(self, event):
         """Called whenever an object gets focus. Overridden in this script
-        so that we can adjust "focus:" events for children of a combo-box
-        to just set the focus to the combo box. This is needed to help
-        reduce the verbosity of focusing on the Calc Name combo box (see
-        bug #364407).
+        so that we can adjust the "focus:" events for the Calc Name combo
+        box to reduce its verbosity (see bug #364407).
 
         Arguments:
         - event: the Event
         """
 
-        if event.source.parent.getRole() == pyatspi.ROLE_COMBO_BOX:
+        rolesList = [pyatspi.ROLE_LIST, \
+                     pyatspi.ROLE_COMBO_BOX, \
+                     pyatspi.ROLE_TOOL_BAR, \
+                     pyatspi.ROLE_PANEL, \
+                     pyatspi.ROLE_ROOT_PANE, \
+                     pyatspi.ROLE_FRAME, \
+                     pyatspi.ROLE_APPLICATION]
+        if self.isDesiredFocusedItem(event.source, rolesList):
+            debug.println(self.debugLevel, "StarOffice.onFocus - " \
+                          + "Calc: Name combo box.")
             orca.setLocusOfFocus(None, event.source.parent, False)
             return
 



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