[orca] Move Thunderbird logic to the Thunderbird script area



commit 57c557700e8fcb4764a6414a3790cdd1e90455a5
Author: Willie Walker <william walker sun com>
Date:   Mon Jun 1 16:38:46 2009 -0400

    Move Thunderbird logic to the Thunderbird script area
---
 ChangeLog                                          |   13 +++++++++++++
 .../scripts/apps/Thunderbird/speech_generator.py   |   13 +++++++++++++
 src/orca/speech_generator.py                       |    7 +------
 3 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2d55683..c854a06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2009-06-01  Willie Walker <william walker sun com>
 
+        * src/orca/scripts/apps/Thunderbird/speech_generator.py:
+          src/orca/speech_generator.py:
+          Move Thunderbird-specific check to Thunderbird area
+
+          There was some code in speech_generator.py that was looking
+          for a window ending in ' - Thunderbird' as a means to prevent
+          column headers from being spoken.  This code was fragile
+          (and broken since the window can end with 'Mozilla Thunderbird').
+          This code eliminates that check by putting the logic in the
+          thunderbird speech generator.
+
+2009-06-01  Willie Walker <william walker sun com>
+
         * src/orca/formatting.py:
           src/orca/speech_generator.py:
           Add mnemonic speaking back in to speech generator
diff --git a/src/orca/scripts/apps/Thunderbird/speech_generator.py b/src/orca/scripts/apps/Thunderbird/speech_generator.py
index 8ad4cd6..dc13506 100644
--- a/src/orca/scripts/apps/Thunderbird/speech_generator.py
+++ b/src/orca/scripts/apps/Thunderbird/speech_generator.py
@@ -47,6 +47,19 @@ class SpeechGenerator(Gecko.SpeechGenerator):
     def __init__(self, script):
         Gecko.SpeechGenerator.__init__(self, script)
 
+    def _getColumnHeader(self, obj, **args):
+        """Returns an array of strings (and possibly voice and audio
+        specifications) that represent the column header for an object
+        that is in a table, if it exists.  Otherwise, an empty array
+        is returned.
+        """
+        result = []
+
+        # Don't speak Thunderbird column headers, since
+        # it's not possible to navigate across a row.
+        #
+        return result
+
     def _getUnrelatedLabels(self, obj, **args):
         """Finds all labels not in a label for or labelled by relation.
         If this is the spell checking dialog, then there are no
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 5138142..36c1c70 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -620,12 +620,7 @@ class SpeechGenerator:
         else:
             index = self._script.getCellIndex(obj)
             columnIndex = table.getColumnAtIndex(index)
-            # Don't speak Thunderbird column headers, since
-            # it's not possible to navigate across a row.
-            # [[[TODO: WDW - move the T-bird check to the T-bird generator.]]]
-            if (columnIndex >= 0) \
-               and not self._script.getTopLevelName(obj).endswith(
-                " - Thunderbird"):
+            if columnIndex >= 0:
                 # Get the header information.  In Java Swing, the
                 # information is not exposed via the description
                 # but is instead a header object, so we fall back



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