[orca] Fix for bgo#618337 - Orca fails to present command-related confirmation messages in braille
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bgo#618337 - Orca fails to present command-related confirmation messages in braille
- Date: Tue, 11 May 2010 05:58:27 +0000 (UTC)
commit 23100686bb8f138671a74973d8cb67cfa4053dae
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Tue May 11 01:57:01 2010 -0400
Fix for bgo#618337 - Orca fails to present command-related confirmation messages in braille
src/orca/chat.py | 6 +++---
src/orca/default.py | 27 ++++++++++++---------------
src/orca/orca.py | 4 ++--
src/orca/scripts/apps/evolution/script.py | 2 +-
src/orca/scripts/apps/pidgin/script.py | 6 +++---
src/orca/scripts/apps/soffice/script.py | 12 ++++--------
src/orca/scripts/toolkits/Gecko/script.py | 23 ++++++++++-------------
7 files changed, 35 insertions(+), 45 deletions(-)
---
diff --git a/src/orca/chat.py b/src/orca/chat.py
index 3abe9e5..c8c065c 100644
--- a/src/orca/chat.py
+++ b/src/orca/chat.py
@@ -561,7 +561,7 @@ class Chat:
settings.chatSpeakRoomName = not settings.chatSpeakRoomName
if not settings.chatSpeakRoomName:
line = _("Do not speak chat room name.")
- speech.speak(line)
+ self._script.presentMessage(line)
return True
@@ -577,7 +577,7 @@ class Chat:
settings.chatAnnounceBuddyTyping = not settings.chatAnnounceBuddyTyping
if not settings.chatAnnounceBuddyTyping:
line = _("Do not announce when your buddies are typing.")
- speech.speak(line)
+ self._script.presentMessage(line)
return True
@@ -593,7 +593,7 @@ class Chat:
settings.chatRoomHistories = not settings.chatRoomHistories
if not settings.chatRoomHistories:
line = _("Do not provide chat room specific message histories.")
- speech.speak(line)
+ self._script.presentMessage(line)
return True
diff --git a/src/orca/default.py b/src/orca/default.py
index a13a5a9..eb71c7c 100644
--- a/src/orca/default.py
+++ b/src/orca/default.py
@@ -2415,7 +2415,7 @@ class Script(script.Script):
# along to the current application, bypassing Orca's
# interception of it.
#
- speech.speak(_("Bypass mode enabled."))
+ self.presentMessage(_("Bypass mode enabled."))
orca_state.bypassNextCommand = True
return True
@@ -2731,7 +2731,7 @@ class Script(script.Script):
# for some reason Orca cannot identify the current
# location, it will speak this message.
#
- speech.speak(_("Could not find current location."))
+ self.presentMessage(_("Could not find current location."))
return True
@@ -2885,7 +2885,7 @@ class Script(script.Script):
# for some reason Orca cannot identify the current
# location, it will speak this message.
#
- speech.speak(_("Could not find current location."))
+ self.presentMessage(_("Could not find current location."))
return True
def spellCurrentItem(self, itemString):
@@ -3381,7 +3381,8 @@ class Script(script.Script):
"""Toggles between flat review mode and focus tracking mode."""
if self.flatReviewContext:
- if inputEvent:
+ if inputEvent and (settings.speechVerbosityLevel != \
+ settings.VERBOSITY_LEVEL_BRIEF):
# Translators: the 'flat review' feature of Orca
# allows the blind user to explore the text in a
# window in a 2D fashion. That is, Orca treats all
@@ -3392,14 +3393,13 @@ class Script(script.Script):
# {line,word,character}. This message lets the user know
# they have left the flat review feature.
#
- if settings.speechVerbosityLevel \
- != settings.VERBOSITY_LEVEL_BRIEF:
- speech.speak(_("Leaving flat review."))
+ self.presentMessage(_("Leaving flat review."))
self.drawOutline(-1, 0, 0, 0)
self.flatReviewContext = None
self.updateBraille(orca_state.locusOfFocus)
else:
- if inputEvent:
+ if inputEvent and (settings.speechVerbosityLevel != \
+ settings.VERBOSITY_LEVEL_BRIEF):
# Translators: the 'flat review' feature of Orca
# allows the blind user to explore the text in a
# window in a 2D fashion. That is, Orca treats all
@@ -3410,9 +3410,7 @@ class Script(script.Script):
# {line,word,character}. This message lets the user know
# they have entered the flat review feature.
#
- if settings.speechVerbosityLevel \
- != settings.VERBOSITY_LEVEL_BRIEF:
- speech.speak(_("Entering flat review."))
+ self.presentMessage(_("Entering flat review."))
context = self.getFlatReviewContext()
[wordString, x, y, width, height] = \
context.getCurrent(flat_review.Context.WORD)
@@ -3436,7 +3434,7 @@ class Script(script.Script):
#
line = _("Speaking of indentation and justification disabled.")
- speech.speak(line)
+ self.presentMessage(line)
return True
@@ -3476,9 +3474,8 @@ class Script(script.Script):
line = _("Punctuation level set to none.")
settings.verbalizePunctuationStyle = newLevel
- speech.speak(line)
+ self.presentMessage(line)
speech.updatePunctuationLevel()
- self.displayBrailleMessage(line, flashTime=settings.brailleFlashTime)
return True
def toggleTableCellReadMode(self, inputEvent=None):
@@ -3499,7 +3496,7 @@ class Script(script.Script):
#
line = _("Speak cell")
- speech.speak(line)
+ self.presentMessage(line)
return True
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 77894cd..13e2546 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -963,12 +963,12 @@ def toggleSilenceSpeech(script=None, inputEvent=None):
# Translators: this is a spoken prompt letting the user know
# that speech synthesis has been turned back on.
#
- speech.speak(_("Speech enabled."))
+ orca_state.activeScript.presentMessage(_("Speech enabled."))
else:
# Translators: this is a spoken prompt letting the user know
# that speech synthesis has been temporarily turned off.
#
- speech.speak(_("Speech disabled."))
+ orca_state.activeScript.presentMessage(_("Speech disabled."))
settings.silenceSpeech = True
return True
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
index 8d13969..406e5b1 100644
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -238,7 +238,7 @@ class Script(default.Script):
#
line = _("do not present new mail if this script is not active.")
- speech.speak(line)
+ self.presentMessage(line)
return True
diff --git a/src/orca/scripts/apps/pidgin/script.py b/src/orca/scripts/apps/pidgin/script.py
index 340add1..79cb840 100644
--- a/src/orca/scripts/apps/pidgin/script.py
+++ b/src/orca/scripts/apps/pidgin/script.py
@@ -455,7 +455,7 @@ class Script(default.Script):
if not script_settings.prefixChatMessage:
line = _("Do not speak chat room name.")
- speech.speak(line)
+ self.presentMessage(line)
return True
@@ -474,7 +474,7 @@ class Script(default.Script):
if not script_settings.announceBuddyTyping:
line = _("Do not announce when your buddies are typing.")
- speech.speak(line)
+ self.presentMessage(line)
return True
@@ -493,7 +493,7 @@ class Script(default.Script):
if not script_settings.chatRoomHistories:
line = _("Do not provide chat room specific message histories.")
- speech.speak(line)
+ self.presentMessage(line)
return True
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 7c872b4..4b88401 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -906,8 +906,7 @@ class Script(default.Script):
# row of a spreadsheet or table counts as column headers.
#
line = _("Dynamic column header set for row %d") % (row+1)
- speech.speak(line)
- self.displayBrailleMessage(line)
+ self.presentMessage(line)
return True
@@ -930,8 +929,7 @@ class Script(default.Script):
#
line = _("Dynamic column header cleared.")
speech.stop()
- speech.speak(line)
- self.displayBrailleMessage(line)
+ self.presentMessage(line)
except:
pass
@@ -983,8 +981,7 @@ class Script(default.Script):
#
line = _("Dynamic row header set for column %s") \
% self.columnConvert(column+1)
- speech.speak(line)
- self.displayBrailleMessage(line)
+ self.presentMessage(line)
return True
@@ -1007,8 +1004,7 @@ class Script(default.Script):
#
line = _("Dynamic row header cleared.")
speech.stop()
- speech.speak(line)
- self.displayBrailleMessage(line)
+ self.presentMessage(line)
except:
pass
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 6681414..463a861 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1904,8 +1904,7 @@ class Script(default.Script):
message = _("Finished loading.")
finishedLoading = True
- self.displayBrailleMessage(message)
- speech.speak(message)
+ self.presentMessage(message)
if finishedLoading:
# Store the document frame otherwise the first time it
@@ -5637,8 +5636,7 @@ class Script(default.Script):
# which just appeared as a result of the user hovering the
# mouse. If this command fails, Orca will present this message.
#
- message = _("Mouse over object not found.")
- speech.speak(message)
+ self.presentMessage(_("Mouse over object not found."))
return
if not self.inMouseOverObject:
@@ -6195,7 +6193,7 @@ class Script(default.Script):
# the bottom of the page and continuing looking upwards.
# We need to inform the user when this is taking place.
#
- speech.speak(_("Wrapping to bottom."))
+ self.presentMessage(_("Wrapping to bottom."))
[prevObj, prevOffset] = self.getBottomOfFile()
line = self.getLineContentsAtOffset(prevObj, prevOffset)
useful = self.getMeaningfulObjectsFromLine(line)
@@ -6263,7 +6261,7 @@ class Script(default.Script):
# top of the page and continuing looking downwards. We need
# to inform the user when this is taking place.
#
- speech.speak(_("Wrapping to top."))
+ self.presentMessage(_("Wrapping to top."))
[nextObj, nextOffset] = self.getTopOfFile()
line = self.getLineContentsAtOffset(nextObj, nextOffset)
useful = self.getMeaningfulObjectsFromLine(line)
@@ -6289,7 +6287,7 @@ class Script(default.Script):
# Translators: this announces to the user that live region
# support has been turned off.
#
- speech.speak(_("Live region support is off"))
+ self.presentMessage(_("Live region support is off"))
def monitorLiveRegions(self, inputEvent):
if not settings.inferLiveRegions:
@@ -6297,14 +6295,14 @@ class Script(default.Script):
# Translators: this announces to the user that live region
# are being monitored.
#
- speech.speak(_("Live regions monitoring on"))
+ self.presentMessage(_("Live regions monitoring on"))
else:
settings.inferLiveRegions = False
# Translators: this announces to the user that live region
# are not being monitored.
#
self.liveMngr.flushMessages()
- speech.speak(_("Live regions monitoring off"))
+ self.presentMessage(_("Live regions monitoring off"))
def setLivePolitenessOff(self, inputEvent):
if settings.inferLiveRegions:
@@ -6313,7 +6311,7 @@ class Script(default.Script):
# Translators: this announces to the user that live region
# support has been turned off.
#
- speech.speak(_("Live region support is off"))
+ self.presentMessage(_("Live region support is off"))
def reviewLiveAnnouncement(self, inputEvent):
if settings.inferLiveRegions:
@@ -6323,7 +6321,7 @@ class Script(default.Script):
# Translators: this announces to the user that live region
# support has been turned off.
#
- speech.speak(_("Live region support is off"))
+ self.presentMessage(_("Live region support is off"))
def toggleCaretNavigation(self, inputEvent):
"""Toggles between Firefox native and Orca caret navigation."""
@@ -6354,8 +6352,7 @@ class Script(default.Script):
string = _("Orca is controlling the caret.")
debug.println(debug.LEVEL_CONFIGURATION, string)
- speech.speak(string)
- self.displayBrailleMessage(string)
+ self.presentMessage(string)
def speakWordUnderMouse(self, acc):
"""Determine if the speak-word-under-mouse capability applies to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]