[orca] Don't present the full contents of the final Evo Account Assistant screen



commit a8528801810d66bdbf57915b20154863ff909814
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Jan 13 15:17:59 2013 -0500

    Don't present the full contents of the final Evo Account Assistant screen
    
    There are a ton of events and the end result is Orca spewing tons
    of speech and braille in a way that is not helpful. I will come up
    with something for presenting this final screen more meaningfully.

 src/orca/scripts/apps/evolution/script.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
index d52c9a4..9ba2080 100644
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -975,6 +975,14 @@ class Script(default.Script):
             if self.utilities.spatialComparison(event.source, focusedObj) >= 0:
                 return
 
+            # TODO - JD: The very last screen results in a crazy-huge number
+            # of events, and they come in an order that is not good for this
+            # approach. So we'll need to handle this particular case elsewhere.
+            if focusedObj.getRole() == pyatspi.ROLE_CHECK_BOX:
+                labels = self.utilities.unrelatedLabels(window)
+                if len(labels) > 15:
+                    return
+
             voice = self.voices.get(settings.DEFAULT_VOICE)
             text = self.utilities.displayedText(event.source)
             self.presentMessage(text, voice=voice)



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