[orca] Fix for bgo#619046 - Opentts/sd does not accept '\r\n', prevent orca from sending this sequence.



commit 1a997c7d80f6e8073d7eafa6897f807479a22c7c
Author: Mesar Hameed <mhameed src gnome org>
Date:   Fri May 21 22:02:24 2010 +0100

    Fix for bgo#619046 - Opentts/sd does not accept '\r\n', prevent orca from sending this sequence.

 src/orca/default.py |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/default.py b/src/orca/default.py
index d844596..07ac58b 100644
--- a/src/orca/default.py
+++ b/src/orca/default.py
@@ -4142,8 +4142,18 @@ class Script(script.Script):
                     speech.speak(_("blank"), voice, False)
                 return
 
-        self.speakMisspelledIndicator(obj, offset)
-        speech.speakCharacter(character, voice)
+        if character in ["\n", "\r\n"]:
+            # This is a blank line. Announce it if the user requested
+            # that blank lines be spoken.
+            if settings.speakBlankLines:
+                # Translators: "blank" is a short word to mean the
+                # user has navigated to an empty line.
+                #
+                speech.speak(_("blank"), voice, False)
+            return
+        else:
+            self.speakMisspelledIndicator(obj, offset)
+            speech.speakCharacter(character, voice)
 
     def sayLine(self, obj):
         """Speaks the line of an AccessibleText object that contains the



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