[orca] Fix for bug #626200 - Modules should use script methods for presenting messages
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug #626200 - Modules should use script methods for presenting messages
- Date: Fri, 6 Aug 2010 17:59:00 +0000 (UTC)
commit 9eeb1fe30f36538b87d407961744fde06805d387
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Fri Aug 6 13:58:05 2010 -0400
Fix for bug #626200 - Modules should use script methods for presenting messages
src/orca/bookmarks.py | 13 +++--
src/orca/default.py | 17 +++---
src/orca/find.py | 6 +-
src/orca/gsmag.py | 5 +-
src/orca/input_event.py | 7 +--
src/orca/liveregions.py | 17 +++---
src/orca/mag.py | 21 ++++----
src/orca/orca.py | 19 ++++---
src/orca/orca_gui_prefs.py | 44 +++++++++-------
src/orca/scripts/apps/acroread/script.py | 8 ++--
src/orca/scripts/apps/gedit/script.py | 6 +-
src/orca/scripts/apps/gnome-search-tool/script.py | 9 ++--
src/orca/scripts/apps/soffice/script.py | 12 ++--
.../scripts/apps/soffice/structural_navigation.py | 6 +-
src/orca/scripts/toolkits/Gecko/bookmarks.py | 14 +++--
src/orca/structural_navigation.py | 17 +++---
test/keystrokes/oowriter/bug_382408.py | 4 +-
test/keystrokes/oowriter/bug_382415.py | 6 ++-
test/keystrokes/oowriter/bug_382418.py | 4 +-
test/keystrokes/oowriter/bug_382880.py | 6 ++-
test/keystrokes/oowriter/bug_382888.py | 4 +-
test/keystrokes/oowriter/bug_450210.py | 2 +-
test/keystrokes/oowriter/table_cells.py | 6 ++-
.../oowriter/table_cells_structural_navigation1.py | 56 ++++++++++++++++----
24 files changed, 181 insertions(+), 128 deletions(-)
---
diff --git a/src/orca/bookmarks.py b/src/orca/bookmarks.py
index af093a5..c4cb0cc 100644
--- a/src/orca/bookmarks.py
+++ b/src/orca/bookmarks.py
@@ -100,14 +100,15 @@ class Bookmarks:
# Translators: this announces that the current object is the same
# object pointed to by the bookmark.
#
- speech.speak(_('bookmark is current object'))
+ self._script.presentMessage(_('bookmark is current object'))
return
# Are their parents the same?
elif self._script.utilities.isSameObject(cur_obj.parent, obj.parent):
# Translators: this announces that the current object's parent and
# the parent of the object pointed to by the bookmark are the same.
#
- speech.speak(_('bookmark and current object have same parent'))
+ self._script.presentMessage(
+ _('bookmark and current object have same parent'))
return
# Do they share a common ancestor?
@@ -124,14 +125,14 @@ class Bookmarks:
# Translators: this announces that the bookmark and the current
# object share a common ancestor
#
- speech.speak(_('shared ancestor %s') %p.role)
+ self._script.presentMessage(_('shared ancestor %s') % p.role)
return
p = p.parent
# Translators: This announces that a comparison between the bookmark
# and the current object can not be determined.
#
- speech.speak(_('comparison unknown'))
+ self._script.presentMessage(_('comparison unknown'))
def saveBookmarks(self, inputEvent):
""" Save the bookmarks for this script. """
@@ -140,12 +141,12 @@ class Bookmarks:
# Translators: this announces that a bookmark has been saved to
# disk
#
- speech.speak(_('bookmarks saved'))
+ self._script.presentMessage(_('bookmarks saved'))
except IOError:
# Translators: this announces that a bookmark could not be saved to
# disk
#
- speech.speak(_('bookmarks could not be saved'))
+ self._script.presentMessage(_('bookmarks could not be saved'))
# Notify the observers
for o in self._saveObservers:
diff --git a/src/orca/default.py b/src/orca/default.py
index bd3db4a..ae2cea6 100644
--- a/src/orca/default.py
+++ b/src/orca/default.py
@@ -1563,7 +1563,7 @@ class Script(script.Script):
if settings.learnModeEnabled:
return True
- speech.speak(
+ self.speakMessage(
# Translators: Orca has a "Learn Mode" that will allow
# the user to type any key on the keyboard and hear what
# the effects of that key would be. The effects might
@@ -1621,7 +1621,7 @@ class Script(script.Script):
"Press escape to exit.")
message = mode + " " + message
- speech.speak(message)
+ self.speakMessage(message)
self.displayBrailleMessage(message, -1, -1)
settings.listShortcutsModeEnabled = True
return True
@@ -2044,7 +2044,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.speakMessage(_("Could not find current location."))
return True
def rightClickReviewItem(self, inputEvent=None):
@@ -3397,7 +3397,7 @@ class Script(script.Script):
# of the red squiggly line which indicates that a given
# word is not spelled correctly.
#
- speech.speak(_("misspelled"))
+ self.speakMessage(_("misspelled"))
def onTextDeleted(self, event):
"""Called whenever text is deleted from an object.
@@ -4374,7 +4374,7 @@ class Script(script.Script):
attribute.split(",")[0].strip().strip('"')
line = line or (localizedKey + " " + localizedValue)
- speech.speak(line)
+ self.speakMessage(line)
def presentToolTip(self, obj):
"""
@@ -4491,7 +4491,7 @@ class Script(script.Script):
result = \
self.speechGenerator.generateTextIndentation(obj, line=line)
if result:
- speech.speak(result[0])
+ self.speakMessage(result[0])
line = self.utilities.adjustForLinks(obj, line, startOffset)
line = self.utilities.adjustForRepeats(line)
speech.speak(line, voice)
@@ -4739,8 +4739,7 @@ class Script(script.Script):
# they were searching for was not found.
#
message = _("string not found")
- self.displayBrailleMessage(message)
- speech.speak(message)
+ self.presentMessage(message)
else:
context.setCurrent(location.lineIndex, location.zoneIndex, \
location.wordIndex, location.charIndex)
@@ -5342,7 +5341,7 @@ class Script(script.Script):
# of the red squiggly line which indicates that a given
# word is not spelled correctly.
#
- speech.speak(_("misspelled"))
+ self.speakMessage(_("misspelled"))
# Store this word so that we do not continue to present the
# presence of the red squiggly as the user arrows amongst
# the characters.
diff --git a/src/orca/find.py b/src/orca/find.py
index 95232d3..2975b89 100644
--- a/src/orca/find.py
+++ b/src/orca/find.py
@@ -32,7 +32,6 @@ import re
import debug
import flat_review
import orca_state
-import speech
from orca_i18n import _ # for gettext support
@@ -251,6 +250,7 @@ class SearchQuery:
# Then we're at the screen's edge.
#
if self.windowWrap and not wrappedYet:
+ script = orca_state.activeScript
doneWithLine = False
wrappedYet = True
if self.searchBackwards:
@@ -263,7 +263,7 @@ class SearchQuery:
# direction is wrapping from the top of
# the window down to the bottom.
#
- speech.speak(_("Wrapping to Bottom"))
+ script.presentMessage(_("Wrapping to Bottom"))
moved = context.goPrevious( \
flat_review.Context.LINE, \
flat_review.Context.WRAP_ALL)
@@ -278,7 +278,7 @@ class SearchQuery:
# direction is wrapping from the bottom of
# the window up to the top.
#
- speech.speak(_("Wrapping to Top"))
+ script.presentMessage(_("Wrapping to Top"))
moved = context.goNext( \
flat_review.Context.LINE, \
flat_review.Context.WRAP_ALL)
diff --git a/src/orca/gsmag.py b/src/orca/gsmag.py
index 224f130..3caceca 100644
--- a/src/orca/gsmag.py
+++ b/src/orca/gsmag.py
@@ -40,7 +40,6 @@ _zoomer = None
import debug
import eventsynthesizer
import settings
-import speech
import orca_state
import gconf
@@ -777,14 +776,14 @@ def toggleMagnifier(script=None, inputEvent=None):
# magnifier. In addition to screen magnification, the user's
# preferred colors and mouse customizations are loaded.
#
- speech.speak(_("Magnifier enabled."))
+ orca_state.activeScript.presentMessage(_("Magnifier enabled."))
else:
shutdown()
# Translators: this is the message spoken when a user disables the
# magnifier, restoring the screen contents to their normal colors
# and sizes.
#
- speech.speak(_("Magnifier disabled."))
+ orca_state.activeScript.presentMessage(_("Magnifier disabled."))
########################################################################
# #
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index d36c8a3..c5ccc41 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -203,12 +203,7 @@ class InputEventHandler:
if settings.learnModeEnabled and self._learnModeEnabled:
if self.description:
- # These imports are here to eliminate circular imports.
- #
- import braille
- import speech
- braille.displayMessage(self.description)
- speech.speak(self.description)
+ script.presentMessage(self.description)
consumed = True
else:
try:
diff --git a/src/orca/liveregions.py b/src/orca/liveregions.py
index ab2f1f6..3b225c7 100644
--- a/src/orca/liveregions.py
+++ b/src/orca/liveregions.py
@@ -215,7 +215,7 @@ class LiveRegionManager:
utts = message['content']
else:
utts = message['labels'] + message['content']
- speech.speak(utts)
+ self._script.presentMessage(utts)
# set the last live obj to be announced
self.lastliveobj = obj
@@ -296,9 +296,9 @@ class LiveRegionManager:
# Tranlators: this tells the user that a cached message
# is not available.
#
- speech.speak(_('no live message saved'))
+ self._script.presentMessage(_('no live message saved'))
else:
- speech.speak(self.msg_cache[-msgnum])
+ self._script.presentMessage(self.msg_cache[-msgnum])
def setLivePolitenessOff(self):
"""User toggle to set all live regions to LIVE_OFF or back to their
@@ -313,8 +313,7 @@ class LiveRegionManager:
if self.monitoring:
# Translators: This lets the user know that all live regions
# have been turned off.
- speech.speak(_("All live regions set to off"))
-
+ self._script.presentMessage(_("All live regions set to off"))
self.msg_queue.clear()
# First we'll save off a copy for quick restoration
@@ -341,7 +340,8 @@ class LiveRegionManager:
self._politenessOverrides[key] = value
# Translators: This lets the user know that all live regions
# have been restored to their original politeness level.
- speech.speak(_("live regions politeness levels restored"))
+ self._script.presentMessage(
+ _("live regions politeness levels restored"))
# Toggle our flag
self.monitoring = True
@@ -463,8 +463,9 @@ class LiveRegionManager:
utts = labels + content
speech.stop()
# Note: we would like to use a different ACSS for alerts. This work
- # should be done as part of bug #412656.
- speech.speak(utts)
+ # should be done as part of bug #412656. For now, however, we will
+ # also present the message in braille.
+ self._script.presentMessage(utts)
return None
else:
return {'content':content, 'labels':labels}
diff --git a/src/orca/mag.py b/src/orca/mag.py
index e196d2c..9d78619 100644
--- a/src/orca/mag.py
+++ b/src/orca/mag.py
@@ -41,7 +41,6 @@ import pyatspi
import debug
import eventsynthesizer
import settings
-import speech
import orca_state
from orca_i18n import _ # for gettext support
@@ -1553,7 +1552,8 @@ def toggleColorEnhancements(script=None, inputEvent=None):
# make to the appearance of the screen to make things easier
# to see, such as inverting the colors or applying a tint.
#
- speech.speak(_("Color enhancements disabled."))
+ orca_state.activeScript.presentMessage(
+ _("Color enhancements disabled."))
else:
toRestore = {'magZoomFactor': levelX}
__setupZoomer(restore = toRestore)
@@ -1561,7 +1561,7 @@ def toggleColorEnhancements(script=None, inputEvent=None):
# make to the appearance of the screen to make things easier
# to see, such as inverting the colors or applying a tint.
#
- speech.speak(_("Color enhancements enabled."))
+ orca_state.activeScript.presentMessage(_("Color enhancements enabled."))
orca_state.colorEnhancementsEnabled = \
not orca_state.colorEnhancementsEnabled
@@ -1583,7 +1583,8 @@ def toggleMouseEnhancements(script=None, inputEvent=None):
# easier to see, such as increasing its size, changing its
# color, and surrounding it with crosshairs.
#
- speech.speak(_("Mouse enhancements disabled."))
+ orca_state.activeScript.presentMessage(
+ _("Mouse enhancements disabled."))
else:
# We normally toggle "on" what the user has enabled by default.
# However, if the user's default settings are to disable all mouse
@@ -1616,7 +1617,7 @@ def toggleMouseEnhancements(script=None, inputEvent=None):
# easier to see, such as increasing its size, changing its
# color, and surrounding it with crosshairs.
#
- speech.speak(_("Mouse enhancements enabled."))
+ orca_state.activeScript.presentMessage(_("Mouse enhancements enabled."))
orca_state.mouseEnhancementsEnabled = \
not orca_state.mouseEnhancementsEnabled
@@ -1643,7 +1644,7 @@ def increaseMagnification(script=None, inputEvent=None):
newLevel = levelX + increment
if newLevel <= 16:
setZoomerMagFactor(newLevel, newLevel)
- speech.speak(str(newLevel))
+ orca_state.activeScript.presentMessage(str(newLevel))
return True
@@ -1668,7 +1669,7 @@ def decreaseMagnification(script=None, inputEvent=None):
newLevel = levelX - increment
if newLevel >= 1:
setZoomerMagFactor(newLevel, newLevel)
- speech.speak(str(newLevel))
+ orca_state.activeScript.presentMessage(str(newLevel))
return True
@@ -1681,14 +1682,14 @@ def toggleMagnifier(script=None, inputEvent=None):
# magnifier. In addition to screen magnification, the user's
# preferred colors and mouse customizations are loaded.
#
- speech.speak(_("Magnifier enabled."))
+ orca_state.activeScript.presentMessage(_("Magnifier enabled."))
else:
shutdown()
# Translators: this is the message spoken when a user disables the
# magnifier, restoring the screen contents to their normal colors
# and sizes.
#
- speech.speak(_("Magnifier disabled."))
+ orca_state.activeScript.presentMessage(_("Magnifier disabled."))
return True
@@ -1774,6 +1775,6 @@ def cycleZoomerType(script=None, inputEvent=None):
# This shouldn't happen, but just in case....
zoomerType = ""
- speech.speak(zoomerType)
+ orca_state.activeScript.presentMessage(zoomerType)
return True
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 6a86300..6397784 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -358,7 +358,9 @@ def cycleDebugLevel(script=None, inputEvent=None):
debug.debugLevel = levels[levelIndex]
- speech.speak("Debug level %s." % levels[levelIndex + 1])
+ briefMessage = levels[levelIndex + 1]
+ fullMessage = "Debug level %s." % briefMessage
+ orca_state.activeScript.presentMessage(fullMessage, briefMessage)
return True
@@ -1342,7 +1344,7 @@ def listShortcuts(event):
orca_state.activeScript.presentMessage(message)
message = orca_state.listOfShortcuts[orca_state.ptrToShortcut][0]+ \
" " + orca_state.listOfShortcuts[orca_state.ptrToShortcut][1]
- speech.speak(message)
+ orca_state.activeScript.speakMessage(message)
orca_state.activeScript.displayBrailleMessage(message, -1, -1)
consumed = True
elif (event.event_string == "2"):
@@ -1365,7 +1367,7 @@ def listShortcuts(event):
message = \
orca_state.listOfShortcuts[orca_state.ptrToShortcut][0] + \
" " + orca_state.listOfShortcuts[orca_state.ptrToShortcut][1]
- speech.speak(message)
+ orca_state.activeScript.speakMessage(message)
orca_state.activeScript.displayBrailleMessage(message, -1, -1)
else:
# Translators: This message is presented when the user is in
@@ -1375,7 +1377,7 @@ def listShortcuts(event):
#
message = _("No Orca shortcuts for %s found.") % \
(orca_state.activeScript.app.name)
- speech.speak(message)
+ orca_state.activeScript.speakMessage(message)
orca_state.activeScript.displayBrailleMessage(message, -1, -1)
consumed = True
elif (event.event_string == "Up"):
@@ -1396,7 +1398,7 @@ def listShortcuts(event):
message = \
orca_state.listOfShortcuts[orca_state.ptrToShortcut][0] + \
" " + orca_state.listOfShortcuts[orca_state.ptrToShortcut][1]
- speech.speak(message)
+ orca_state.activeScript.speakMessage(message)
orca_state.activeScript.displayBrailleMessage(message, -1, -1)
consumed = True
elif (event.event_string == "Down"):
@@ -1416,7 +1418,7 @@ def listShortcuts(event):
message = \
orca_state.listOfShortcuts[orca_state.ptrToShortcut][0] + \
" " + orca_state.listOfShortcuts[orca_state.ptrToShortcut][1]
- speech.speak(message)
+ orca_state.activeScript.speakMessage(message)
orca_state.activeScript.displayBrailleMessage(message, -1, -1)
consumed = True
elif (event.event_string == "Escape"):
@@ -1434,7 +1436,7 @@ def listShortcuts(event):
message = _("Press 1 for Orca's default shortcuts. Press 2 for " \
"Orca's shortcuts for the current application. " \
"Press escape to exit.")
- speech.speak(message)
+ orca_state.activeScript.speakMessage(message)
orca_state.activeScript.displayBrailleMessage(message, -1, -1)
consumed = True
elif (event.type == pyatspi.KEY_RELEASED_EVENT) and (event.event_string \
@@ -1673,8 +1675,7 @@ def shutdown(script=None, inputEvent=None):
# Translators: this is what Orca speaks and brailles when it quits.
#
- speech.speak(_("Goodbye."))
- braille.displayMessage(_("Goodbye."))
+ orca_state.activeScript.presentMessage(_("Goodbye."))
# Deregister our event listeners
#
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index d67aebb..d1cf63a 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -491,9 +491,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
if orca_prefs.writePreferences(self.prefsDict, self.keyBindingsModel,
self.pronunciationModel):
- self._say( \
+ self._presentMessage(
_("Accessibility support for GNOME has just been enabled."))
- self._say( \
+ self._presentMessage(
_("You need to log out and log back in for the change to " \
"take effect."))
@@ -2253,19 +2253,21 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.get_widget("enableDiacriticalKeysCheckButton").set_sensitive( \
enable)
- def _say(self, text, stop=False):
- """If the text field is not None, speaks the given text, optionally
+ def _presentMessage(self, text, interrupt=False):
+ """If the text field is not None, presents the given text, optionally
interrupting anything currently being spoken.
Arguments:
- - text: the text to print and speak
- - stop: if True, interrupt any speech currently being spoken
+ - text: the text to present
+ - interrupt: if True, interrupt any speech currently being spoken
"""
- if stop:
- speech.stop()
-
- speech.speak(text)
+ defScript = default.Script(None)
+ defScript.speakMessage(text, interrupt=interrupt)
+ try:
+ defScript.displayBrailleMessage(text, flashTime=-1)
+ except:
+ pass
def _createNode(self, appName):
"""Create a new root node in the TreeStore model with the name of the
@@ -3806,7 +3808,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
# a new key combination (e.g., Alt+Ctrl+g) to create a new
# key bindings.
#
- speech.speak(_("enter new key"))
+ self._presentMessage(_("enter new key"))
orca_state.capturingKeys = True
editable.connect('key-press-event', self.kbKeyPressed)
return
@@ -3835,7 +3837,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
# Orca has deleted an existing key combination based upon
# their input.
#
- speech.speak(_("Key binding deleted. Press enter to confirm."))
+ self._presentMessage(
+ _("Key binding deleted. Press enter to confirm."))
return True
clickCount = orca_state.clickCount
@@ -3859,17 +3862,16 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
# that the key combination (e.g., Ctrl+Alt+f) they just
# entered has already been bound to another command.
#
- speech.speak(_("The key entered is already bound to %s") % \
- description)
+ msg = _("The key entered is already bound to %s") % description
else:
# Translators: this is a spoken prompt letting the user know Orca
# know Orca has recorded a new key combination (e.g., Alt+Ctrl+g)
# based upon their input.
#
- speech.speak(_("Key captured: %s. Press enter to confirm.") % \
- newString)
+ msg = _("Key captured: %s. Press enter to confirm.") % newString
editable.set_text(newString)
+ self._presentMessage(msg)
return True
def editedKey(self, cell, path, new_text, treeModel,
@@ -3916,7 +3918,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
message = _("The keybinding has been removed.")
if modified:
- speech.speak(message)
+ self._presentMessage(message)
self.pendingKeyBindings[originalBinding] = ""
return
@@ -5025,8 +5027,12 @@ def showPreferencesUI():
# Translators: Orca Preferences is the configuration GUI for Orca.
#
line = _("Starting Orca Preferences.")
- braille.displayMessage(line)
- speech.speak(line)
+ defScript = default.Script(None)
+ defScript.speakMessage(line)
+ try:
+ defScript.displayBrailleMessage(line, flashTime=-1)
+ except:
+ pass
prefsDict = orca_prefs.readPreferences()
orca_state.prefsUIFile = \
diff --git a/src/orca/scripts/apps/acroread/script.py b/src/orca/scripts/apps/acroread/script.py
index cde9df0..eb6a001 100644
--- a/src/orca/scripts/apps/acroread/script.py
+++ b/src/orca/scripts/apps/acroread/script.py
@@ -274,12 +274,12 @@ class Script(default.Script):
#
line = _("table with %(rows)d rows and %(columns)d columns.") \
% {"rows" : newFocusRows, "columns" : newFocusColumns}
- speech.speak(line)
+ self.presentMessage(line)
elif oldFocusIsTable and not newFocusIsTable:
# We've left a table. Announce this fact.
#
- speech.speak(_("leaving table."))
+ self.presentMessage(_("leaving table."))
elif oldFocusIsTable and newFocusIsTable:
# See if we've crossed a cell boundary. If so, speak
@@ -299,13 +299,13 @@ class Script(default.Script):
#
line = _("row %(row)d, column %(column)d") \
% {"row": newRow, "column": newCol}
- speech.speak(line)
+ self.presentMessage(line)
elif newCol != oldCol:
# Translators: this represents the column we're
# on in a table.
#
line = _("column %d") % newCol
- speech.speak(line)
+ self.presentMessage(line)
def isInFindToolbar(self, obj):
"""Examines the current object to identify if it is in the Find
diff --git a/src/orca/scripts/apps/gedit/script.py b/src/orca/scripts/apps/gedit/script.py
index 5281760..071f38c 100644
--- a/src/orca/scripts/apps/gedit/script.py
+++ b/src/orca/scripts/apps/gedit/script.py
@@ -263,9 +263,9 @@ class Script(default.Script):
#
if badWord == _("Completed spell checking"):
utterance = _("Spell checking is complete.")
- speech.speak(utterance)
+ self.presentMessage(utterance)
utterance = _("Press Tab and Return to terminate.")
- speech.speak(utterance)
+ self.presentMessage(utterance)
return
# If we have a handle to the gedit text area, then extract out
@@ -563,7 +563,7 @@ class Script(default.Script):
# Translators: this indicates a find command succeeded in
# finding something.
#
- speech.speak(_("Phrase found."))
+ self.presentMessage(_("Phrase found."))
utterances = self.speechGenerator.generateSpeech(
event.source, alreadyFocused=True)
speech.speak(utterances)
diff --git a/src/orca/scripts/apps/gnome-search-tool/script.py b/src/orca/scripts/apps/gnome-search-tool/script.py
index 6d4af54..ded3553 100644
--- a/src/orca/scripts/apps/gnome-search-tool/script.py
+++ b/src/orca/scripts/apps/gnome-search-tool/script.py
@@ -27,7 +27,6 @@ __license__ = "LGPL"
import orca.debug as debug
import orca.default as default
-import orca.speech as speech
from orca.orca_i18n import _ # for gettext support
from orca.orca_i18n import ngettext # for gettext support
@@ -97,7 +96,7 @@ class Script(default.Script):
currentTime = time.time()
if not self.startTime or \
(currentTime > (self.startTime + self.searchInterval)):
- speech.speak(_("Searching."))
+ self.presentMessage(_("Searching."))
self.startTime = time.time()
return True
@@ -169,7 +168,7 @@ class Script(default.Script):
+ "search completed.")
self.searching = False
- speech.speak(_("Search complete."))
+ self.presentMessage(_("Search complete."))
sensitive = self.fileTable.getState().contains( \
pyatspi.STATE_SENSITIVE)
if sensitive:
@@ -180,9 +179,9 @@ class Script(default.Script):
noFilesString = ngettext("%d file found",
"%d files found",
fileCount) % fileCount
- speech.speak(noFilesString)
+ self.presentMessage(noFilesString)
else:
- speech.speak(_("No files found."))
+ self.presentMessage(_("No files found."))
# Pass the event onto the parent class to be handled in the default way.
#
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 222ed7a..c86044f 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -721,14 +721,14 @@ class Script(default.Script):
if oldTable:
# We've left a table. Announce this fact.
#
- speech.speak(_("leaving table."))
+ self.presentMessage(_("leaving table."))
if newTable:
# We've entered a table. Announce the dimensions.
#
line = _("table with %(rows)d rows and %(columns)d columns.") \
% {"rows" : newTable.nRows,
"columns" : newTable.nColumns}
- speech.speak(line)
+ self.presentMessage(line)
if not newTable:
self.lastCell = [None, -1]
@@ -1368,8 +1368,8 @@ class Script(default.Script):
"StarOffice.locusOfFocusChanged - Setup dialog: " \
+ "License Agreement screen: Scroll Down button.")
self.handleSetupPanel(event.source.parent)
- speech.speak(_("Note that the Scroll Down button has " \
- "to be pressed numerous times."))
+ self.presentMessage(_("Note that the Scroll Down button has " \
+ "to be pressed numerous times."))
# Check for 2. License Agreement: Accept button.
#
@@ -1383,7 +1383,7 @@ class Script(default.Script):
debug.println(self.debugLevel,
"StarOffice.locusOfFocusChanged - Setup dialog: " \
+ "License Agreement screen: accept button.")
- speech.speak( \
+ self.presentMessage(
_("License Agreement Accept button now has focus."))
# Check for 3. Personal Data: Transfer Personal Data check box.
@@ -1488,7 +1488,7 @@ class Script(default.Script):
# in StarOffice/OpenOffice calc that allows you to type in a
# cell coordinate (e.g., A4) and then move to it.
#
- speech.speak(_("Move to cell"))
+ self.presentMessage(_("Move to cell"))
return
# Check to see if this is a Calc: spread sheet cell. If it is then
diff --git a/src/orca/scripts/apps/soffice/structural_navigation.py b/src/orca/scripts/apps/soffice/structural_navigation.py
index 063d450..6a1bfcc 100644
--- a/src/orca/scripts/apps/soffice/structural_navigation.py
+++ b/src/orca/scripts/apps/soffice/structural_navigation.py
@@ -120,9 +120,9 @@ class StructuralNavigation(structural_navigation.StructuralNavigation):
# Translators: this represents the (row, col) position of
# a cell in a table.
#
- speech.speak(_("Row %(row)d, column %(column)d.") \
- % {"row" : row + 1, "column" : col + 1})
+ self._script.presentMessage(_("Row %(row)d, column %(column)d.") \
+ % {"row" : row + 1, "column" : col + 1})
spanString = self._getCellSpanInfo(cell)
if spanString and settings.speakCellSpan:
- speech.speak(spanString)
+ self._script.presentMessage(spanString)
diff --git a/src/orca/scripts/toolkits/Gecko/bookmarks.py b/src/orca/scripts/toolkits/Gecko/bookmarks.py
index 4a18f9f..505deaa 100644
--- a/src/orca/scripts/toolkits/Gecko/bookmarks.py
+++ b/src/orca/scripts/toolkits/Gecko/bookmarks.py
@@ -104,14 +104,15 @@ class GeckoBookmarks(bookmarks.Bookmarks):
# Translators: this announces that the current object is the same
# object pointed to by the bookmark.
#
- speech.speak(_('bookmark is current object'))
+ self._script.presentMessage(_('bookmark is current object'))
return
# Are their parents the same?
elif self._script.utilities.isSameObject(cur_obj.parent, obj.parent):
# Translators: this announces that the current object's parent and
# the parent of the object pointed to by the bookmark are the same.
#
- speech.speak(_('bookmark and current object have same parent'))
+ self._script.presentMessage(
+ _('bookmark and current object have same parent'))
return
# Do they share a common ancestor?
@@ -128,14 +129,15 @@ class GeckoBookmarks(bookmarks.Bookmarks):
# Translators: this announces that the bookmark and the current
# object share a common ancestor
#
- speech.speak(_('shared ancestor %s') %p.getRole())
+ self._script.presentMessage(
+ _('shared ancestor %s') % p.getRole())
return
p = p.parent
# Translators: This announces that a comparison between the bookmark
# and the current object can not be determined.
#
- speech.speak(_('comparison unknown'))
+ self._script.presentMessage(_('comparison unknown'))
def saveBookmarks(self, inputEvent):
""" Save the bookmarks for this script. """
@@ -150,12 +152,12 @@ class GeckoBookmarks(bookmarks.Bookmarks):
# Translators: this announces that a bookmark has been saved to
# disk
#
- speech.speak(_('bookmarks saved'))
+ self._script.presentMessage(_('bookmarks saved'))
except IOError:
# Translators: this announces that a bookmark could not be saved to
# disk
#
- speech.speak(_('bookmarks could not be saved'))
+ self._script.presentMessage(_('bookmarks could not be saved'))
# Notify the observers
for o in self._saveObservers:
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 7dbf299..640ad85 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -393,7 +393,7 @@ class StructuralNavigationObject:
# Translators: this announces to the user that live region
# support has been turned off.
#
- speech.speak(_("Live region support is off"))
+ script.presentMessage(_("Live region support is off"))
if self.objType == StructuralNavigation.TABLE_CELL:
return goCell
@@ -2946,7 +2946,7 @@ class StructuralNavigation:
itemString = ngettext("List with %d item",
"List with %d items",
nItems) % nItems
- speech.speak(itemString)
+ self._script.presentMessage(itemString)
nestingLevel = 0
parent = obj.parent
while parent.getRole() == pyatspi.ROLE_LIST:
@@ -2958,7 +2958,8 @@ class StructuralNavigation:
# level of 2 represents a list item inside a list that's
# inside another list).
#
- speech.speak(_("Nesting level %d") % nestingLevel)
+ self._script.presentMessage(_("Nesting level %d") % \
+ nestingLevel)
[obj, characterOffset] = self._getCaretPosition(obj)
self._setCaretPosition(obj, characterOffset)
self._presentLine(obj, characterOffset)
@@ -3489,8 +3490,8 @@ class StructuralNavigation:
if obj:
caption = self._getTableCaption(obj)
if caption:
- speech.speak(caption)
- speech.speak(self._getTableDescription(obj))
+ self._script.presentMessage(caption)
+ self._script.presentMessage(self._getTableDescription(obj))
cell = obj.queryTable().getAccessibleAt(0, 0)
self.lastTableCell = [0, 0]
[cell, characterOffset] = self._getCaretPosition(cell)
@@ -3611,12 +3612,12 @@ class StructuralNavigation:
# Translators: this represents the (row, col) position of
# a cell in a table.
#
- speech.speak(_("Row %(row)d, column %(column)d.") \
- % {"row" : row + 1, "column" : col + 1})
+ self._script.presentMessage(_("Row %(row)d, column %(column)d.") \
+ % {"row" : row + 1, "column" : col + 1})
spanString = self._getCellSpanInfo(cell)
if spanString and settings.speakCellSpan:
- speech.speak(spanString)
+ self._script.presentMessage(spanString)
########################
# #
diff --git a/test/keystrokes/oowriter/bug_382408.py b/test/keystrokes/oowriter/bug_382408.py
index 6519aea..1e8ec1e 100644
--- a/test/keystrokes/oowriter/bug_382408.py
+++ b/test/keystrokes/oowriter/bug_382408.py
@@ -51,7 +51,9 @@ sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"Type a down arrow to move to the Mon table column header",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Sun Mon Tue Wed Thu Fri Sat") + "'",
+ ["BRAILLE LINE: 'table with 7 rows and 7 columns.'",
+ " VISIBLE: 'table with 7 rows and 7 columns.', cursor=0",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Sun Mon Tue Wed Thu Fri Sat") + "'",
" VISIBLE: 'Mon Tue Wed Thu Fri Sat', cursor=1",
"SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
"SPEECH OUTPUT: 'Sun Mon Tue Wed Thu Fri Sat'"]))
diff --git a/test/keystrokes/oowriter/bug_382415.py b/test/keystrokes/oowriter/bug_382415.py
index 0dbccf3..c46b7ad 100644
--- a/test/keystrokes/oowriter/bug_382415.py
+++ b/test/keystrokes/oowriter/bug_382415.py
@@ -42,9 +42,11 @@ sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"Down arrow to move to the Mon table column header",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
+ ["BRAILLE LINE: 'table with 7 rows and 7 columns.'",
+ " VISIBLE: 'table with 7 rows and 7 columns.', cursor=0",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
" VISIBLE: 'Mon Paragraph', cursor=1",
- "SPEECH OUTPUT: 'table with 7 rows and 7 columns.",
+ "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
"SPEECH OUTPUT: 'Mon'",
"SPEECH OUTPUT: 'Cell B1'"]))
diff --git a/test/keystrokes/oowriter/bug_382418.py b/test/keystrokes/oowriter/bug_382418.py
index 2601c37..14752b3 100644
--- a/test/keystrokes/oowriter/bug_382418.py
+++ b/test/keystrokes/oowriter/bug_382418.py
@@ -79,7 +79,9 @@ sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"Type a down arrow to enter the table",
- ["BRAILLE LINE: 'soffice Application Untitled 2 - " + utils.getOOoName("Writer") + " Frame Untitled 2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",
+ ["BRAILLE LINE: 'table with 2 rows and 2 columns.'",
+ " VISIBLE: 'table with 2 rows and 2 columns.', cursor=0",
+ "BRAILLE LINE: 'soffice Application Untitled 2 - " + utils.getOOoName("Writer") + " Frame Untitled 2 - " + utils.getOOoName("Writer") + " RootPane ScrollPane Document view Table1-1 Table Paragraph'",
" VISIBLE: 'Paragraph', cursor=1",
"SPEECH OUTPUT: 'table with 2 rows and 2 columns.'",
"SPEECH OUTPUT: 'blank'",
diff --git a/test/keystrokes/oowriter/bug_382880.py b/test/keystrokes/oowriter/bug_382880.py
index 075955b..d547126 100644
--- a/test/keystrokes/oowriter/bug_382880.py
+++ b/test/keystrokes/oowriter/bug_382880.py
@@ -42,9 +42,11 @@ sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"Type a down arrow to move to the Mon table column header",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
+ ["BRAILLE LINE: 'table with 7 rows and 7 columns.'",
+ " VISIBLE: 'table with 7 rows and 7 columns.', cursor=0",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
" VISIBLE: 'Mon Paragraph', cursor=1",
- "SPEECH OUTPUT: 'table with 7 rows and 7 columns.",
+ "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
"SPEECH OUTPUT: 'Mon'",
"SPEECH OUTPUT: 'Cell B1'"]))
diff --git a/test/keystrokes/oowriter/bug_382888.py b/test/keystrokes/oowriter/bug_382888.py
index 768b695..21dccc8 100644
--- a/test/keystrokes/oowriter/bug_382888.py
+++ b/test/keystrokes/oowriter/bug_382888.py
@@ -42,7 +42,9 @@ sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"Type a down arrow to move to the Mon table column header",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
+ ["BRAILLE LINE: 'table with 7 rows and 7 columns.'",
+ " VISIBLE: 'table with 7 rows and 7 columns.', cursor=0",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
" VISIBLE: 'Mon Paragraph', cursor=1",
"SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
"SPEECH OUTPUT: 'Mon'",
diff --git a/test/keystrokes/oowriter/bug_450210.py b/test/keystrokes/oowriter/bug_450210.py
index efc5afa..5ad29e0 100644
--- a/test/keystrokes/oowriter/bug_450210.py
+++ b/test/keystrokes/oowriter/bug_450210.py
@@ -39,7 +39,7 @@ sequence.append(utils.AssertPresentationAction(
"BRAILLE LINE: 'soffice Application Open Dialog Open OptionPane File name: $l'",
" VISIBLE: 'File name: $l', cursor=12",
"SPEECH OUTPUT: 'Open'",
- "SPEECH OUTPUT: 'File name: combo box File name: text '"]))
+ "SPEECH OUTPUT: 'File name: combo box File name: text'"]))
######################################################################
# 4. Press Escape to dismiss the Open File Chooser.
diff --git a/test/keystrokes/oowriter/table_cells.py b/test/keystrokes/oowriter/table_cells.py
index 9cdd589..2c492c8 100644
--- a/test/keystrokes/oowriter/table_cells.py
+++ b/test/keystrokes/oowriter/table_cells.py
@@ -40,9 +40,11 @@ sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"1. Down",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
+ ["BRAILLE LINE: 'table with 7 rows and 7 columns.'",
+ " VISIBLE: 'table with 7 rows and 7 columns.', cursor=0",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
" VISIBLE: 'Mon Paragraph', cursor=1",
- "SPEECH OUTPUT: 'table with 7 rows and 7 columns.",
+ "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
"SPEECH OUTPUT: 'Mon'",
"SPEECH OUTPUT: 'Cell B1'"]))
diff --git a/test/keystrokes/oowriter/table_cells_structural_navigation1.py b/test/keystrokes/oowriter/table_cells_structural_navigation1.py
index 29a3e22..330d4d0 100644
--- a/test/keystrokes/oowriter/table_cells_structural_navigation1.py
+++ b/test/keystrokes/oowriter/table_cells_structural_navigation1.py
@@ -40,9 +40,11 @@ sequence.append(KeyComboAction("Down"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"1. Down",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
+ ["BRAILLE LINE: 'table with 7 rows and 7 columns.'",
+ " VISIBLE: 'table with 7 rows and 7 columns.', cursor=0",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample(.odt|)", "Calendar-1 Table Mon Paragraph") + "'",
" VISIBLE: 'Mon Paragraph', cursor=1",
- "SPEECH OUTPUT: 'table with 7 rows and 7 columns.",
+ "SPEECH OUTPUT: 'table with 7 rows and 7 columns.'",
"SPEECH OUTPUT: 'Mon'",
"SPEECH OUTPUT: 'Cell B1'"]))
@@ -86,6 +88,8 @@ sequence.append(utils.AssertPresentationAction(
" VISIBLE: '4 Paragraph', cursor=1",
"BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 3 Paragraph") + "'",
" VISIBLE: '3 Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 3, column 1.'",
+ " VISIBLE: 'Row 3, column 1.', cursor=0",
"SPEECH OUTPUT: '3'",
"SPEECH OUTPUT: 'Row 3, column 1.'"]))
@@ -93,7 +97,9 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Alt><Shift>Left"))
sequence.append(utils.AssertPresentationAction(
"2. Alt Shift Left.",
- ["BRAILLE LINE: 'Beginning of row.'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 3 Paragraph") + "'",
+ " VISIBLE: '3 Paragraph', cursor=1",
+ "BRAILLE LINE: 'Beginning of row.'",
" VISIBLE: 'Beginning of row.', cursor=0",
"SPEECH OUTPUT: 'Beginning of row.'"]))
@@ -106,6 +112,8 @@ sequence.append(utils.AssertPresentationAction(
" VISIBLE: '3 Paragraph', cursor=1",
"BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 4 Paragraph") + "'",
" VISIBLE: '4 Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 3, column 2.'",
+ " VISIBLE: 'Row 3, column 2.', cursor=0",
"SPEECH OUTPUT: '4'",
"SPEECH OUTPUT: 'Row 3, column 2.'"]))
@@ -114,8 +122,12 @@ sequence.append(KeyComboAction("<Alt><Shift>Right"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"4. Alt Shift Right.",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 5 Paragraph") + "'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 4 Paragraph") + "'",
+ " VISIBLE: '4 Paragraph', cursor=1",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 5 Paragraph") + "'",
" VISIBLE: '5 Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 3, column 3.'",
+ " VISIBLE: 'Row 3, column 3.', cursor=0",
"SPEECH OUTPUT: '5'",
"SPEECH OUTPUT: 'Row 3, column 3.'"]))
@@ -124,8 +136,14 @@ sequence.append(KeyComboAction("<Alt><Shift>Right"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"5. Alt Shift Right.",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 6 Paragraph 7 Paragraph") + "'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 5 Paragraph") + "'",
+ " VISIBLE: '5 Paragraph', cursor=1",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 6 Paragraph 7 Paragraph") + "'",
" VISIBLE: '6 Paragraph 7 Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 3, column 4.'",
+ " VISIBLE: 'Row 3, column 4.', cursor=0",
+ "BRAILLE LINE: 'Cell spans 2 columns'",
+ " VISIBLE: 'Cell spans 2 columns', cursor=0",
"SPEECH OUTPUT: '6'",
"SPEECH OUTPUT: '7'",
"SPEECH OUTPUT: 'Row 3, column 4.'",
@@ -136,8 +154,12 @@ sequence.append(KeyComboAction("<Alt><Shift>Up"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"6. Alt Shift Up.",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Paragraph") + "'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table 6 Paragraph 7 Paragraph") + "'",
+ " VISIBLE: '6 Paragraph 7 Paragraph', cursor=1",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Paragraph") + "'",
" VISIBLE: 'Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 2, column 4.'",
+ " VISIBLE: 'Row 2, column 4.', cursor=0",
"SPEECH OUTPUT: 'blank'",
"SPEECH OUTPUT: 'Row 2, column 4.'"]))
@@ -146,8 +168,12 @@ sequence.append(KeyComboAction("<Alt><Shift>Up"))
sequence.append(WaitForFocus("", acc_role=pyatspi.ROLE_PARAGRAPH))
sequence.append(utils.AssertPresentationAction(
"7. Alt Shift Up.",
- ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Wed Paragraph") + "'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Paragraph") + "'",
+ " VISIBLE: 'Paragraph', cursor=1",
+ "BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Wed Paragraph") + "'",
" VISIBLE: 'Wed Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 1, column 4.'",
+ " VISIBLE: 'Row 1, column 4.', cursor=0",
"SPEECH OUTPUT: 'Wed'",
"SPEECH OUTPUT: 'Row 1, column 4.'"]))
@@ -155,7 +181,9 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Alt><Shift>Up"))
sequence.append(utils.AssertPresentationAction(
"8. Alt Shift Up.",
- ["BRAILLE LINE: 'Top of column.'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Wed Paragraph") + "'",
+ " VISIBLE: 'Wed Paragraph', cursor=1",
+ "BRAILLE LINE: 'Top of column.'",
" VISIBLE: 'Top of column.', cursor=0",
"SPEECH OUTPUT: 'Top of column.'"]))
@@ -168,6 +196,8 @@ sequence.append(utils.AssertPresentationAction(
" VISIBLE: 'Wed Paragraph', cursor=1",
"BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Paragraph") + "'",
" VISIBLE: 'Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 7, column 7.'",
+ " VISIBLE: 'Row 7, column 7.', cursor=0",
"SPEECH OUTPUT: 'blank'",
"SPEECH OUTPUT: 'Row 7, column 7.'"]))
@@ -175,7 +205,9 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Alt><Shift>Down"))
sequence.append(utils.AssertPresentationAction(
"10. Alt Shift Down.",
- ["BRAILLE LINE: 'Bottom of column.'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Paragraph") + "'",
+ " VISIBLE: 'Paragraph', cursor=1",
+ "BRAILLE LINE: 'Bottom of column.'",
" VISIBLE: 'Bottom of column.', cursor=0",
"SPEECH OUTPUT: 'Bottom of column.'"]))
@@ -198,6 +230,8 @@ sequence.append(utils.AssertPresentationAction(
" VISIBLE: 'Paragraph', cursor=1",
"BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Sun Paragraph") + "'",
" VISIBLE: 'Sun Paragraph', cursor=1",
+ "BRAILLE LINE: 'Row 1, column 1.'",
+ " VISIBLE: 'Row 1, column 1.', cursor=0",
"SPEECH OUTPUT: 'Sun'",
"SPEECH OUTPUT: 'Row 1, column 1.'"]))
@@ -205,7 +239,9 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Alt><Shift>Up"))
sequence.append(utils.AssertPresentationAction(
"13. Alt Shift Up.",
- ["BRAILLE LINE: 'Top of column.'",
+ ["BRAILLE LINE: '" + utils.getOOoBrailleLine("Writer", "table-sample2(.odt|)", "Calendar-1 Table Sun Paragraph") + "'",
+ " VISIBLE: 'Sun Paragraph', cursor=1",
+ "BRAILLE LINE: 'Top of column.'",
" VISIBLE: 'Top of column.', cursor=0",
"SPEECH OUTPUT: 'Top of column.'"]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]