[orca] Convert "\n" to "blank" in getUtterancesFromContents()



commit b9a6be5c094302f107b0c76ed2997c2fcbda8390
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Nov 12 10:26:40 2013 -0500

    Convert "\n" to "blank" in getUtterancesFromContents()
    
    This is a temporary hack to deal with a refactor-introduced regression.

 src/orca/scripts/toolkits/Gecko/script.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 0f620e1..11b375e 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -3808,6 +3808,14 @@ class Script(default.Script):
                or self.isLabellingContents(obj, contents):
                 continue
 
+            # TODO - JD: this is a temporary and sad hack borrowed from
+            # clumpUtterances() which is no longer called by speakContents().
+            # Ultimately this sort of crap belongs in a generator (along with
+            # other similiar crap).
+            if string == "\n" and len(contents) == 1 \
+               and _settingsManager.getSetting('speakBlankLines'):
+                string = messages.BLANK
+
             # Thunderbird now does something goofy with smileys in
             # email: exposes them as a nested paragraph with a name
             # consisting of the punctuation used to create the smiley


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