orca r4265 - in branches/phase2/src/orca: . plugins/bookmarks plugins/debug_actions plugins/flat_review plugins/speech_parameters plugins/structural_navigation plugins/where_am_i



Author: wwalker
Date: Mon Sep 29 01:28:09 2008
New Revision: 4265
URL: http://svn.gnome.org/viewvc/orca?rev=4265&view=rev

Log:
Allow input handlers to be referenced by name.


Modified:
   branches/phase2/src/orca/default.py
   branches/phase2/src/orca/input_binding.py
   branches/phase2/src/orca/plugins/bookmarks/plugin.py
   branches/phase2/src/orca/plugins/debug_actions/plugin.py
   branches/phase2/src/orca/plugins/flat_review/plugin.py
   branches/phase2/src/orca/plugins/speech_parameters/plugin.py
   branches/phase2/src/orca/plugins/structural_navigation/plugin.py
   branches/phase2/src/orca/plugins/where_am_i/plugin.py
   branches/phase2/src/orca/script.py
   branches/phase2/src/orca/script_manager.py

Modified: branches/phase2/src/orca/default.py
==============================================================================
--- branches/phase2/src/orca/default.py	(original)
+++ branches/phase2/src/orca/default.py	Mon Sep 29 01:28:09 2008
@@ -97,11 +97,11 @@
         # Lacking scripts, I'm putting it here and uncommenting it as I
         # work. :-)
         #
-        #try:
-        #    import plugins.structural_navigation
-        #    pluginClasses.append(plugins.structural_navigation.Plugin)
-        #except:
-        #    log.exception("handled exception while importing module:")
+        try:
+            import plugins.structural_navigation
+            pluginClasses.append(plugins.structural_navigation.Plugin)
+        except:
+            log.exception("handled exception while importing module:")
 
         return script.Script._getPluginClasses(self) + pluginClasses
 
@@ -211,10 +211,10 @@
     #                                                                  #
     ####################################################################
 
-    def _sayAllHandler(self, inputEvent=None):
+    def sayAllHandler(self, inputEvent=None):
         """The sayAll handler.
         """
-        log.debug("_sayAllHandler: %s" % inputEvent)
+        log.debug("sayAllHandler: %s" % inputEvent)
     # Translators: the Orca "SayAll" command allows the
     # user to press a key and have the entire document in
     # a window be automatically spoken to the user.  If
@@ -223,8 +223,8 @@
     # be positioned at the point where the speech was
     # interrupted.
     #                
