Index: src/orca/scripts/gedit.py
===================================================================
--- src/orca/scripts/gedit.py	(revision 2109)
+++ src/orca/scripts/gedit.py	(working copy)
@@ -133,7 +133,7 @@
         # Spelling dialog. Look for the one that isn't a label to
         # another component.
         #
-        allLabels = util.findByRole(panel, rolenames.ROLE_LABEL)
+        allLabels = self.findByRole(panel, rolenames.ROLE_LABEL)
         for i in range(0, len(allLabels)):
             if allLabels[i].name.startswith(_("Change to:")) or \
                allLabels[i].name.startswith(_("Misspelled word:")):
@@ -149,7 +149,7 @@
         # was called. If they are the same then we ignore it.
 
         if self.textArea != None:
-            allText = util.findByRole(self.textArea, rolenames.ROLE_TEXT)
+            allText = self.findByRole(self.textArea, rolenames.ROLE_TEXT)
             caretPosition = allText[0].text.caretOffset
 
             debug.println(self.debugLevel, \
@@ -415,7 +415,7 @@
            and orca_state.lastInputEvent.event_string == "Return":
             debug.println(self.debugLevel, "gedit.onCaretMoved - find dialog.")
 
-            allComboBoxes = util.findByRole(orca_state.locusOfFocus.app,
+            allComboBoxes = self.findByRole(orca_state.locusOfFocus.app,
                                             rolenames.ROLE_COMBO_BOX)
             phrase = util.getDisplayedText(allComboBoxes[0])
             [text, caretOffset, startOffset] = \
Index: src/orca/scripts/planner.py
===================================================================
--- src/orca/scripts/planner.py	(revision 2109)
+++ src/orca/scripts/planner.py	(working copy)
@@ -93,7 +93,7 @@
                           "planner.onFocus - main window: " \
                           + "one of the four graphic toggle buttons.")
             filler = obj.parent
-            allLabels = util.findByRole(filler, rolenames.ROLE_LABEL)
+            allLabels = self.findByRole(filler, rolenames.ROLE_LABEL)
             text += allLabels[0].name
 
         if obj.state.count(atspi.Accessibility.STATE_CHECKED):
@@ -169,7 +169,7 @@
                           + "one of the four graphic toggle buttons.")
             if not already_focused:
                 filler = obj.parent
-                allLabels = util.findByRole(filler, rolenames.ROLE_LABEL)
+                allLabels = self.findByRole(filler, rolenames.ROLE_LABEL)
                 tmp.append(allLabels[0].name)
                 tmp.extend(self._getDefaultSpeech(obj, already_focused))
                 if obj.state.count(atspi.Accessibility.STATE_CHECKED):
Index: src/orca/scripts/gcalctool.py
===================================================================
--- src/orca/scripts/gcalctool.py	(revision 2109)
+++ src/orca/scripts/gcalctool.py	(working copy)
@@ -114,9 +114,9 @@
             # the text_view display. This can be found by looking for an
             # accessible object with a role of ROLE_EDITBAR.
             #
-            d = util.findByRole(event.source, rolenames.ROLE_TEXT)
+            d = self.findByRole(event.source, rolenames.ROLE_TEXT)
             if len(d) == 0:
-                d = util.findByRole(event.source, rolenames.ROLE_EDITBAR)
+                d = self.findByRole(event.source, rolenames.ROLE_EDITBAR)
 
             # If d is an empty list at this point, we're unable to get the
             # gcalctool display. Inform the user.
Index: src/orca/scripts/liferea.py
===================================================================
--- src/orca/scripts/liferea.py	(revision 2109)
+++ src/orca/scripts/liferea.py	(working copy)
@@ -143,7 +143,7 @@
         #
         if orca_state.locusOfFocus.role == rolenames.ROLE_TABLE_COLUMN_HEADER:
              table = event.source.parent
