[orca/570658] Move _getVoice logic to _presentObject and make it work better with
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658] Move _getVoice logic to _presentObject and make it work better with
- Date: Fri, 29 May 2009 11:48:54 -0400 (EDT)
commit 2dc85af570e516b4af64d75721dc0fe835787b24
Author: Willie Walker <william walker sun com>
Date: Fri May 29 11:44:46 2009 -0400
Move _getVoice logic to _presentObject and make it work better with
the new speech generator. Also eliminate the upper case voice decision
since that should be done elsewhere (i.e., deeper in the stack).
---
src/orca/structural_navigation.py | 26 ++++++--------------------
1 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 67d3610..aa7c0cd 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -1765,32 +1765,18 @@ class StructuralNavigation:
"""
self._script.updateBraille(obj)
- utterances = []
- strings = self._script.speechGenerator.getSpeech(obj)
- for string in strings:
- voice = self._getVoice(obj, string)
- speech.speak(string, voice)
-
- # [[[TODO: WDW - this needs to be moved to the speech generator.]]]
- #
- def _getVoice(self, obj, string):
- """Returns the voice to speak anything for the given obj.
-
- Arguments:
- - obj: the accessible object to be presented.
- - string: the string to be spoken for obj.
- """
+ # [[[TODO: WDW - move the voice selection to formatting.py
+ # at some point.]]]
+ #
voices = self._script.voices
-
if obj.getRole() == pyatspi.ROLE_LINK:
voice = voices[settings.HYPERLINK_VOICE]
- elif string and string.isupper() and string.strip().isalpha():
- voice = voices[settings.UPPERCASE_VOICE]
else:
- voice = voices[settings.DEFAULT_VOICE]
+ voice = None
- return voice
+ utterances = self._script.speechGenerator.getSpeech(obj)
+ speech.speak(utterances, voice)
#########################################################################
# #
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]