[orca] Additional work on bug #543157 - It is not always possible to distinguish on-screen text from Orca's



commit 6137182677235ed996399b0d089f14c13b718571
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sun Sep 5 17:59:17 2010 -0400

    Additional work on bug #543157 - It is not always possible to distinguish on-screen text from Orca's "system" messages
    
    This causes Orca to speak Nautilus' "Icon View" layered pane using
    the system voice.

 src/orca/speech_generator.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 937c0c0..e067ce1 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -135,7 +135,15 @@ class SpeechGenerator(generator.Generator):
         'displayedText or name or description'). [[[JD to WDW - I
         needed a _generateDescription for whereAmI. :-) See below.
         """
-        acss = self.voice(DEFAULT)
+
+        role = args.get('role', obj.getRole())
+        if role == pyatspi.ROLE_LAYERED_PANE:
+            if settings.onlySpeakDisplayedText:
+                return []
+            else:
+                acss = self.voice(SYSTEM)
+        else:
+            acss = self.voice(DEFAULT)
         result = generator.Generator._generateName(self, obj, **args)
         if result:
             result.extend(acss)
@@ -1093,7 +1101,7 @@ class SpeechGenerator(generator.Generator):
                 newLine += " ; "
             newLine += attribs
 
-        result = [newline]
+        result = [newLine]
         result.extend(acss)
         return result
 



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