[orca/570658-whereami] Change forceMessage to forceTutorial



commit 162f8639e59379e4dc49e0f8eebf71df5f731c08
Author: Willie Walker <william walker sun com>
Date:   Wed Jun 3 11:52:17 2009 -0400

    Change forceMessage to forceTutorial
---
 src/orca/speech_generator.py  |    6 +-
 src/orca/tutorialgenerator.py |  204 ++++++++++++++++++++--------------------
 src/orca/where_am_I.py        |    9 +-
 3 files changed, 108 insertions(+), 111 deletions(-)

diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index bed9a68..5035752 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1817,14 +1817,14 @@ class SpeechGenerator:
         The tutorial will only be generated if the user has requested
         tutorials, and will then be generated according to the
         tutorial generator.  A tutorial can be forced by setting the
-        'forceMessage' attribute of the args dictionary to True.
+        'forceTutorial' attribute of the args dictionary to True.
         """
         already_focused = args.get('already_focused', False)
-        forceMessage = args.get('forceMessage', False)
+        forceTutorial = args.get('forceTutorial', False)
         return self._script.tutorialGenerator.getTutorial(
             obj,
             already_focused,
-            forceMessage)
+            forceTutorial)
 
     #####################################################################
     #                                                                   #
diff --git a/src/orca/tutorialgenerator.py b/src/orca/tutorialgenerator.py
index ca42154..8da5dc6 100644
--- a/src/orca/tutorialgenerator.py
+++ b/src/orca/tutorialgenerator.py
@@ -1,6 +1,6 @@
 # Orca
 #
-# Copyright 2008 Sun Microsystems Inc.
+# Copyright 2008-2009 Sun Microsystems Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -26,7 +26,7 @@ as they see fit."""
 __id__        = "$Id$"
 __version__   = "$Revision$"
 __date__      = "$Date$"
-__copyright__ = "Copyright (c) 2008 Sun Microsystems Inc."
+__copyright__ = "Copyright (c) 2008-2009 Sun Microsystems Inc."
 __license__   = "LGPL"
 
 import pyatspi
@@ -36,9 +36,9 @@ import settings
 from orca_i18n import _         # for gettext support
 
 class TutorialGenerator:
-    """Takes accessible objects and produces a tutorial string to speak 
-    for those objects.  See the getTutorialString method, which is the 
-    primary entry point.  Subclasses can feel free to override/extend 
+    """Takes accessible objects and produces a tutorial string to speak
+    for those objects.  See the getTutorialString method, which is the
+    primary entry point.  Subclasses can feel free to override/extend
     the getTutorialGenerators instance field as they see fit."""
 
     def __init__(self, script):
@@ -95,12 +95,12 @@ class TutorialGenerator:
         self.tutorialGenerators[pyatspi.ROLE_MENU_ITEM]           = \
             self._getTutorialForPushButton
         self.tutorialGenerators[pyatspi.ROLE_RADIO_MENU_ITEM]     = \
-            self._getTutorialForCheckBox        
+            self._getTutorialForCheckBox
         self.tutorialGenerators[pyatspi.ROLE_SLIDER]              = \
             self._getTutorialForSlider
 
     def _debugGenerator(self, generatorName, obj, already_focused, utterances):
-        """Prints debug.LEVEL_FINER information regarding 
+        """Prints debug.LEVEL_FINER information regarding
         the tutorial generator.
 
         Arguments:
@@ -124,16 +124,16 @@ class TutorialGenerator:
             debug.println(debug.LEVEL_FINER,
                     "               (%s)" % text)
 
-    def _getDefaultTutorial(self, obj, already_focused, forceMessage, \
-      role=None):
+    def _getDefaultTutorial(
+        self, obj, already_focused, forceTutorial, role=None):
         """The default tutorial generator returns the empty tutorial string
         because We have no associated tutorial function for the object.
-        
+
         Arguments:
         - obj: an Accessible
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
-        - role: A role that should be used instead of the Accessible's 
+        - forceTutorial: used for when whereAmI really needs the tutorial string
+        - role: A role that should be used instead of the Accessible's
           possible role.
 
         Returns the empty list []
@@ -142,13 +142,13 @@ class TutorialGenerator:
         return []
 
 
