[orca] Do not speak 'blank' for table cells when reading a whole row



commit cef9bd7131d4dd027085eba3cabd1b600bb8a7b6
Author: Willie Walker <william walker sun com>
Date:   Sun May 31 07:01:44 2009 -0400

    Do not speak 'blank' for table cells when reading a whole row
---
 src/orca/speech_generator.py           |    4 +++-
 test/keystrokes/gtk-demo/role_table.py |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index b2302b2..d8076ee 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -796,7 +796,8 @@ class SpeechGenerator:
         oldRole = self._overrideRole('REAL_ROLE_TABLE_CELL', args)
         result.extend(self.getSpeech(obj, **args))
         self._restoreRole(oldRole, args)
-        if not result and settings.speakBlankLines:
+        if not result and settings.speakBlankLines \
+           and not args.get('readingRow', False):
             # Translators: "blank" is a short word to mean the
             # user has navigated to an empty line.
             #
@@ -839,6 +840,7 @@ class SpeechGenerator:
                      or ((row == 0 or row == parentTable.nRows-1) \
                      and pointOfReference["lastColumn"] == column)
             if speakAll:
+                args['readingRow'] = True
                 for i in range(0, parentTable.nColumns):
                     cell = parentTable.getAccessibleAt(row, i)
                     if not cell:
diff --git a/test/keystrokes/gtk-demo/role_table.py b/test/keystrokes/gtk-demo/role_table.py
index e74fba8..d429935 100644
--- a/test/keystrokes/gtk-demo/role_table.py
+++ b/test/keystrokes/gtk-demo/role_table.py
@@ -63,7 +63,7 @@ sequence.append(utils.AssertPresentationAction(
      "     VISIBLE:  '3 bottles of coke[ ]*', cursor=1",
      "SPEECH OUTPUT: 'Widget (double click for demo) page Widget (double click for demo) column header Editable Cells tree level 2'",
      "SPEECH OUTPUT: 'Shopping list frame'",
-     "SPEECH OUTPUT: 'Number column header 3 bottles of coke blank'"]))
+     "SPEECH OUTPUT: 'Number column header 3 bottles of coke'"]))
      # [WDW - the [ ]* re is to account for the last
      # column not showing on some systems (e.g.,
      # Ubuntu, but showing on others (e.g., Solaris).
@@ -99,7 +99,7 @@ sequence.append(utils.AssertPresentationAction(
     "Table down one line",
     ["BRAILLE LINE:  'gtk-demo Application Shopping list Frame ScrollPane Table Number ColumnHeader 5 packages of noodles[ ]*'",
      "     VISIBLE:  '5 packages of noodles[ ]*', cursor=1",
-     "SPEECH OUTPUT: '5 packages of noodles blank'"]))
+     "SPEECH OUTPUT: '5 packages of noodles'"]))
 
 ########################################################################
 # Do a basic "Where Am I" via KP_Enter.



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