[orca] Don't generate ancestors when the common ancestor is a combo box



commit ebcafc976adbc2a5b68b16287915ba834163592a
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Oct 24 18:52:15 2013 -0400

    Don't generate ancestors when the common ancestor is a combo box

 src/orca/speech_generator.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 24fb426..f4a161d 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1482,6 +1482,14 @@ class SpeechGenerator(generator.Generator):
         result = []
         priorObj = args.get('priorObj', None)
         commonAncestor = self._script.utilities.commonAncestor(priorObj, obj)
+        try:
+            role = commonAncestor.getRole()
+        except:
+            pass
+        else:
+            if role == pyatspi.ROLE_COMBO_BOX:
+                return []
+
         if obj != commonAncestor:
             parent = obj.parent
             while parent and not parent in [commonAncestor, parent.parent]:


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