-    def _getTutorialForCheckBox(self, obj, already_focused, forceMessage):
+    def _getTutorialForCheckBox(self, obj, already_focused, forceTutorial):
         """Get the  tutorial string for a check box.
 
         Arguments:
         - obj: the check box
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
@@ -157,7 +157,7 @@ class TutorialGenerator:
         # Translators: this is a tip for the user on how to toggle a checkbox.
         msg = _("Press space to toggle.")
 
-        if (not already_focused and self.lastTutorial != [msg]) or forceMessage:
+        if (not already_focused and self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForCheckBox",
@@ -167,23 +167,23 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForComboBox(self, obj, already_focused, forceMessage):
+    def _getTutorialForComboBox(self, obj, already_focused, forceTutorial):
         """Get the  tutorial string for a combobox.
 
         Arguments:
         - obj: the combo box
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
 
         utterances = []
-        # Translators: this is a tip for the user on how to interact 
+        # Translators: this is a tip for the user on how to interact
         # with a combobox.
         msg = _("Press space to expand, and use up and down to select an item.")
 
-        if (not already_focused and self.lastTutorial != [msg]) or forceMessage:
+        if (not already_focused and self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForComboBox",
@@ -193,13 +193,13 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForFrame(self, obj, already_focused, forceMessage):
+    def _getTutorialForFrame(self, obj, already_focused, forceTutorial):
         """Get the  tutorial string for a frame.
 
         Arguments:
         - obj: the frame
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
@@ -227,13 +227,13 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForIcon(self, obj, already_focused, forceMessage):
+    def _getTutorialForIcon(self, obj, already_focused, forceTutorial):
         """Get the  tutorial string for an icon.
 
         Arguments:
         - obj: the icon
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
@@ -241,11 +241,11 @@ class TutorialGenerator:
         if obj.parent.getRole() == pyatspi.ROLE_LAYERED_PANE:
             utterances = self._getTutorialForLayeredPane(obj.parent,
                                                          already_focused,
-                                                         forceMessage)
+                                                         forceTutorial)
         else:
             utterances = self._getDefaultTutorial(obj,
                                                   already_focused,
-                                                  forceMessage)
+                                                  forceTutorial)
 
         self._debugGenerator("_getTutorialForIcon",
                              obj,
@@ -254,13 +254,13 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForLayeredPane(self, obj, already_focused, forceMessage):
+    def _getTutorialForLayeredPane(self, obj, already_focused, forceTutorial):
         """Get the  tutorial string for a layered pane.
 
         Arguments:
         - obj: the layered pane
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
@@ -270,13 +270,13 @@ class TutorialGenerator:
         if not name and obj.description:
             name = obj.description
 
-        # Translators: this gives tips on how to navigate items in a 
+        # Translators: this gives tips on how to navigate items in a
         # layered pane.
         msg = _("To move to items, use either " \
                 "the arrow keys or type ahead searching.")
         utterances.append(msg)
- 
-        # Translators: this is the tutorial string for when first landing 
+
+        # Translators: this is the tutorial string for when first landing
         # on the desktop, describing how to access the system menus.
         desktopMsg = _("To get to the system menus press the alt+f1 key.")
 
@@ -286,7 +286,7 @@ class TutorialGenerator:
             utterances.append(desktopMsg)
 
         if (not already_focused and self.lastTutorial != utterances) \
-            or forceMessage:
+            or forceTutorial:
             pass
         else:
             utterances = []
@@ -298,23 +298,23 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForList(self, obj, already_focused, forceMessage):
+    def _getTutorialForList(self, obj, already_focused, forceTutorial):
         """Get the  tutorial string for a list.
 
         Arguments:
         - obj: the list
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
 
         utterances = []
-        
+
         # Translators: this is the tutorial string when navigating lists.
         msg = _("Use up and down to select an item.")
-        
-        if (not already_focused and self.lastTutorial != [msg]) or forceMessage:
+
+        if (not already_focused and self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForList",
@@ -323,14 +323,14 @@ class TutorialGenerator:
                              utterances)
 
         return utterances
-    
-    def _getTutorialForListItem(self, obj, already_focused, forceMessage):
+
+    def _getTutorialForListItem(self, obj, already_focused, forceTutorial):
         """Get the  tutorial string for a listItem.
 
         Arguments:
         - obj: the listitem
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
@@ -338,50 +338,50 @@ class TutorialGenerator:
         utterances = []
 
         # Translators: this represents the state of a node in a tree.
-	# 'expanded' means the children are showing.
+        # 'expanded' means the children are showing.
         # 'collapsed' means the children are not showing.
         # this string informs the user how to collapse the node.
         expandedMsg = _("To collapse, press shift plus left.")
-        
+
         # Translators: this represents the state of a node in a tree.
         # 'expanded' means the children are showing.
         # 'collapsed' means the children are not showing.
         # this string informs the user how to expand the node.
         collapsedMsg = _("To expand, press shift plus right.")
-        
-        
+
+
         # If already in focus then the tree probably collapsed or expanded
         state = obj.getState()
         if state.contains(pyatspi.STATE_EXPANDABLE):
             if state.contains(pyatspi.STATE_EXPANDED):
-                if (self.lastTutorial != [expandedMsg]) or forceMessage:
+                if (self.lastTutorial != [expandedMsg]) or forceTutorial:
                     utterances.append(expandedMsg)
             else:
-                if (self.lastTutorial != [collapsedMsg]) or forceMessage:
+                if (self.lastTutorial != [collapsedMsg]) or forceTutorial:
                     utterances.append(collapsedMsg)
-                
+
         self._debugGenerator("_getTutorialForListItem",
                              obj,
                              already_focused,
                              utterances)
         return utterances
 
-    def _getTutorialForText(self, obj, already_focused, forceMessage):
+    def _getTutorialForText(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for a text object.
 
         Arguments:
         - obj: the text component
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
         utterances = []
-        # Translators: This is the tutorial string for when landing 
+        # Translators: This is the tutorial string for when landing
         # on text fields.
         msg = _("Type in text.")
 
-        if (not already_focused or forceMessage) and \
+        if (not already_focused or forceTutorial) and \
            not self._script.isReadOnlyTextArea(obj):
             utterances.append(msg)
 
@@ -392,24 +392,24 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForPageTab(self, obj, already_focused, forceMessage):
+    def _getTutorialForPageTab(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for a page tab.
 
         Arguments:
         - obj: the page tab
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of tutorial utterances to be spoken for the object.
         """
 
         utterances = []
-        # Translators: this is the tutorial string for landing 
-        # on a page tab, we are informing the 
+        # Translators: this is the tutorial string for landing
+        # on a page tab, we are informing the
         # user how to navigate these.
         msg = _("Use left and right to view other tabs.")
-        
-        if (self.lastTutorial != [msg]) or forceMessage:
+
+        if (self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForPageTabList",
@@ -419,13 +419,13 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForPushButton(self, obj, already_focused, forceMessage):
+    def _getTutorialForPushButton(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for a push button
 
         Arguments:
         - obj: the push button
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken for the object.
         """
@@ -433,8 +433,8 @@ class TutorialGenerator:
         utterances = []
         # Translators: this is the tutorial string for activating a push button.
         msg = _("To activate press space.")
-        
-        if (not already_focused and self.lastTutorial != [msg]) or forceMessage:
+
+        if (not already_focused and self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForPushButton",
@@ -444,25 +444,25 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForSpinButton(self, obj, already_focused, forceMessage):
+    def _getTutorialForSpinButton(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for a spin button.  If the object already has
         focus, then no tutorial is given.
 
         Arguments:
         - obj: the spin button
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken for the object.
         """
 
         utterances = []
-        # Translators: this is the tutorial string for when landing 
+        # Translators: this is the tutorial string for when landing
         # on a spin button.
         msg = _("Use up or down arrow to select value." \
               " Or type in the desired numerical value.")
 
-        if (not already_focused and self.lastTutorial != [msg]) or forceMessage:
+        if (not already_focused and self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForSpinButton",
@@ -472,13 +472,13 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForTableCell(self, obj, already_focused, forceMessage):
+    def _getTutorialForTableCell(self, obj, already_focused, forceTutorial):
         """Get the tutorial utterances for a single table cell
 
         Arguments:
         - obj: the table
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken for the object.
         """
@@ -486,19 +486,19 @@ class TutorialGenerator:
         utterances = []
 
         # Translators: this represents the state of a node in a tree.
-	# 'expanded' means the children are showing.
+        # 'expanded' means the children are showing.
         # 'collapsed' means the children are not showing.
         # this string informs the user how to collapse the node.
         expandedMsg = _("To collapse, press shift plus left.")
-        
+
         # Translators: this represents the state of a node in a tree.
         # 'expanded' means the children are showing.
         # 'collapsed' means the children are not showing.
         # this string informs the user how to expand the node.
         collapsedMsg = _("To expand, press shift plus right.")
 
-        # If this table cell has 2 children and one of them has a 
-        # 'toggle' action and the other does not, then present this 
+        # If this table cell has 2 children and one of them has a
+        # 'toggle' action and the other does not, then present this
         # as a checkbox where:
         # 1) we get the checked state from the cell with the 'toggle' action
         # 2) we get the label from the other cell.
@@ -523,7 +523,7 @@ class TutorialGenerator:
                             break
 
             if hasToggle[0] and not hasToggle[1]:
-                cellOrder = [ 1, 0 ] 
+                cellOrder = [ 1, 0 ]
             elif not hasToggle[0] and hasToggle[1]:
                 cellOrder = [ 0, 1 ]
             if cellOrder:
@@ -536,7 +536,7 @@ class TutorialGenerator:
                     else:
                         utterances.extend( \
                             self._getTutorialForTableCell(obj[i],
-                            already_focused, forceMessage))
+                            already_focused, forceTutorial))
                 return utterances
 
         # [[[TODO: WDW - Attempt to infer the cell type.  There's a
@@ -560,16 +560,16 @@ class TutorialGenerator:
                 #
                 if action.getName(i) in ["toggle", _("toggle")]:
                     utterances = self._getTutorialForCheckBox(obj,
-                                  already_focused, forceMessage)
+                                  already_focused, forceTutorial)
                     break
 
         state = obj.getState()
         if state.contains(pyatspi.STATE_EXPANDABLE):
             if state.contains(pyatspi.STATE_EXPANDED):
-                if self.lastTutorial != [expandedMsg] or forceMessage:
+                if self.lastTutorial != [expandedMsg] or forceTutorial:
                     utterances.append(expandedMsg)
             else:
-                if self.lastTutorial != [collapsedMsg] or forceMessage:
+                if self.lastTutorial != [collapsedMsg] or forceTutorial:
                     utterances.append(collapsedMsg)
 
         self._debugGenerator("_getTutorialForTableCell",
@@ -579,13 +579,13 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForTableCellRow(self, obj, already_focused, forceMessage):
+    def _getTutorialForTableCellRow(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for the active table cell in the table row.
 
         Arguments:
         - obj: the table
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken for the object.
         """
@@ -618,13 +618,13 @@ class TutorialGenerator:
                            pointOfReference["lastColumn"] == column)
 
                 utterances.extend(self._getTutorialForTableCell(obj,
-                                        already_focused, forceMessage))
+                                        already_focused, forceTutorial))
             else:
-                utterances = self._getTutorialForTableCell(obj, 
-                  already_focused, forceMessage)
+                utterances = self._getTutorialForTableCell(obj,
+                  already_focused, forceTutorial)
         else:
             utterances = self._getTutorialForTableCell(obj, already_focused, \
-              forceMessage)
+              forceTutorial)
 
         self._debugGenerator("_getTutorialForTableCellRow",
                              obj,
@@ -633,13 +633,13 @@ class TutorialGenerator:
 
         return utterances
 
-    def _getTutorialForRadioButton(self, obj, already_focused, forceMessage):
+    def _getTutorialForRadioButton(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for a radio button.
 
         Arguments:
         - obj: the radio button
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken for the object.
         """
@@ -648,7 +648,7 @@ class TutorialGenerator:
         # Translators: this is a tip for the user, how to navigate radiobuttons.
         msg = _("Use arrow keys to change.")
 
-        if (not already_focused and self.lastTutorial != [msg]) or forceMessage:
+        if (not already_focused and self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForRadioButton",
@@ -657,13 +657,13 @@ class TutorialGenerator:
                              utterances)
         return utterances
 
-    def _getTutorialForMenu(self, obj, already_focused, forceMessage):
+    def _getTutorialForMenu(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for a menu.
 
         Arguments:
         - obj: the menu
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken for the object.
         """
@@ -673,17 +673,17 @@ class TutorialGenerator:
         mainMenuMsg = _("To navigate, press left or right arrow. " \
                        "To move through items press up or down arrow.")
 
-        # Translators: this is a tip for the user, how to 
+        # Translators: this is a tip for the user, how to
         # navigate into sub menues.
-        subMenuMsg = _("To enter sub menu, press right arrow.")        
-        
+        subMenuMsg = _("To enter sub menu, press right arrow.")
+
         # Checking if we are a submenu,
         # we can't rely on our parent being just a menu.
         if obj.parent.name != "" and obj.parent.__class__ == obj.__class__:
-            if (self.lastTutorial != [subMenuMsg]) or forceMessage:
+            if (self.lastTutorial != [subMenuMsg]) or forceTutorial:
                 utterances.append(subMenuMsg)
         else:
-            if (self.lastTutorial != [mainMenuMsg]) or forceMessage:
+            if (self.lastTutorial != [mainMenuMsg]) or forceTutorial:
                 utterances.append(mainMenuMsg)
 
         self._debugGenerator("_getTutorialForMenu",
@@ -692,25 +692,25 @@ class TutorialGenerator:
                              utterances)
         return utterances
 
-    def _getTutorialForSlider(self, obj, already_focused, forceMessage):
+    def _getTutorialForSlider(self, obj, already_focused, forceTutorial):
         """Get the tutorial string for a slider.  If the object already has
         focus, then no tutorial is given.
 
         Arguments:
         - obj: the slider
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken for the object.
         """
 
         utterances = []
-        # Translators: this is the tutorial string for when landing 
+        # Translators: this is the tutorial string for when landing
         # on a slider.
         msg = _("To decrease press left arrow, to increase press right arrow." \
           " To go to minimum press home, and for maximum press end.")
-              
-        if (not already_focused and self.lastTutorial != [msg]) or forceMessage:
+
+        if (not already_focused and self.lastTutorial != [msg]) or forceTutorial:
             utterances.append(msg)
 
         self._debugGenerator("_getTutorialForSlider",
@@ -720,9 +720,9 @@ class TutorialGenerator:
 
         return utterances
 
-    def getTutorial(self, obj, already_focused, forceMessage = False):
+    def getTutorial(self, obj, already_focused, forceTutorial=False):
         """Get the tutorial for an Accessible object.  This will look
-        first to the specific tutorial generators and if this 
+        first to the specific tutorial generators and if this
         does not exist then return the empty tutorial.
         This method is the primary method
         that external callers of this class should use.
@@ -730,24 +730,24 @@ class TutorialGenerator:
         Arguments:
         - obj: the object
         - already_focused: False if object just received focus
-        - forceMessage: used for when whereAmI really needs the tutorial string.
+        - forceTutorial: used for when whereAmI really needs the tutorial string
 
         Returns a list of utterances to be spoken.
         """
 
         if not settings.enableTutorialMessages:
             return []
-        
+
         role = obj.getRole()
         if role in self.tutorialGenerators:
             generator = self.tutorialGenerators[role]
         else:
             generator = self._getDefaultTutorial
-        msg = generator(obj, already_focused, forceMessage)
+        msg = generator(obj, already_focused, forceTutorial)
         utterances = [" ".join(msg)]
         if msg:
             self.lastTutorial = msg
-        if forceMessage:
+        if forceTutorial:
             self.lastTutorial = ""
 
         self._debugGenerator("getTutorial",
diff --git a/src/orca/where_am_I.py b/src/orca/where_am_I.py
index 4117077..779f3c3 100644
--- a/src/orca/where_am_I.py
+++ b/src/orca/where_am_I.py
@@ -162,14 +162,11 @@ class WhereAmI:
             text = C_("text", "selected")
             utterances.append(text)
 
-        text = self._script.speechGenerator.\
-                            _getAccelerator(obj,
-                                            fallbackToMnemonic=True,
-                                            fallbackToFullPath=True)
+        text = self._script.speechGenerator._getAccelerator(obj)
         utterances.extend(text)
 
         getTutorial = self._script.tutorialGenerator.getTutorial
-        utterances.extend(getTutorial(obj, False, forceMessage=True))
+        utterances.extend(getTutorial(obj, False, forceTutorial=True))
 
         debug.println(self._debugLevel, "text utterances=%s" % \
                       utterances)
@@ -581,4 +578,4 @@ class WhereAmI:
             getSpeech(obj,
                       already_focused = True,
                       where_am_i_type = basicOnly,
-                      forceMessage=True)
+                      forceTutorial=True)



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