-    _sayAllHandler.description = _("Speaks entire document.")
-    _sayAllHandler.bindings = [
+    sayAllHandler.description = _("Speaks entire document.")
+    sayAllHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Add",
             input_event.defaultModifierMask,
@@ -237,18 +237,18 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _toggleTableCellReadModeHandler(self, inputEvent=None):
+    def toggleTableCellReadModeHandler(self, inputEvent=None):
         """The toggleTableCellReadMode handler.
         """
-        log.debug("_toggleTableCellReadModeHandler: %s" % inputEvent)
+        log.debug("toggleTableCellReadModeHandler: %s" % inputEvent)
     # Translators: when users are navigating a table, they
     # sometimes want the entire row of a table read, or
     # they just want the current cell to be presented to them.
     #
-    _toggleTableCellReadModeHandler.description = \
+    toggleTableCellReadModeHandler.description = \
         _("Toggles whether to read just the current table cell " \
           "or the whole row.")
-    _toggleTableCellReadModeHandler.bindings = [
+    toggleTableCellReadModeHandler.bindings = [
         input_binding.KeyboardBinding(
             "F11",
             input_event.defaultModifierMask,
@@ -259,27 +259,27 @@
             input_event.ORCA_MODIFIER_MASK)        
     ]
 
-    def _readCharAttributesHandler(self, inputEvent=None):
+    def readCharAttributesHandler(self, inputEvent=None):
         """The readCharAttributes handler.
         """
-        log.debug("_readCharAttributesHandler: %s" % inputEvent)
+        log.debug("readCharAttributesHandler: %s" % inputEvent)
     # Translators: the attributes being presented are the
     # text attributes, such as bold, italic, font name,
     # font size, etc.
     #
-    _readCharAttributesHandler.description = \
+    readCharAttributesHandler.description = \
         _("Reads the attributes associated with the current text character.")
-    _readCharAttributesHandler.bindings = [
+    readCharAttributesHandler.bindings = [
         input_binding.KeyboardBinding(
             "f",
             input_event.defaultModifierMask,
             input_event.ORCA_MODIFIER_MASK)
     ]
 
-    def _brailleCursorKeyHandler(self, inputEvent=None):
+    def brailleCursorKeyHandler(self, inputEvent=None):
         """The brailleCursorKeyHandler handler.
         """
-        log.debug("_brailleCursorKeyHandler: %s" % inputEvent)
+        log.debug("brailleCursorKeyHandler: %s" % inputEvent)
     # Translators: a refreshable braille display is an
     # external hardware device that presents braille
     # character to the user.  There are a limited number
@@ -289,9 +289,9 @@
     # to move the text caret to the given spot when one
     # presses the button.
     #
-    _brailleCursorKeyHandler.description = \
+    brailleCursorKeyHandler.description = \
         _("Handles presses of braille cursor routing keys.")
-    _brailleCursorKeyHandler.bindings = [\
+    brailleCursorKeyHandler.bindings = [\
         input_binding.BrailleBinding(
             brlapi.KEY_CMD_ROUTE,
             input_event.NO_MODIFIER_MASK,
@@ -299,10 +299,10 @@
             learnMode = False)
     ]
 
-    def _panBrailleLeftHandler(self, inputEvent=None):
+    def panBrailleLeftHandler(self, inputEvent=None):
         """The panBrailleLeft handler.
         """
-        log.debug("_panBrailleLeftHandler: %s" % inputEvent)
+        log.debug("panBrailleLeftHandler: %s" % inputEvent)
     # Translators: a refreshable braille display is an
     # external hardware device that presents braille
     # character to the user.  There are a limited number
@@ -312,9 +312,9 @@
     # braille display so they can pan left and right over
     # this line.
     #
-    _panBrailleLeftHandler.description = \
+    panBrailleLeftHandler.description = \
         _("Pans the braille display to the left.")
-    _panBrailleLeftHandler.bindings = [
+    panBrailleLeftHandler.bindings = [
         input_binding.BrailleBinding(
             brlapi.KEY_CMD_FWINLT,
             input_event.NO_MODIFIER_MASK,
@@ -322,10 +322,10 @@
             learnMode = False)
     ]
 
-    def _panBrailleRightHandler(self, inputEvent=None):
+    def panBrailleRightHandler(self, inputEvent=None):
         """The panBrailleRight handler.
         """
-        log.debug("_panBrailleRightHandler: %s" % inputEvent)
+        log.debug("panBrailleRightHandler: %s" % inputEvent)
     # Translators: a refreshable braille display is an
     # external hardware device that presents braille
     # character to the user.  There are a limited number
@@ -335,9 +335,9 @@
     # braille display so they can pan left and right over
     # this line.
     #
-    _panBrailleRightHandler.description = \
+    panBrailleRightHandler.description = \
         _("Pans the braille display to the right.")
-    _panBrailleRightHandler.bindings = [
+    panBrailleRightHandler.bindings = [
         input_binding.BrailleBinding(
             brlapi.KEY_CMD_FWINRT,
             input_event.NO_MODIFIER_MASK,
@@ -345,10 +345,10 @@
             learnMode = False)
     ]
 
-    def _enterLearnModeHandler(self, inputEvent=None):
+    def enterLearnModeHandler(self, inputEvent=None):
         """The enterLearnMode handler.
         """
-        log.debug("_enterLearnModeHandler: %s" % inputEvent)
+        log.debug("enterLearnModeHandler: %s" % inputEvent)
     # 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
@@ -356,160 +356,160 @@
     # particular key combination, or they might just be to
     # echo the name of the key if Orca doesn't have a handler.
     #
-    _enterLearnModeHandler.description = \
+    enterLearnModeHandler.description = \
         _("Enters learn mode.  Press escape to exit learn mode.")
-    _enterLearnModeHandler.bindings = [
+    enterLearnModeHandler.bindings = [
         input_binding.KeyboardBinding(
             "h",
             input_event.defaultModifierMask,
             input_event.ORCA_MODIFIER_MASK)
     ]
 
-    def _quitOrcaHandler(self, inputEvent=None):
+    def quitOrcaHandler(self, inputEvent=None):
         """The quitOrca handler.
         """
-        log.debug("_quitOrcaHandler: %s" % inputEvent)
-    _quitOrcaHandler.description = _("Quits Orca")
-    _quitOrcaHandler.bindings = [
+        log.debug("quitOrcaHandler: %s" % inputEvent)
+    quitOrcaHandler.description = _("Quits Orca")
+    quitOrcaHandler.bindings = [
         input_binding.KeyboardBinding(
             "q",
             input_event.defaultModifierMask,
             input_event.ORCA_MODIFIER_MASK)
     ]
 
-    def _showPreferencesGUIHandler(self, inputEvent=None):
+    def showPreferencesGUIHandler(self, inputEvent=None):
         """The showPreferencesGUI handler.
         """
-        log.debug("_showPreferencesGUIHandler: %s" % inputEvent)
+        log.debug("showPreferencesGUIHandler: %s" % inputEvent)
     # Translators: the preferences configuration dialog is
     # the dialog that allows users to set their preferences
     # for Orca.
     #
-    _showPreferencesGUIHandler.description = \
+    showPreferencesGUIHandler.description = \
         _("Displays the preferences configuration dialog.")
-    _showPreferencesGUIHandler.bindings = [
+    showPreferencesGUIHandler.bindings = [
         input_binding.KeyboardBinding(
             "space",
             input_event.defaultModifierMask,
             input_event.ORCA_MODIFIER_MASK)
     ]
 
-    def _showAppPreferencesGUIHandler(self, inputEvent=None):
+    def showAppPreferencesGUIHandler(self, inputEvent=None):
         """The showAppPreferencesGUI handler.
         """
-        log.debug("_showAppPreferencesGUIHandler: %s" % inputEvent)
+        log.debug("showAppPreferencesGUIHandler: %s" % inputEvent)
     # Translators: the application preferences configuration
     # dialog is the dialog that allows users to set their
     # preferences for a specific application within Orca.
     #
-    _showAppPreferencesGUIHandler.description = \
+    showAppPreferencesGUIHandler.description = \
         _("Displays the application preferences configuration dialog.")
-    _showAppPreferencesGUIHandler.bindings = [
+    showAppPreferencesGUIHandler.bindings = [
         input_binding.KeyboardBinding(
             "space",
             input_event.defaultModifierMask,
             input_event.ORCA_CTRL_MODIFIER_MASK)
     ]
 
-    def _toggleSilenceSpeechHandler(self, inputEvent=None):
+    def toggleSilenceSpeechHandler(self, inputEvent=None):
         """The toggleSilenceSpeech handler.
         """
-        log.debug("_toggleSilenceSpeechHandler: %s" % inputEvent)
+        log.debug("toggleSilenceSpeechHandler: %s" % inputEvent)
     # Translators: Orca allows the user to turn speech synthesis
     # on or off.  We call it 'silencing'.
     #
-    _toggleSilenceSpeechHandler.description = \
+    toggleSilenceSpeechHandler.description = \
         _("Toggles the silencing of speech.")
-    _toggleSilenceSpeechHandler.bindings = [
+    toggleSilenceSpeechHandler.bindings = [
         input_binding.KeyboardBinding(
             "s",
             input_event.defaultModifierMask,
             input_event.ORCA_MODIFIER_MASK)
     ]
 
-    def _toggleColorEnhancementsHandler(self, inputEvent=None):
+    def toggleColorEnhancementsHandler(self, inputEvent=None):
         """The toggleColorEnhancements handler.
         """
-        log.debug("_toggleColorEnhancementsHandler: %s" % inputEvent)
+        log.debug("toggleColorEnhancementsHandler: %s" % inputEvent)
     # Translators: "color enhancements" are changes users can
     # make to the appearance of the screen to make things easier
     # to see, such as inverting the colors or applying a tint.
     # This command toggles these enhancements on/off.
     #
-    _toggleColorEnhancementsHandler.description = \
+    toggleColorEnhancementsHandler.description = \
         _("Toggles color enhancements.")
 
-    def _toggleMouseEnhancementsHandler(self, inputEvent=None):
+    def toggleMouseEnhancementsHandler(self, inputEvent=None):
         """The toggleMouseEnhancements handler.
         """
-        log.debug("_toggleMouseEnhancementsHandler: %s" % inputEvent)
+        log.debug("toggleMouseEnhancementsHandler: %s" % inputEvent)
     # Translators: "mouse enhancements" are changes users can
     # make to the appearance of the mouse pointer to make it
     # easier to see, such as increasing its size, changing its
     # color, and surrounding it with crosshairs.  This command
     # toggles these enhancements on/off.
     #
-    _toggleMouseEnhancementsHandler.description = \
+    toggleMouseEnhancementsHandler.description = \
         _("Toggles mouse enhancements.")
 
-    def _increaseMagnificationHandler(self, inputEvent=None):
+    def increaseMagnificationHandler(self, inputEvent=None):
         """The increaseMagnification handler.
         """
-        log.debug("_increaseMagnificationHandler: %s" % inputEvent)
+        log.debug("increaseMagnificationHandler: %s" % inputEvent)
     # Translators: this command increases the magnification
     # level.
     #
-    _increaseMagnificationHandler.description = \
+    increaseMagnificationHandler.description = \
         _("Increases the magnification level.")
 
-    def _decreaseMagnificationHandler(self, inputEvent=None):
+    def decreaseMagnificationHandler(self, inputEvent=None):
         """The decreaseMagnification handler.
         """
-        log.debug("_decreaseMagnificationHandler: %s" % inputEvent)
+        log.debug("decreaseMagnificationHandler: %s" % inputEvent)
     # Translators: this command decreases the magnification
     # level.
     #
-    _decreaseMagnificationHandler.description = \
+    decreaseMagnificationHandler.description = \
         _("Decreases the magnification level.")
 
-    def _toggleMagnifierHandler(self, inputEvent=None):
+    def toggleMagnifierHandler(self, inputEvent=None):
         """The toggleMagnifier handler.
         """
-        log.debug("_toggleMagnifierHandler: %s" % inputEvent)
+        log.debug("toggleMagnifierHandler: %s" % inputEvent)
     # Translators: Orca allows the user to turn the magnifier
     # on or off. This command not only toggles magnification,
     # but also all of the color and pointer customizations
     # made through the magnifier.
     #
-    _toggleMagnifierHandler.description = \
+    toggleMagnifierHandler.description = \
         _("Toggles the magnifier.")
 
-    def _cycleZoomerTypeHandler(self, inputEvent=None):
+    def cycleZoomerTypeHandler(self, inputEvent=None):
         """The cycleZoomerType handler.
         """
-        log.debug("_cycleZoomerTypeHandler: %s" % inputEvent)
+        log.debug("cycleZoomerTypeHandler: %s" % inputEvent)
     # Translators: the user can choose between several different
     # types of magnification, including full screen and split
     # screen.  The "position" here refers to location of the
     # magnifier.
     #
-    _cycleZoomerTypeHandler.description = \
+    cycleZoomerTypeHandler.description = \
         _("Cycles to the next magnifier position.")
 
-    def _toggleMouseReviewHandler(self, inputEvent=None):
+    def toggleMouseReviewHandler(self, inputEvent=None):
         """The toggleMouseReview handler.
         """
-        log.debug("_toggleMouseReviewHandler: %s" % inputEvent)
+        log.debug("toggleMouseReviewHandler: %s" % inputEvent)
     # Translators: Orca allows the item under the pointer to
     # be spoken. This toggles the feature.
     #
-    _toggleMouseReviewHandler.description = \
+    toggleMouseReviewHandler.description = \
         _("Toggle mouse review mode.")
 
-    def _bypassNextCommandHandler(self, inputEvent=None):
+    def bypassNextCommandHandler(self, inputEvent=None):
         """The bypassNextCommand handler.
         """
-        log.debug("_bypassNextCommandHandler: %s" % inputEvent)
+        log.debug("bypassNextCommandHandler: %s" % inputEvent)
     # Translators: Orca normally intercepts all keyboard
     # commands and only passes them along to the current
     # application when they are not Orca commands.  This
@@ -517,7 +517,7 @@
     # along to the current application, bypassing Orca's
     # interception of it.
     #
-    _bypassNextCommandHandler.description = \
+    bypassNextCommandHandler.description = \
         _("Passes the next command on to the current application.")
 
 if __name__ == "__main__":

Modified: branches/phase2/src/orca/input_binding.py
==============================================================================
--- branches/phase2/src/orca/input_binding.py	(original)
+++ branches/phase2/src/orca/input_binding.py	Mon Sep 29 01:28:09 2008
@@ -154,13 +154,15 @@
 class InputHandler:
     """Maps an input binding to a function.
     """
-    def __init__(self, function, description, bindings):
+    def __init__(self, function, name, description, bindings):
         """Creates a new Handler instance.
         
         Arguments:
 
         - function: the function to call
 
+        - name: a machine readable string to identify this handler
+
         - description: a human consumable description of 
         this handler
 
@@ -168,6 +170,7 @@
         will cause this handler to be used       
         """
         self.function = function
+        self.name = name
         self.description = description
         self.bindings = bindings
 
@@ -175,7 +178,7 @@
         bindingsString = ""
         for binding in self.bindings:
             bindingsString += "%s," % binding
-        return "%s [%s]" % (self.description, bindingsString)
+        return "%s (%s) [%s]" % (self.name, self.description, bindingsString)
 
     def handlesEvent(self, inputEvent):
         """Returns True if this Handler has an InputBinding

Modified: branches/phase2/src/orca/plugins/bookmarks/plugin.py
==============================================================================
--- branches/phase2/src/orca/plugins/bookmarks/plugin.py	(original)
+++ branches/phase2/src/orca/plugins/bookmarks/plugin.py	Mon Sep 29 01:28:09 2008
@@ -45,81 +45,81 @@
         """
         plugin.Plugin.__init__(self, owner, scriptSettings)
 
-    def _bookmarkCurrentWhereAmIHandler(self, inputEvent=None):
+    def bookmarkCurrentWhereAmIHandler(self, inputEvent=None):
         """The bookmarkCurrentWhereAmIHandler handler.
         """
-        log.debug("_bookmarkCurrentWhereAmIHandler: %s" % inputEvent)
+        log.debug("bookmarkCurrentWhereAmIHandler: %s" % inputEvent)
     # Translators: this command announces information regarding
     # the relationship of the given bookmark to the current
     # position
     #
-    _bookmarkCurrentWhereAmIHandler.description = \
+    bookmarkCurrentWhereAmIHandler.description = \
         _("Bookmark where am I with respect to current position.")
-    _bookmarkCurrentWhereAmIHandler.bindings = \
+    bookmarkCurrentWhereAmIHandler.bindings = \
         map(lambda x: input_binding.KeyboardBinding(
                           str(x),
                           input_event.defaultModifierMask,
                           input_event.SHIFT_ALT_MODIFIER_MASK),
             xrange(1, 7))
 
-    def _goToBookmarkHandler(self, inputEvent=None):
+    def goToBookmarkHandler(self, inputEvent=None):
         """The goToBookmarkHandler handler.
         """
-        log.debug("_goToBookmarkHandler: %s" % inputEvent)
+        log.debug("goToBookmarkHandler: %s" % inputEvent)
     # Translators: this command moves the current position to the
     # location stored at the bookmark.
     #
-    _goToBookmarkHandler.description = \
+    goToBookmarkHandler.description = \
         _("Go to bookmark.")
-    _goToBookmarkHandler.bindings = \
+    goToBookmarkHandler.bindings = \
         map(lambda x: input_binding.KeyboardBinding(
                           str(x),
                           input_event.defaultModifierMask,
                           input_event.ORCA_MODIFIER_MASK),
             xrange(1, 7))
 
-    def _addBookmarkHandler(self, inputEvent=None):
+    def addBookmarkHandler(self, inputEvent=None):
         """The addBookmarkHandler handler.
         """
-        log.debug("_addBookmarkHandler: %s" % inputEvent)
+        log.debug("addBookmarkHandler: %s" % inputEvent)
     # Translators: this event handler binds an in-page accessible
     # object location to the given input key command.
     #
-    _addBookmarkHandler.description = \
+    addBookmarkHandler.description = \
         _("Add bookmark.")
-    _addBookmarkHandler.bindings = \
+    addBookmarkHandler.bindings = \
         map(lambda x: input_binding.KeyboardBinding(
                           str(x),
                           input_event.defaultModifierMask,
                           input_event.ORCA_ALT_MODIFIER_MASK),
             xrange(1, 7))
 
-    def _saveBookmarksHandler(self, inputEvent=None):
+    def saveBookmarksHandler(self, inputEvent=None):
         """The saveBookmarksHandler handler.
         """
-        log.debug("_saveBookmarksHandler: %s" % inputEvent)
+        log.debug("saveBookmarksHandler: %s" % inputEvent)
     # Translators: this event handler saves all bookmarks for the
     # current application to disk.
     #
-    _saveBookmarksHandler.description = \
+    saveBookmarksHandler.description = \
         _("Save bookmarks.")
-    _saveBookmarksHandler.bindings = [
+    saveBookmarksHandler.bindings = [
         input_binding.KeyboardBinding(
             "b",
             input_event.defaultModifierMask,
             input_event.ORCA_ALT_MODIFIER_MASK)
     ]
 
-    def _goToNextBookmarkHandler(self, inputEvent=None):
+    def goToNextBookmarkHandler(self, inputEvent=None):
         """The goToNextBookmarkHandler handler.
         """
-        log.debug("_goToNextBookmarkHandler: %s" % inputEvent)
+        log.debug("goToNextBookmarkHandler: %s" % inputEvent)
     # Translators: this event handler cycles through the registered
     # bookmarks and takes the user to the next bookmark location.
     #
-    _goToNextBookmarkHandler.description = \
+    goToNextBookmarkHandler.description = \
         _("Go to next bookmark location.")
-    _goToNextBookmarkHandler.bindings = [
+    goToNextBookmarkHandler.bindings = [
         input_binding.KeyboardBinding(
             "b",
             input_event.defaultModifierMask,
@@ -127,17 +127,17 @@
             "goToNextBookmark"),
     ]
 
-    def _goToPrevBookmarkHandler(self, inputEvent=None):
+    def goToPrevBookmarkHandler(self, inputEvent=None):
         """The goToPrevBookmarkHandler handler.
         """
-        log.debug("_goToPrevBookmarkHandler: %s" % inputEvent)
+        log.debug("goToPrevBookmarkHandler: %s" % inputEvent)
     # Translators: this event handler cycles through the
     # registered bookmarks and takes the user to the previous
     # bookmark location.
     #
-    _goToPrevBookmarkHandler.description = \
+    goToPrevBookmarkHandler.description = \
         _("Go to previous bookmark location.")
-    _goToPrevBookmarkHandler.bindings = [
+    goToPrevBookmarkHandler.bindings = [
         input_binding.KeyboardBinding(
             "b",
             input_event.defaultModifierMask,

Modified: branches/phase2/src/orca/plugins/debug_actions/plugin.py
==============================================================================
--- branches/phase2/src/orca/plugins/debug_actions/plugin.py	(original)
+++ branches/phase2/src/orca/plugins/debug_actions/plugin.py	Mon Sep 29 01:28:09 2008
@@ -47,29 +47,29 @@
         """
         plugin.Plugin.__init__(self, owner, scriptSettings)
 
-    def _printAppsHandler(self, inputEvent=None):
+    def printAppsHandler(self, inputEvent=None):
         """The printAppsHandler handler.
         """
-        log.debug("_printAppsHandler: %s" % inputEvent)
+        log.debug("printAppsHandler: %s" % inputEvent)
     # Translators: this is a debug message that Orca users
     # will not normally see. It describes a debug routine
     # that prints a list of all known applications currently
     # running on the desktop, to stdout.
     #
-    _printAppsHandler.description = \
+    printAppsHandler.description = \
         _("Prints a debug listing of all known applications to the " \
           "console where Orca is running.")
-    _printAppsHandler.bindings = [
+    printAppsHandler.bindings = [
         input_binding.KeyboardBinding(
             "End",
             input_event.defaultModifierMask,
             input_event.ORCA_CTRL_ALT_MODIFIER_MASK)
     ]
 
-    def _printAncestryHandler(self, inputEvent=None):
+    def printAncestryHandler(self, inputEvent=None):
         """The printAncestryHandler handler.
         """
-        log.debug("_printAncestryHandler: %s" % inputEvent)
+        log.debug("printAncestryHandler: %s" % inputEvent)
     # Translators: this is a debug message that Orca users
     # will not normally see. It describes a debug routine
     # that will take the component in the currently running
@@ -78,20 +78,20 @@
     # the components that are its descendants in the component
     # tree).
     #
-    _printAncestryHandler.description = \
+    printAncestryHandler.description = \
         _("Prints debug information about the ancestry of the " \
           "object with focus.")
-    _printAncestryHandler.bindings = [
+    printAncestryHandler.bindings = [
         input_binding.KeyboardBinding(
             "Page_Up",
             input_event.defaultModifierMask,
             input_event.ORCA_CTRL_ALT_MODIFIER_MASK)
     ]
 
-    def _printHierarchyHandler(self, inputEvent=None):
+    def printHierarchyHandler(self, inputEvent=None):
         """The printHierarchyHandler handler.
         """
-        log.debug("_printHierarchyHandler: %s" % inputEvent)
+        log.debug("printHierarchyHandler: %s" % inputEvent)
     # Translators: this is a debug message that Orca users
     # will not normally see. It describes a debug routine
     # that will take the currently running application, and
@@ -99,29 +99,29 @@
     # component hierarchy (i.e. all the components and all
     # their descendants in the component tree).
     #
-    _printHierarchyHandler.description = \
+    printHierarchyHandler.description = \
         _("Prints debug information about the application with " \
           "focus.")
-    _printHierarchyHandler.bindings = [
+    printHierarchyHandler.bindings = [
         input_binding.KeyboardBinding(
             "Page_Down",
             input_event.defaultModifierMask,
             input_event.ORCA_CTRL_ALT_MODIFIER_MASK)
     ]
 
-    def _reportScriptInfoHandler(self, inputEvent=None):
+    def reportScriptInfoHandler(self, inputEvent=None):
         """The reportScriptInfo handler.
         """
-        log.debug("_reportScriptInfoHandler: %s" % inputEvent)
+        log.debug("reportScriptInfoHandler: %s" % inputEvent)
     # Translators: this is a debug message that Orca users
     # will not normally see. It describes a debug routine
     # that outputs useful information on the current script
     #  via speech and braille. This information will be
     # helpful to script writers.
     #
-    _reportScriptInfoHandler.description = \
+    reportScriptInfoHandler.description = \
         _("Reports information on current script.")
-    _reportScriptInfoHandler.bindings = [
+    reportScriptInfoHandler.bindings = [
         input_binding.KeyboardBinding(
             "Home",
             input_event.defaultModifierMask,

Modified: branches/phase2/src/orca/plugins/flat_review/plugin.py
==============================================================================
--- branches/phase2/src/orca/plugins/flat_review/plugin.py	(original)
+++ branches/phase2/src/orca/plugins/flat_review/plugin.py	Mon Sep 29 01:28:09 2008
@@ -48,10 +48,10 @@
         """
         plugin.Plugin.__init__(self, owner, scriptSettings)
 
-    def _leftClickReviewItemHandler(self, inputEvent=None):
+    def leftClickReviewItemHandler(self, inputEvent=None):
         """The leftClickReviewItemHandler handler.
         """
-        log.debug("_leftClickReviewItemHandler: %s" % inputEvent)
+        log.debug("leftClickReviewItemHandler: %s" % inputEvent)
     # 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
@@ -62,9 +62,9 @@
     # {line,word,character}.  A left click means to generate
     # a left mouse button click on the current item.
     #
-    _leftClickReviewItemHandler.description = \
+    leftClickReviewItemHandler.description = \
         _("Performs left click on current flat review item.")
-    _leftClickReviewItemHandler.bindings = [
+    leftClickReviewItemHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Divide",
             input_event.NO_MODIFIER_MASK,
@@ -77,10 +77,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _rightClickReviewItemHandler(self, inputEvent=None):
+    def rightClickReviewItemHandler(self, inputEvent=None):
         """The rightClickReviewItemHandler handler.
         """
-        log.debug("_rightClickReviewItemHandler: %s" % inputEvent)
+        log.debug("rightClickReviewItemHandler: %s" % inputEvent)
     # 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
@@ -91,9 +91,9 @@
     # {line,word,character}.  A right click means to generate
     # a right mouse button click on the current item.
     #
-    _rightClickReviewItemHandler.description = \
+    rightClickReviewItemHandler.description = \
         _("Performs right click on current flat review item.")
-    _rightClickReviewItemHandler.bindings = [
+    rightClickReviewItemHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Multiply",
             input_event.NO_MODIFIER_MASK,
@@ -106,10 +106,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _toggleFlatReviewModeHandler(self, inputEvent=None):
+    def toggleFlatReviewModeHandler(self, inputEvent=None):
         """The toggleFlatReviewModeHandler handler.
         """
-        log.debug("_toggleFlatReviewModeHandler: %s" % inputEvent)
+        log.debug("toggleFlatReviewModeHandler: %s" % inputEvent)
     # 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
@@ -119,9 +119,9 @@
     # the user to explore this text by the {previous,next}
     # {line,word,character}.
     #
-    _toggleFlatReviewModeHandler.description = \
+    toggleFlatReviewModeHandler.description = \
         _("Enters and exits flat review mode.")
-    _toggleFlatReviewModeHandler.bindings = [
+    toggleFlatReviewModeHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Subtract",
             input_event.defaultModifierMask,
@@ -134,10 +134,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewPreviousLineHandler(self, inputEvent=None):
+    def reviewPreviousLineHandler(self, inputEvent=None):
         """The reviewPreviousLineHandler handler.
         """
-        log.debug("_reviewPreviousLineHandler: %s" % inputEvent)
+        log.debug("reviewPreviousLineHandler: %s" % inputEvent)
     # 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
@@ -147,9 +147,9 @@
     # the user to explore this text by the {previous,next}
     # {line,word,character}.
     #
-    _reviewPreviousLineHandler.description = \
+    reviewPreviousLineHandler.description = \
         _("Moves flat review to the beginning of the previous line.")
-    _reviewPreviousLineHandler.bindings = [
+    reviewPreviousLineHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_7",
             input_event.defaultModifierMask,
@@ -167,10 +167,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewHomeHandler(self, inputEvent=None):
+    def reviewHomeHandler(self, inputEvent=None):
         """The reviewHomeHandler handler.
         """
-        log.debug("_reviewHomeHandler: %s" % inputEvent)
+        log.debug("reviewHomeHandler: %s" % inputEvent)
     # 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
@@ -181,9 +181,9 @@
     # {line,word,character}.  The home position is the
     # beginning of the content in the window.
     #
-    _reviewHomeHandler.description = \
+    reviewHomeHandler.description = \
         _("Moves flat review to the home position.")
-    _reviewHomeHandler.bindings = [
+    reviewHomeHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_7",
             input_event.defaultModifierMask,
@@ -201,10 +201,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewCurrentLineHandler(self, inputEvent=None):
+    def reviewCurrentLineHandler(self, inputEvent=None):
         """The reviewCurrentLineHandler handler.
         """
-        log.debug("_reviewCurrentLineHandler: %s" % inputEvent)
+        log.debug("reviewCurrentLineHandler: %s" % inputEvent)
     # 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
@@ -215,9 +215,9 @@
     # {line,word,character}.  This particular command will
     # cause Orca to speak the current line.
     #
-    _reviewCurrentLineHandler.description = \
+    reviewCurrentLineHandler.description = \
         _("Speaks the current flat review line.")
-    _reviewCurrentLineHandler.bindings = [
+    reviewCurrentLineHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_8",
             input_event.defaultModifierMask,
@@ -242,10 +242,10 @@
             input_event.NO_MODIFIER_MASK)
     ]
 
-    def _reviewSpellCurrentLineHandler(self, inputEvent=None):
+    def reviewSpellCurrentLineHandler(self, inputEvent=None):
         """The reviewSpellCurrentLineHandler handler.
         """
-        log.debug("_reviewSpellCurrentLineHandler: %s" % inputEvent)
+        log.debug("reviewSpellCurrentLineHandler: %s" % inputEvent)
     # 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
@@ -256,9 +256,9 @@
     # {line,word,character}. This particular command will
     # cause Orca to spell the current line.
     #
-    _reviewSpellCurrentLineHandler.description = \
+    reviewSpellCurrentLineHandler.description = \
         _("Spells the current flat review line.")
-    _reviewSpellCurrentLineHandler.bindings = [
+    reviewSpellCurrentLineHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_8",
             input_event.defaultModifierMask,
@@ -279,10 +279,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewPhoneticCurrentLineHandler(self, inputEvent=None):
+    def reviewPhoneticCurrentLineHandler(self, inputEvent=None):
         """The reviewPhoneticCurrentLineHandler handler.
         """
-        log.debug("_reviewPhoneticCurrentLineHandler: %s" % inputEvent)
+        log.debug("reviewPhoneticCurrentLineHandler: %s" % inputEvent)
     # 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
@@ -294,9 +294,9 @@
     # cause Orca to "phonetically spell" the current line,
     # saying "Alpha" for "a", "Bravo" for "b" and so on.
     #
-    _reviewPhoneticCurrentLineHandler.description = \
+    reviewPhoneticCurrentLineHandler.description = \
         _("Phonetically spells the current flat review line.")
-    _reviewPhoneticCurrentLineHandler.bindings = [
+    reviewPhoneticCurrentLineHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_8",
             input_event.defaultModifierMask,
@@ -317,10 +317,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewNextLineHandler(self, inputEvent=None):
+    def reviewNextLineHandler(self, inputEvent=None):
         """The reviewNextLineHandler handler.
         """
-        log.debug("_reviewNextLineHandler: %s" % inputEvent)
+        log.debug("reviewNextLineHandler: %s" % inputEvent)
     # 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
@@ -330,9 +330,9 @@
     # the user to explore this text by the {previous,next}
     # {line,word,character}.
     #
-    _reviewNextLineHandler.description = \
+    reviewNextLineHandler.description = \
         _("Moves flat review to the beginning of the next line.")
-    _reviewNextLineHandler.bindings = [
+    reviewNextLineHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_9",
             input_event.defaultModifierMask,
@@ -350,10 +350,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewEndHandler(self, inputEvent=None):
+    def reviewEndHandler(self, inputEvent=None):
         """The reviewEndHandler handler.
         """
-        log.debug("_reviewEndHandler: %s" % inputEvent)
+        log.debug("reviewEndHandler: %s" % inputEvent)
     # 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
@@ -364,9 +364,9 @@
     # {line,word,character}.  The end position is the last
     # bit of information in the window.
     #
-    _reviewEndHandler.description = \
+    reviewEndHandler.description = \
         _("Moves flat review to the end position.")
-    _reviewEndHandler.bindings = [
+    reviewEndHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_9",
             input_event.defaultModifierMask,
@@ -384,10 +384,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewPreviousItemHandler(self, inputEvent=None):
+    def reviewPreviousItemHandler(self, inputEvent=None):
         """The reviewPreviousItemHandler handler.
         """
-        log.debug("_reviewPreviousItemHandler: %s" % inputEvent)
+        log.debug("reviewPreviousItemHandler: %s" % inputEvent)
     # 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
@@ -399,9 +399,9 @@
     # in the window until you reach the top (i.e., it will
     # wrap across lines if necessary).
     #
-    _reviewPreviousItemHandler.description = \
+    reviewPreviousItemHandler.description = \
         _("Moves flat review to the previous item or word.")
-    _reviewPreviousItemHandler.bindings = [
+    reviewPreviousItemHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_4",
             input_event.defaultModifierMask,
@@ -419,10 +419,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewAboveHandler(self, inputEvent=None):
+    def reviewAboveHandler(self, inputEvent=None):
         """The reviewAboveHandler handler.
         """
-        log.debug("_reviewAboveHandler: %s" % inputEvent)
+        log.debug("reviewAboveHandler: %s" % inputEvent)
     # 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
@@ -434,9 +434,9 @@
     # geographically above, as if you drew a vertical line
     # in the window.
     #
-    _reviewAboveHandler.description = \
+    reviewAboveHandler.description = \
         _("Moves flat review to the word above the current word.")
-    _reviewAboveHandler.bindings = [
+    reviewAboveHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_4",
             input_event.defaultModifierMask,
@@ -458,10 +458,10 @@
             input_event.NO_MODIFIER_MASK),
     ]
 
-    def _reviewCurrentItemHandler(self, inputEvent=None):
+    def reviewCurrentItemHandler(self, inputEvent=None):
         """The reviewCurrentItemHandler handler.
         """
-        log.debug("_reviewCurrentItemHandler: %s" % inputEvent)
+        log.debug("reviewCurrentItemHandler: %s" % inputEvent)
     # 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
@@ -472,9 +472,9 @@
     # {line,word,character}.  This command will speak the
     # current word or item.
     #
-    _reviewCurrentItemHandler.description = \
+    reviewCurrentItemHandler.description = \
         _("Speaks the current flat review item or word.")
-    _reviewCurrentItemHandler.bindings = [
+    reviewCurrentItemHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_5",
             input_event.defaultModifierMask,
@@ -495,10 +495,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewSpellCurrentItemHandler(self, inputEvent=None):
+    def reviewSpellCurrentItemHandler(self, inputEvent=None):
         """The reviewSpellCurrentItemHandler handler.
         """
-        log.debug("_reviewSpellCurrentItemHandler: %s" % inputEvent)
+        log.debug("reviewSpellCurrentItemHandler: %s" % inputEvent)
     # 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
@@ -509,9 +509,9 @@
     # {line,word,character}.  This command will spell out
     # the current word or item letter by letter.
     #
-    _reviewSpellCurrentItemHandler.description = \
+    reviewSpellCurrentItemHandler.description = \
         _("Spells the current flat review item or word.")
-    _reviewSpellCurrentItemHandler.bindings = [
+    reviewSpellCurrentItemHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_5",
             input_event.defaultModifierMask,
@@ -532,10 +532,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewPhoneticCurrentItemHandler(self, inputEvent=None):
+    def reviewPhoneticCurrentItemHandler(self, inputEvent=None):
         """The reviewPhoneticCurrentItemHandler handler.
         """
-        log.debug("_reviewPhoneticCurrentItemHandler: %s" % inputEvent)
+        log.debug("reviewPhoneticCurrentItemHandler: %s" % inputEvent)
     # 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
@@ -547,9 +547,9 @@
     # the current word or item phonetically, saying "Alpha"
     # for "a", "Bravo" for "b" and so on.
     #
-    _reviewPhoneticCurrentItemHandler.description = \
+    reviewPhoneticCurrentItemHandler.description = \
         _("Phonetically spells the current flat review item or word.")
-    _reviewPhoneticCurrentItemHandler.bindings = [
+    reviewPhoneticCurrentItemHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_5",
             input_event.defaultModifierMask,
@@ -570,10 +570,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewCurrentAccessibleHandler(self, inputEvent=None):
+    def reviewCurrentAccessibleHandler(self, inputEvent=None):
         """The reviewCurrentAccessibleHandler handler.
         """
-        log.debug("_reviewCurrentAccessibleHandler: %s" % inputEvent)
+        log.debug("reviewCurrentAccessibleHandler: %s" % inputEvent)
     # 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
@@ -586,9 +586,9 @@
     # some other GUI widget.  The 'speaks' means it will
     # speak the text associated with the object.
     #
-    _reviewCurrentAccessibleHandler.description = \
+    reviewCurrentAccessibleHandler.description = \
         _("Speaks the current flat review object.")
-    _reviewCurrentAccessibleHandler.bindings = [
+    reviewCurrentAccessibleHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_5",
             input_event.defaultModifierMask,
@@ -606,10 +606,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewNextItemHandler(self, inputEvent=None):
+    def reviewNextItemHandler(self, inputEvent=None):
         """The reviewNextItemHandler handler.
         """
-        log.debug("_reviewNextItemHandler: %s" % inputEvent)
+        log.debug("reviewNextItemHandler: %s" % inputEvent)
     # 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
@@ -621,9 +621,9 @@
     # in the window until you reach the end (i.e., it will
     # wrap across lines if necessary).
     #
-    _reviewNextItemHandler.description = \
+    reviewNextItemHandler.description = \
         _("Moves flat review to the next item or word.")
-    _reviewNextItemHandler.bindings = [
+    reviewNextItemHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_6",
             input_event.defaultModifierMask,
@@ -641,10 +641,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewBelowHandler(self, inputEvent=None):
+    def reviewBelowHandler(self, inputEvent=None):
         """The reviewBelowHandler handler.
         """
-        log.debug("_reviewBelowHandler: %s" % inputEvent)
+        log.debug("reviewBelowHandler: %s" % inputEvent)
     # 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
@@ -656,9 +656,9 @@
     # geographically below, as if you drew a vertical line
     # downward on the screen.
     #
-    _reviewBelowHandler.description = \
+    reviewBelowHandler.description = \
         _("Moves flat review to the word below the current word.")
-    _reviewBelowHandler.bindings = [
+    reviewBelowHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_6",
             input_event.defaultModifierMask,
@@ -680,10 +680,10 @@
             input_event.NO_MODIFIER_MASK),
     ]
 
-    def _reviewPreviousCharacterHandler(self, inputEvent=None):
+    def reviewPreviousCharacterHandler(self, inputEvent=None):
         """The reviewPreviousCharacterHandler handler.
         """
-        log.debug("_reviewPreviousCharacterHandler: %s" % inputEvent)
+        log.debug("reviewPreviousCharacterHandler: %s" % inputEvent)
     # 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
@@ -695,9 +695,9 @@
     # in the window until you reach the top (i.e., it will
     # wrap across lines if necessary).
     #
-    _reviewPreviousCharacterHandler.description = \
+    reviewPreviousCharacterHandler.description = \
         _("Moves flat review to the previous character.")
-    _reviewPreviousCharacterHandler.bindings = [
+    reviewPreviousCharacterHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_1",
             input_event.defaultModifierMask,
@@ -715,10 +715,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewEndOfLineHandler(self, inputEvent=None):
+    def reviewEndOfLineHandler(self, inputEvent=None):
         """The reviewEndOfLineHandler handler.
         """
-        log.debug("_reviewEndOfLineHandler: %s" % inputEvent)
+        log.debug("reviewEndOfLineHandler: %s" % inputEvent)
     # 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
@@ -728,9 +728,9 @@
     # the user to explore this text by the {previous,next}
     # {line,word,character}.
     #
-    _reviewEndOfLineHandler.description = \
+    reviewEndOfLineHandler.description = \
         _("Moves flat review to the end of the line.")
-    _reviewEndOfLineHandler.bindings = [
+    reviewEndOfLineHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_1",
             input_event.defaultModifierMask,
@@ -748,10 +748,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewCurrentCharacterHandler(self, inputEvent=None):
+    def reviewCurrentCharacterHandler(self, inputEvent=None):
         """The reviewCurrentCharacterHandler handler.
         """
-        log.debug("_reviewCurrentCharacterHandler: %s" % inputEvent)
+        log.debug("reviewCurrentCharacterHandler: %s" % inputEvent)
     # 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
@@ -765,9 +765,9 @@
     # this case will be the spoken language form of the
     # character currently being reviewed.
     #
-    _reviewCurrentCharacterHandler.description = \
+    reviewCurrentCharacterHandler.description = \
         _("Speaks the current flat review character.")
-    _reviewCurrentCharacterHandler.bindings = [
+    reviewCurrentCharacterHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_2",
             input_event.defaultModifierMask,
@@ -788,10 +788,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewSpellCurrentCharacterHandler(self, inputEvent=None):
+    def reviewSpellCurrentCharacterHandler(self, inputEvent=None):
         """The reviewSpellCurrentCharacterHandler handler.
         """
-        log.debug("_reviewSpellCurrentCharacterHandler: %s" % inputEvent)
+        log.debug("reviewSpellCurrentCharacterHandler: %s" % inputEvent)
     # 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
@@ -806,9 +806,9 @@
     # character currently being reviewed, saying "Alpha"
     # for "a", "Bravo" for "b" and so on.
     #
-    _reviewSpellCurrentCharacterHandler.description = \
+    reviewSpellCurrentCharacterHandler.description = \
         _("Phonetically speaks the current flat review character.")
-    _reviewSpellCurrentCharacterHandler.bindings = [
+    reviewSpellCurrentCharacterHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_2",
             input_event.defaultModifierMask,
@@ -829,10 +829,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewNextCharacterHandler(self, inputEvent=None):
+    def reviewNextCharacterHandler(self, inputEvent=None):
         """The reviewNextCharacterHandler handler.
         """
-        log.debug("_reviewNextCharacterHandler: %s" % inputEvent)
+        log.debug("reviewNextCharacterHandler: %s" % inputEvent)
     # 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
@@ -844,9 +844,9 @@
     # in the window until you reach the end (i.e., it will
     # wrap across lines if necessary).
     #
-    _reviewNextCharacterHandler.description = \
+    reviewNextCharacterHandler.description = \
         _("Moves flat review to the next character.")
-    _reviewNextCharacterHandler.bindings = [
+    reviewNextCharacterHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_3",
             input_event.defaultModifierMask,
@@ -864,10 +864,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _reviewBottomLeftHandler(self, inputEvent=None):
+    def reviewBottomLeftHandler(self, inputEvent=None):
         """The reviewBottomLeftHandler handler.
         """
-        log.debug("_reviewBottomLeftHandler: %s" % inputEvent)
+        log.debug("reviewBottomLeftHandler: %s" % inputEvent)
     # 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
@@ -878,27 +878,27 @@
     # {line,word,character}.  The bottom left is the bottom
     # left of the window currently being reviewed.
     #
-    _reviewBottomLeftHandler.description = \
+    reviewBottomLeftHandler.description = \
         _("Moves flat review to the bottom left.")
-    _reviewBottomLeftHandler.bindings = [
+    reviewBottomLeftHandler.bindings = [
         input_binding.BrailleBinding(
             brlapi.KEY_CMD_BOT_LEFT,
             input_event.NO_MODIFIER_MASK,
             input_event.NO_MODIFIER_MASK),
     ]
 
-    def _showFindGUIHandler(self, inputEvent=None):
+    def showFindGUIHandler(self, inputEvent=None):
         """The showFindGUIHandler handler.
         """
-        log.debug("_showFindGUIHandler: %s" % inputEvent)
+        log.debug("showFindGUIHandler: %s" % inputEvent)
     # Translators: the Orca "Find" dialog allows a user to
     # search for text in a window and then move focus to
     # that text.  For example, they may want to find the
     # "OK" button.
     #
-    _showFindGUIHandler.description = \
+    showFindGUIHandler.description = \
         _("Opens the Orca Find dialog.")
-    _showFindGUIHandler.bindings = [
+    showFindGUIHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Delete",
             input_event.defaultModifierMask,
@@ -911,19 +911,19 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _findNextHandler(self, inputEvent=None):
+    def findNextHandler(self, inputEvent=None):
         """The findNextHandler handler.
         """
-        log.debug("_findNextHandler: %s" % inputEvent)
+        log.debug("findNextHandler: %s" % inputEvent)
     # Translators: the Orca "Find" dialog allows a user to
     # search for text in a window and then move focus to
     # that text.  For example, they may want to find the
     # "OK" button.  This string is used for finding the
     # next occurence of a string.
     #
-    _findNextHandler.description = \
+    findNextHandler.description = \
         _("Searches for the next instance of a string.")
-    _findNextHandler.bindings = [
+    findNextHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Delete",
             input_event.defaultModifierMask,
@@ -936,19 +936,19 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _findPreviousHandler(self, inputEvent=None):
+    def findPreviousHandler(self, inputEvent=None):
         """The findPreviousHandler handler.
         """
-        log.debug("_findPreviousHandler: %s" % inputEvent)
+        log.debug("findPreviousHandler: %s" % inputEvent)
     # Translators: the Orca "Find" dialog allows a user to
     # search for text in a window and then move focus to
     # that text.  For example, they may want to find the
     # "OK" button.  This string is used for finding the
     # previous occurence of a string.
     #
-    _findPreviousHandler.description = \
+    findPreviousHandler.description = \
         _("Searches for the previous instance of a string.")
-    _findPreviousHandler.bindings = [
+    findPreviousHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Delete",
             input_event.defaultModifierMask,
@@ -961,10 +961,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP),
     ]
 
-    def _goBrailleHomeHandler(self, inputEvent=None):
+    def goBrailleHomeHandler(self, inputEvent=None):
         """The goBrailleHomeHandler handler.
         """
-        log.debug("_goBrailleHomeHandler: %s" % inputEvent)
+        log.debug("goBrailleHomeHandler: %s" % inputEvent)
     # 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
@@ -978,9 +978,9 @@
     # feature used here will return the flat review to the
     # object with focus.
     #
-    _goBrailleHomeHandler.description = \
+    goBrailleHomeHandler.description = \
         _("Returns to object with keyboard focus.")
-    _goBrailleHomeHandler.bindings = [
+    goBrailleHomeHandler.bindings = [
         input_binding.BrailleBinding(
             brlapi.KEY_CMD_HOME,
             input_event.NO_MODIFIER_MASK,

Modified: branches/phase2/src/orca/plugins/speech_parameters/plugin.py
==============================================================================
--- branches/phase2/src/orca/plugins/speech_parameters/plugin.py	(original)
+++ branches/phase2/src/orca/plugins/speech_parameters/plugin.py	Mon Sep 29 01:28:09 2008
@@ -47,58 +47,58 @@
         """
         plugin.Plugin.__init__(self, owner, scriptSettings)
 
-    def _decreaseSpeechRateHandler(self, inputEvent=None):
+    def decreaseSpeechRateHandler(self, inputEvent=None):
         """The decreaseSpeechRateHandler handler.
         """
-        log.debug("_decreaseSpeechRateHandler: %s" % inputEvent)
+        log.debug("decreaseSpeechRateHandler: %s" % inputEvent)
     # Translators: the speech rate is how fast the speech
     # synthesis engine will generate speech.
     #
-    _decreaseSpeechRateHandler.description = \
+    decreaseSpeechRateHandler.description = \
         _("Decreases the speech rate.")
-    _decreaseSpeechRateHandler.bindings = [
+    decreaseSpeechRateHandler.bindings = [
         input_binding.BrailleBinding(
             brlapi.KEY_CMD_SAY_SLOWER,
             input_event.NO_MODIFIER_MASK,
             input_event.NO_MODIFIER_MASK)
     ]
 
-    def _increaseSpeechRateHandler(self, inputEvent=None):
+    def increaseSpeechRateHandler(self, inputEvent=None):
         """The increaseSpeechRateHandler handler.
         """
-        log.debug("_increaseSpeechRateHandler: %s" % inputEvent)
+        log.debug("increaseSpeechRateHandler: %s" % inputEvent)
     # Translators: the speech rate is how fast the speech
     # synthesis engine will generate speech.
     #
-    _increaseSpeechRateHandler.description = \
+    increaseSpeechRateHandler.description = \
         _("Increases the speech rate.")
-    _increaseSpeechRateHandler.bindings = [
+    increaseSpeechRateHandler.bindings = [
         input_binding.BrailleBinding(
             brlapi.KEY_CMD_SAY_FASTER,
             input_event.NO_MODIFIER_MASK,
             input_event.NO_MODIFIER_MASK)
     ]
 
-    def _decreaseSpeechPitchHandler(self, inputEvent=None):
+    def decreaseSpeechPitchHandler(self, inputEvent=None):
         """The decreaseSpeechPitchHandler handler.
         """
-        log.debug("_decreaseSpeechPitchHandler: %s" % inputEvent)
+        log.debug("decreaseSpeechPitchHandler: %s" % inputEvent)
     # Translators: the speech pitch is how high or low in
     # pitch/frequency the speech synthesis engine will
     # generate speech.
     #
-    _decreaseSpeechPitchHandler.description = \
+    decreaseSpeechPitchHandler.description = \
         _("Decreases the speech pitch.")
 
-    def _increaseSpeechPitchHandler(self, inputEvent=None):
+    def increaseSpeechPitchHandler(self, inputEvent=None):
         """The increaseSpeechPitchHandler handler.
         """
-        log.debug("_increaseSpeechPitchHandler: %s" % inputEvent)
+        log.debug("increaseSpeechPitchHandler: %s" % inputEvent)
     # Translators: the speech pitch is how high or low in
     # pitch/frequency the speech synthesis engine will
     # generate speech.
     #
-    _increaseSpeechPitchHandler.description = \
+    increaseSpeechPitchHandler.description = \
         _("Increases the speech pitch.")
 
 if __name__ == "__main__":

Modified: branches/phase2/src/orca/plugins/structural_navigation/plugin.py
==============================================================================
--- branches/phase2/src/orca/plugins/structural_navigation/plugin.py	(original)
+++ branches/phase2/src/orca/plugins/structural_navigation/plugin.py	Mon Sep 29 01:28:09 2008
@@ -330,8 +330,9 @@
                         command,
                         input_event.defaultModifierMask,
                         modifiers))
-                self._inputEventHandlers.append(input_binding.InputHandler(
+                self._inputHandlers.append(input_binding.InputHandler(
                     function,
+                    direction + objectType + "Handler",
                     description[0],
                     bindings))
 
@@ -369,10 +370,10 @@
         """
         log.debug("_goObject: %s %s %s" % (direction, objectType, inputEvent))
 
-    def _toggleStructuralNavigationHandler(self, inputEvent=None):
+    def toggleStructuralNavigationHandler(self, inputEvent=None):
         """Toggles structural navigation keys.
         """
-        log.debug("_toggleStructuralNavigation: %s" % inputEvent)
+        log.debug("toggleStructuralNavigation: %s" % inputEvent)
     # Translators: the structural navigation keys are designed
     # to move the caret around the document content by object
     # type. Thus H moves you to the next heading, Shift H to
@@ -380,9 +381,9 @@
     # This feature needs to be toggle-able so that it does not
     # interfere with normal writing functions.
     #
-    _toggleStructuralNavigationHandler.description = \
+    toggleStructuralNavigationHandler.description = \
         _("Toggles structural navigation keys.")
-    _toggleStructuralNavigationHandler.bindings = [
+    toggleStructuralNavigationHandler.bindings = [
         input_binding.KeyboardBinding(
             "z",
             input_event.defaultModifierMask,

Modified: branches/phase2/src/orca/plugins/where_am_i/plugin.py
==============================================================================
--- branches/phase2/src/orca/plugins/where_am_i/plugin.py	(original)
+++ branches/phase2/src/orca/plugins/where_am_i/plugin.py	Mon Sep 29 01:28:09 2008
@@ -46,10 +46,10 @@
         """
         plugin.Plugin.__init__(self, owner, scriptSettings)
 
-    def _whereAmIBasicHandler(self, inputEvent=None):
+    def whereAmIBasicHandler(self, inputEvent=None):
         """The whereAmIBasicHandler handler.
         """
-        log.debug("_whereAmIBasicHandler: %s" % inputEvent)
+        log.debug("whereAmIBasicHandler: %s" % inputEvent)
     # Translators: the "Where am I" feature of Orca allows
     # a user to press a key and then have information
     # about their current context spoken and brailled to
@@ -57,9 +57,9 @@
     # name of the current pushbutton with focus as well as
     # its mnemonic.
     #
-    _whereAmIBasicHandler.description = \
+    whereAmIBasicHandler.description = \
         _("Performs the basic where am I operation.")
-    _whereAmIBasicHandler.bindings = [
+    whereAmIBasicHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Enter",
             input_event.defaultModifierMask,
@@ -74,10 +74,10 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP)
     ]
 
-    def _whereAmIDetailedHandler(self, inputEvent=None):
+    def whereAmIDetailedHandler(self, inputEvent=None):
         """The whereAmIDetailedHandler handler.
         """
-        log.debug("_whereAmIDetailedHandler: %s" % inputEvent)
+        log.debug("whereAmIDetailedHandler: %s" % inputEvent)
     # Translators: the "Where am I" feature of Orca allows
     # a user to press a key and then have information
     # about their current context spoken and brailled to
@@ -85,9 +85,9 @@
     # name of the current pushbutton with focus as well as
     # its mnemonic.
     #
-    _whereAmIDetailedHandler.description = \
+    whereAmIDetailedHandler.description = \
         _("Performs the detailed where am I operation.")
-    _whereAmIDetailedHandler.bindings = [
+    whereAmIDetailedHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Enter",
             input_event.defaultModifierMask,
@@ -102,16 +102,16 @@
             keyboardLayout = settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP)
     ]
 
-    def _getTitleHandler(self, inputEvent=None):
+    def getTitleHandler(self, inputEvent=None):
         """The getTitleHandler handler.
         """
-        log.debug("_getTitleHandler: %s" % inputEvent)
+        log.debug("getTitleHandler: %s" % inputEvent)
     # Translators: This command will cause the window's
     # title to be spoken.
     #
-    _getTitleHandler.description = \
+    getTitleHandler.description = \
         _("Speaks the title bar.")
-    _getTitleHandler.bindings = [
+    getTitleHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Enter",
             input_event.defaultModifierMask,
@@ -127,16 +127,16 @@
     ]
 
 
-    def _getStatusBarHandler(self, inputEvent=None):
+    def getStatusBarHandler(self, inputEvent=None):
         """The getStatusBarHandler handler.
         """
-        log.debug("_getStatusBarHandler: %s" % inputEvent)
+        log.debug("getStatusBarHandler: %s" % inputEvent)
     # Translators: This command will cause the window's
     # status bar contents to be spoken.
     #
-    _getStatusBarHandler.description = \
+    getStatusBarHandler.description = \
         _("Speaks the status bar.")
-    _getStatusBarHandler.bindings = [
+    getStatusBarHandler.bindings = [
         input_binding.KeyboardBinding(
             "KP_Enter",
             input_event.defaultModifierMask,

Modified: branches/phase2/src/orca/script.py
==============================================================================
--- branches/phase2/src/orca/script.py	(original)
+++ branches/phase2/src/orca/script.py	Mon Sep 29 01:28:09 2008
@@ -25,12 +25,7 @@
 # TODO: Add locus of focus support
 # TODO: Add key bypass
 
-"""Each script maintains a set of key bindings, braille bindings, and
-AT-SPI event listeners.  The key bindings are an instance of
-KeyboardBindings.  The braille bindings are also a dictionary where the
-keys are BrlTTY command integers and the values are instances of
-InputEventHandler.  The listeners field is a dictionary where the keys
-are AT-SPI event names and the values are function pointers.
+"""The root class of all scripts that are instantiated for applications.
 
 Instances of scripts are intended to be created solely by the
 script_manager.
@@ -75,8 +70,8 @@
         self._isActive = False
         self.presentIfInactive = False
 
-        self._objectEventListeners = self._introspectObjectEventListeners()
-        self._inputEventHandlers = self._introspectInputEventHandlers()
+        self._objectListeners = self._introspectObjectListeners()
+        self._inputHandlers = self._introspectInputHandlers()
 
         # Load custom settings and also give the module a chance to
         # override our keyboard and braille bindings.
@@ -118,7 +113,7 @@
         """
         log.info("NEW SCRIPT: %s" % self)
 
-    def _introspectObjectEventListeners(self):
+    def _introspectObjectListeners(self):
         """Find the AT-SPI listeners based upon their method name.
         """
         # Find all the things that look like Listener methods.
@@ -144,7 +139,7 @@
     
         return listeners
 
-    def _introspectInputEventHandlers(self):
+    def _introspectInputHandlers(self):
         """Find the input event handlers for this object based upon their 
         method name.
         """
@@ -172,6 +167,7 @@
             except AttributeError:
                 bindings = []
             handlers.append(input_binding.InputHandler(method,
+                                                       method.__name__,
                                                        description, 
                                                        bindings))
         return handlers
@@ -227,7 +223,7 @@
         care about.
         """
         keys = []
-        for handler in self._inputEventHandlers:
+        for handler in self._inputHandlers:
             keys.extend(
                 map(lambda y: y.command,
                     filter(lambda x: isinstance(x,
@@ -252,10 +248,10 @@
         braille.setKeys([])
 
     def getHandlerForInputEvent(self, inputEvent):
-        """Returns the name of the key that contains an inputEventHandler
+        """Returns the name of the key that contains an InputHandler
         passed as argument
         """
-        for handler in self._inputEventHandlers:
+        for handler in self._inputHandlers:
             if handler.handlesEvent(inputEvent):
                 return handler
         for plugin in self._plugins:
@@ -292,9 +288,9 @@
         # keys is *not* deterministic, and is not guaranteed to be related
         # to the order in which they were added.
         #
-        for key in self._objectEventListeners.keys():
+        for key in self._objectListeners.keys():
             if event.type.startswith(key):
-                self._objectEventListeners[key](event)
+                self._objectListeners[key](event)
         for plugin in self._plugins:
             plugin.processObjectEvent(event)
 
@@ -315,7 +311,7 @@
 
         log.debug("activating %s..." % self)
 
-        for eventType in self._objectEventListeners.keys():
+        for eventType in self._objectListeners.keys():
             utils.registerEventListener(eventType)
         
         self._registerBrailleKeys()
@@ -338,7 +334,7 @@
         for plugin in self._plugins:
             plugin.deactivate()
 
-        for eventType in self._objectEventListeners.keys():
+        for eventType in self._objectListeners.keys():
             utils.deregisterEventListener(eventType)
 
         self._unregisterBrailleKeys()

Modified: branches/phase2/src/orca/script_manager.py
==============================================================================
--- branches/phase2/src/orca/script_manager.py	(original)
+++ branches/phase2/src/orca/script_manager.py	Mon Sep 29 01:28:09 2008
@@ -350,7 +350,7 @@
         processSynchronously = synchronousMode
 
         event = None
-        if isinstance(e, input_event.InputEvent):
+        if isinstance(e, input_event.InputEvent):            
             event = e
         elif isinstance(e, pyatspi.event.Event):
             if e.type in ignoredEventsList:
@@ -394,7 +394,11 @@
                 pass
 
         if event:
-            log.debug("QUEUEING %s" % str(event).replace("\n"," "))
+            try:
+                log.debug("QUEUEING %s (handler=%s)" \
+                          % (str(event).replace("\n"," "), event.handler))
+            except AttributeError:
+                log.debug("QUEUEING %s" % str(event).replace("\n"," "))
             self._eventQueue.put(event)
             if processSynchronously:
                 self._dequeueEvent()



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