-             cells = util.findByRole(table, rolenames.ROLE_TABLE_CELL)
+             cells = self.findByRole(table, rolenames.ROLE_TABLE_CELL)
              eventsynthesizer.clickObject(cells[1], 1)
         
         default.Script.locusOfFocusChanged(self, event, 
Index: src/orca/scripts/gaim.py
===================================================================
--- src/orca/scripts/gaim.py	(revision 2109)
+++ src/orca/scripts/gaim.py	(working copy)
@@ -305,7 +305,7 @@
             # text field. Hopefully this is true for other types of chat
             # as well, but is currently untested.
             #
-            allTextFields = util.findByRole(chatRoomTab,
+            allTextFields = self.findByRole(chatRoomTab,
                                             rolenames.ROLE_TEXT)
             index = len(allTextFields) - 2
             if index >= 0:
Index: src/orca/scripts/gnome-search-tool.py
===================================================================
--- src/orca/scripts/gnome-search-tool.py	(revision 2109)
+++ src/orca/scripts/gnome-search-tool.py	(working copy)
@@ -137,7 +137,7 @@
             #
             if not self.fileTable:
                 frame = util.getTopLevel(event.source)
-                allTables = util.findByRole(frame, rolenames.ROLE_TABLE)
+                allTables = self.findByRole(frame, rolenames.ROLE_TABLE)
                 self.fileTable = allTables[0]
 
             gobject.idle_add(self._speakSearching)
Index: src/orca/scripts/Evolution.py
===================================================================
--- src/orca/scripts/Evolution.py	(revision 2109)
+++ src/orca/scripts/Evolution.py	(working copy)
@@ -239,7 +239,7 @@
         - panel: the Setup Assistant panel.
         """
 
-        allLabels = util.findByRole(panel, rolenames.ROLE_LABEL)
+        allLabels = self.findByRole(panel, rolenames.ROLE_LABEL)
         for i in range(0, len(allLabels)):
             self.speakSetupAssistantLabel(allLabels[i])
 
@@ -914,7 +914,7 @@
             # misspelt word.
             #
             panel = event.source.parent.parent
-            allLabels = util.findByRole(panel, rolenames.ROLE_LABEL)
+            allLabels = self.findByRole(panel, rolenames.ROLE_LABEL)
             found = False
             for i in range(0, len(allLabels)):
                 if not found:
@@ -937,7 +937,7 @@
             if self.message_panel != None:
                 allTokens = []
                 panel = self.message_panel
-                allText = util.findByRole(panel, rolenames.ROLE_TEXT)
+                allText = self.findByRole(panel, rolenames.ROLE_TEXT)
                 for i in range(0, len(allText)):
                     text = self.getText(allText[i], 0, -1)
                     tokens = text.split()
@@ -979,7 +979,7 @@
 
             table = event.source.parent.parent.parent.parent.parent
             cell = table.child(table.childCount-1)
-            allText = util.findByRole(cell, rolenames.ROLE_TEXT)
+            allText = self.findByRole(cell, rolenames.ROLE_TEXT)
             utterance = "for " + self.getText(allText[0], 0, -1)
             speech.speak(utterance)
             return
Index: src/orca/scripts/StarOffice.py
===================================================================
--- src/orca/scripts/StarOffice.py	(revision 2109)
+++ src/orca/scripts/StarOffice.py	(working copy)
@@ -143,7 +143,7 @@
     inputLine = None
     panel = obj.parent.parent.parent.parent
     if panel and panel.role == rolenames.ROLE_PANEL:
-        allParagraphs = util.findByRole(panel, rolenames.ROLE_PARAGRAPH)
+        allParagraphs = self.findByRole(panel, rolenames.ROLE_PARAGRAPH)
         if len(allParagraphs) == 1:
             inputLine = allParagraphs[0]
         else:
@@ -982,7 +982,7 @@
         - pane: the option pane in the spell check dialog.
         """
 
-        paragraph = util.findByRole(pane, rolenames.ROLE_PARAGRAPH)
+        paragraph = self.findByRole(pane, rolenames.ROLE_PARAGRAPH)
 
         # Determine which word is the misspelt word. This word will have
         # non-default text attributes associated with it.
@@ -1133,7 +1133,7 @@
         - panel: the Setup panel.
         """
 
-        allLabels = util.findByRole(panel, rolenames.ROLE_LABEL)
+        allLabels = self.findByRole(panel, rolenames.ROLE_LABEL)
         for i in range(0, len(allLabels)):
             self.speakSetupLabel(allLabels[i])
 
@@ -1335,7 +1335,7 @@
                 # (and not the ones that have LABEL_FOR relationships).
                 #
                 panel = event.source.parent
-                allLabels = util.findByRole(panel, rolenames.ROLE_LABEL)
+                allLabels = self.findByRole(panel, rolenames.ROLE_LABEL)
                 for i in range(0, len(allLabels)):
                     relations = allLabels[i].relations
                     hasLabelFor = False
@@ -1430,11 +1430,11 @@
             debug.println(self.debugLevel,
                 "StarOffice.onWindowActivated - Setup dialog: Welcome screen.")
 
-            allPanels = util.findByRole(event.source.parent,
+            allPanels = self.findByRole(event.source.parent,
                                         rolenames.ROLE_PANEL)
             for i in range(0, len(allPanels)):
                 if not allPanels[i].name:
-                    allLabels = util.findByRole(allPanels[i],
+                    allLabels = self.findByRole(allPanels[i],
                                                 rolenames.ROLE_LABEL)
                     for i in range(0, len(allLabels)):
                         self.speakSetupLabel(allLabels[i])
Index: src/orca/util.py
===================================================================
--- src/orca/util.py	(revision 2110)
+++ src/orca/util.py	(working copy)
@@ -1043,64 +1043,3 @@
                   "...util.getKnownApplications")
 
     return apps
-
-def getObjects(root, onlyShowing=True):
-    """Returns a list of all objects under the given root.  Objects
-    are returned in no particular order - this function does a simple
-    tree traversal, ignoring the children of objects which report the
-    MANAGES_DESCENDANTS state.
-
-    Arguments:
-    - root:        the Accessible object to traverse
-    - onlyShowing: examine only those objects that are SHOWING
-
-    Returns: a list of all objects under the specified object
-    """
-
-    # The list of object we'll return
-    #
-    objlist = []
-
-    # Start at the first child of the given object
-    #
-    if root.childCount <= 0:
-        return objlist
-
-    for i in range(0, root.childCount):
-        debug.println(debug.LEVEL_FINEST,
-                      "util.getObjects looking at child %d" % i)
-        child = root.child(i)
-        if child \
-           and ((not onlyShowing) \
-                or (onlyShowing \
-                    and (child.state.count(atspi.Accessibility.STATE_SHOWING)))):
-            objlist.append(child)
-            if (child.state.count(atspi.Accessibility.STATE_MANAGES_DESCENDANTS) \
-                == 0) \
-                and (child.childCount > 0):
-                objlist.extend(getObjects(child))
-
-    return objlist
-
-def findByRole(root, role, onlyShowing=True):
-    """Returns a list of all objects of a specific role beneath the
-    given root.  [[[TODO: MM - This is very inefficient - this should
-    do it's own traversal and not add objects to the list that aren't
-    of the specified role.  Instead it uses the traversal from
-    getObjects and then deletes objects from the list that aren't of
-    the specified role.  Logged as bugzilla bug 319740.]]]
-
-    Arguments:
-    - root the Accessible object to traverse
-    - role the string describing the Accessible role of the object
-    - onlyShowing: examine only those objects that are SHOWING
-
-    Returns a list of descendants of the root that are of the given role.
-    """
-
-    objlist = []
-    allobjs = getObjects(root, onlyShowing)
-    for o in allobjs:
-        if o.role == role:
-            objlist.append(o)
-    return objlist
Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 2110)
+++ src/orca/default.py	(working copy)
@@ -3445,6 +3445,66 @@
 # here so that they can be customized in application scripts if so desired.
 # 
 
+    def getObjects(self, root, onlyShowing=True):
+        """Returns a list of all objects under the given root.  Objects
+        are returned in no particular order - this function does a simple
+        tree traversal, ignoring the children of objects which report the
+        MANAGES_DESCENDANTS state.
+
+        Arguments:
+        - root:        the Accessible object to traverse
+        - onlyShowing: examine only those objects that are SHOWING
+
+        Returns: a list of all objects under the specified object
+        """
+
+        # The list of object we'll return
+        #
+        objlist = []
+
+        # Start at the first child of the given object
+        #
+        if root.childCount <= 0:
+            return objlist
+
+        for i in range(0, root.childCount):
+            debug.println(debug.LEVEL_FINEST,
+                          "Script.getObjects looking at child %d" % i)
+            child = root.child(i)
+            if child \
+               and ((not onlyShowing) or (onlyShowing and \
+                    (child.state.count(atspi.Accessibility.STATE_SHOWING)))):
+                objlist.append(child)
+                if (child.state.count( \
+                    atspi.Accessibility.STATE_MANAGES_DESCENDANTS) == 0) \
+                    and (child.childCount > 0):
+                    objlist.extend(self.getObjects(child))
+
+        return objlist
+
+    def findByRole(self, root, role, onlyShowing=True):
+        """Returns a list of all objects of a specific role beneath the
+        given root.  [[[TODO: MM - This is very inefficient - this should
+        do it's own traversal and not add objects to the list that aren't
+        of the specified role.  Instead it uses the traversal from
+        getObjects and then deletes objects from the list that aren't of
+        the specified role.  Logged as bugzilla bug 319740.]]]
+
+        Arguments:
+        - root the Accessible object to traverse
+        - role the string describing the Accessible role of the object
+        - onlyShowing: examine only those objects that are SHOWING
+
+        Returns a list of descendants of the root that are of the given role.
+        """
+
+        objlist = []
+        allobjs = self.getObjects(root, onlyShowing)
+        for o in allobjs:
+            if o.role == role:
+                objlist.append(o)
+        return objlist
+
     def findUnrelatedLabels(self, root):
         """Returns a list containing all the unrelated (i.e., have no
         relations to anything and are not a fundamental element of a
@@ -3459,7 +3519,7 @@
 
         # Find all the labels in the dialog
         #
-        allLabels = findByRole(root, rolenames.ROLE_LABEL)
+        allLabels = self.findByRole(root, rolenames.ROLE_LABEL)
 
         # add the names of only those labels which are not associated with
         # other objects (i.e., empty relation sets).
Index: src/orca/J2SE-access-bridge.py
===================================================================
--- src/orca/J2SE-access-bridge.py	(revision 2109)
+++ src/orca/J2SE-access-bridge.py	(working copy)
@@ -168,10 +168,10 @@
                 # search the layered pane for a popup menu
                 child = event.source.child(i)
                 if child.role == rolenames.ROLE_LAYERED_PANE:
-                    popup = util.findByRole(child, rolenames.ROLE_POPUP_MENU, False)
+                    popup = self.findByRole(child, rolenames.ROLE_POPUP_MENU, False)
                     if len(popup) > 0:
                         # set the locus of focus to the armed menu item
-                        item = util.findByRole(popup[0], rolenames.ROLE_MENU_ITEM, False)
+                        item = self.findByRole(popup[0], rolenames.ROLE_MENU_ITEM, False)
                         for j in range(0, len(item)):
                             if item[j].state.count(Accessibility.STATE_ARMED):
                                 orca.setLocusOfFocus(event, item[j])
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 2110)
+++ ChangeLog	(working copy)
@@ -31,6 +31,22 @@
           Moved:
           def findUnrelatedLabels(root):
 
+        * src/orca/scripts/gedit.py:
+          src/orca/scripts/planner.py:
+          src/orca/scripts/gcalctool.py:
+          src/orca/scripts/liferea.py:
+          src/orca/scripts/gaim.py:
+          src/orca/scripts/gnome-search-tool.py:
+          src/orca/scripts/Evolution.py:
+          src/orca/scripts/StarOffice.py:
+          src/orca/util.py:
+          src/orca/default.py:
+          src/orca/J2SE-access-bridge.py:
+          Another partial fix for bug #395548.
+
+          Moved:
+          def findByRole(root, role, onlyShowing=True):
+
 2007-03-05  Rich Burridge <rich.burridge@sun.com>
 
         * src/orca/debug.py:
