[orca] Fix for bug #585643 - Bad assumption about len(utterances[0]) in soffice script
- From: Joanmarie Diggs <joanied src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca] Fix for bug #585643 - Bad assumption about len(utterances[0]) in soffice script
- Date: Sun, 14 Jun 2009 12:50:35 -0400 (EDT)
commit e4181112026d768ee46fb41ad440e04fffa607e7
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Sun Jun 14 12:46:21 2009 -0400
Fix for bug #585643 - Bad assumption about len(utterances[0]) in soffice script
src/orca/scripts/apps/soffice/script.py | 12 +-----------
src/orca/scripts/apps/soffice/speech_generator.py | 5 +++++
2 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 39c5dcf..878815e 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -810,17 +810,7 @@ class Script(default.Script):
return (cell != None)
self.updateBraille(cell)
- utterances = self.speechGenerator.generateSpeech(cell)
- # [[[TODO: WDW - need to make sure assumption about utterances[0]
- # is still correct with the new speech generator stuff.]]]
- #
- if not len(utterances[0]) and self.speakBlankLine(newFocus):
- # Translators: "blank" is a short word to mean the
- # user has navigated to an empty line.
- #
- speech.speak(_("blank"), None, False)
- else:
- speech.speak(utterances)
+ speech.speak(self.speechGenerator.generateSpeech(cell))
if not settings.readTableCellRow:
self.speakCellName(cell.name)
diff --git a/src/orca/scripts/apps/soffice/speech_generator.py b/src/orca/scripts/apps/soffice/speech_generator.py
index 3aa63d6..484ca3d 100644
--- a/src/orca/scripts/apps/soffice/speech_generator.py
+++ b/src/orca/scripts/apps/soffice/speech_generator.py
@@ -420,6 +420,11 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
result.extend(
speech_generator.SpeechGenerator._generateTableCellRow(
self, obj, **args))
+ if not len(result) and settings.speakBlankLines:
+ # Translators: "blank" is a short word to mean the
+ # user has navigated to an empty line.
+ #
+ result.append(_("blank"))
return result
def generateSpeech(self, obj, **args):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]