[orca] Fix for bgo#618794 - Orca speaks "end of table" when the	selection changes in OOo Writer's Templates
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [orca] Fix for bgo#618794 - Orca speaks "end of table" when the	selection changes in OOo Writer's Templates
- Date: Sun, 16 May 2010 15:25:43 +0000 (UTC)
commit a9855617b0581b7eef79bd36cb824a2a415d48cc
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sun May 16 11:24:55 2010 -0400
    Fix for bgo#618794 - Orca speaks "end of table" when the selection changes in OOo Writer's Templates and Documents dialog
 src/orca/scripts/apps/soffice/speech_generator.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/speech_generator.py b/src/orca/scripts/apps/soffice/speech_generator.py
index 1be65f8..fb3ec49 100644
--- a/src/orca/scripts/apps/soffice/speech_generator.py
+++ b/src/orca/scripts/apps/soffice/speech_generator.py
@@ -469,6 +469,21 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
                 result.append(_("blank"))
         return result
 
+    def _generateEndOfTableIndicator(self, obj, **args):
+        """Returns an array of strings (and possibly voice and audio
+        specifications) indicating that this cell is the last cell
+        in the table. Overridden here because Orca keeps saying "end
+        of table" in certain lists (e.g. the Templates and Documents
+        dialog).
+        """
+
+        topLevel = self._script.utilities.topLevelObject(obj)
+        if topLevel and topLevel.getRole() == pyatspi.ROLE_DIALOG:
+            return []
+
+        return (speech_generator.SpeechGenerator._generateEndOfTableIndicator(
+                self, obj, **args))
+
     def generateSpeech(self, obj, **args):
         result = []
         if args.get('formatType', 'unfocused') == 'basicWhereAmI' \
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]