Index: src/orca/settings.py =================================================================== --- src/orca/settings.py (revisão 4455) +++ src/orca/settings.py (cópia de trabalho) @@ -162,7 +162,6 @@ "sayAllStyle", "keyboardLayout", "speakBlankLines", - "speakMultiCaseStringsAsWords", "enabledSpokenTextAttributes", "enabledBrailledTextAttributes", "textAttributesBrailleIndicator", @@ -630,10 +629,6 @@ # speakBlankLines = True -# if True, process multi case strings as words. -# -speakMultiCaseStringsAsWords = False - # If True, reads all the table cells in the current row rather than just # the current one. # Index: src/orca/speechdispatcherfactory.py =================================================================== --- src/orca/speechdispatcherfactory.py (revisão 4455) +++ src/orca/speechdispatcherfactory.py (cópia de trabalho) @@ -44,6 +44,7 @@ import speechserver import settings import orca +import orca_state from acss import ACSS from orca_i18n import _ @@ -326,7 +327,8 @@ def speak(self, text=None, acss=None, interrupt=True): #if interrupt: # self._cancel() - + if orca_state.activeScript and orca_state.usePronunciationDictionary: + text = orca_state.activeScript.adjustForPronunciation(text) if text: self._speak(text, acss) Index: src/orca/speech.py =================================================================== --- src/orca/speech.py (revisão 4455) +++ src/orca/speech.py (cópia de trabalho) @@ -29,7 +29,6 @@ import logging log = logging.getLogger("speech") -import re import time import chnames @@ -46,13 +45,6 @@ # _speechserver = None -# regular expressions for multiCaseStrings -# -multiCaseReg1 = re.compile("([a-z]+)([A-Z][a-z]+)") -multiCaseReg2 = re.compile("([a-z]+)([A-Z]+)") -multiCaseReg3 = re.compile("([A-Z]{2}[A-Z]+)([a-z]+)") -multiCaseReg4 = re.compile("([A-Z])([A-Z][a-z]+)") - def getSpeechServerFactories(): """Imports all known SpeechServer factory modules. Returns a list of modules that implement the getSpeechServers method, which @@ -162,13 +154,6 @@ if settings.silenceSpeech: return - if settings.speakMultiCaseStringsAsWords: - text = _processMultiCaseString(text) - if orca_state.activeScript and orca_state.usePronunciationDictionary: - text = orca_state.activeScript.adjustForPronunciation(text) - if settings.speakMultiCaseStringsAsWords: - text = _processMultiCaseString(text) - logLine = "SPEECH OUTPUT: '" + text + "'" debug.println(debug.LEVEL_INFO, logLine) log.info(logLine) @@ -260,19 +245,8 @@ if settings.silenceSpeech: return - i = 0 - length = len(utterances) - while ( i < length ): - utterance = utterances[i] - if settings.speakMultiCaseStringsAsWords: - utterance = _processMultiCaseString(utterance) - if settings.speakMultiCaseStringsAsWords: - utterances[i] = _processMultiCaseString(utterance) - utterance = utterances[i] - if settings.speakMultiCaseStringsAsWords: - utterance = _processMultiCaseString(utterance) - i = i + 1 - + + for utterance in utterances: logLine = "SPEECH OUTPUT: '" + utterance + "'" debug.println(debug.LEVEL_INFO, logLine) log.info(logLine) @@ -371,14 +345,3 @@ server.shutdown() except: debug.printException(debug.LEVEL_OFF) - -def _processMultiCaseString(string): - """Helper function, applies the regexes to split multiCaseStrings - to multiple words. - """ - - string = multiCaseReg1.sub('\\1 \\2', string) - string = multiCaseReg2.sub('\\1 \\2', string) - string = multiCaseReg3.sub('\\1 \\2', string) - string = multiCaseReg4.sub('\\1 \\2', string) - return string Index: src/orca/gnomespeechfactory.py =================================================================== --- src/orca/gnomespeechfactory.py (revisão 4455) +++ src/orca/gnomespeechfactory.py (cópia de trabalho) @@ -897,6 +897,8 @@ return -1 text = self.__addVerbalizedPunctuation(text) + if orca_state.activeScript and orca_state.usePronunciationDictionary: + text = orca_state.activeScript.adjustForPronunciation(text) try: # [[[TODO: WDW - back this stop out for now. The problem is Index: src/orca/orca_gui_prefs.py =================================================================== --- src/orca/orca_gui_prefs.py (revisão 4455) +++ src/orca/orca_gui_prefs.py (cópia de trabalho) @@ -1485,8 +1485,6 @@ self.get_widget("speakBlankLinesCheckButton").set_active(\ prefs["speakBlankLines"]) - self.get_widget("speakMultiCaseAsWordsCheckButton").set_active(\ - prefs["speakMultiCaseStringsAsWords"]) self.get_widget("speakTutorialMessagesCheckButton").set_active(\ prefs["enableTutorialMessages"]) @@ -2480,18 +2478,6 @@ self.prefsDict["speakBlankLines"] = widget.get_active() - def speakMultiCaseStringsToggled(self, widget): - """Signal handler for the "toggled" signal for the - speakMultiCaseAsWordsCheckButton GtkCheckButton widget. The user has - [un]checked the checkbox. - Set the 'speakMultiCaseStringsAsWords' preference to the new value. - - Arguments: - - widget: the component that generated the signal. - """ - - self.prefsDict["speakMultiCaseStringsAsWords"] = widget.get_active() - def speakTutorialMessagesToggled(self, widget): """Signal handler for the "toggled" signal for the speakTutorialMessagesCheckButton GtkCheckButton widget.