[orca/orca-xdesktop] Fix for bug #654411 - The speech generator's _generateAncestors() method needs to handle menu items



commit 1fd117ab686802bd08eefd64abdf64ca52d491c3
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Mon Jul 11 14:41:13 2011 -0400

    Fix for bug #654411 - The speech generator's _generateAncestors() method needs to handle menu items which do not implement AtkText

 src/orca/speech_generator.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 7bcd677..3a54b4d 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1527,6 +1527,8 @@ class SpeechGenerator(generator.Generator):
                             or (requireText \
                                 and 'Text' in pyatspi.listInterfaces(parent))):
                         text = self._script.utilities.displayedText(parent)
+                    if not text and parent.getRole() == pyatspi.ROLE_MENU:
+                        text = parent.name
                     if text and len(text.strip()):
                         roleInfo = self._generateRoleName(parent)
                         if roleInfo:



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