Index: ChangeLog
===================================================================
--- ChangeLog	(revision 2111)
+++ ChangeLog	(working copy)
@@ -47,6 +47,15 @@
           Moved:
           def findByRole(root, role, onlyShowing=True):
 
+        * src/orca/default.py:
+          src/orca/hierarchical_presenter.py:
+          src/orca/util.py:
+          src/orca/scripts/metacity.py:
+          Another partial fix for bug #395548.
+
+          Moved:
+          def getKnownApplications():
+
 2007-03-05  Rich Burridge <rich.burridge@sun.com>
 
         * src/orca/debug.py:
Index: src/orca/scripts/metacity.py
===================================================================
--- src/orca/scripts/metacity.py	(revision 2109)
+++ src/orca/scripts/metacity.py	(working copy)
@@ -102,7 +102,7 @@
         # not.
         #
         found = False
-        for app in util.getKnownApplications():
+        for app in self.getKnownApplications():
             i = 0
             while i < app.childCount:
                 win = app.child(i)
Index: src/orca/util.py
===================================================================
--- src/orca/util.py	(revision 2111)
+++ src/orca/util.py	(working copy)
@@ -1019,27 +1019,3 @@
     accelerator  = accelerator.replace(">"," ")
 
     return [accelerator, fullShortcut]
-
-def getKnownApplications():
-    """Retrieves the list of currently running apps for the desktop
-    as a list of Accessible objects.
-    """
-
-    debug.println(debug.LEVEL_FINEST,
-                  "util.getKnownApplications...")
-
-    apps = []
-    registry = atspi.Registry()
-    for i in range(0, registry.desktop.childCount):
-        try:
-            acc = registry.desktop.getChildAtIndex(i)
-            app = atspi.Accessible.makeAccessible(acc)
-            if app:
-                apps.insert(0, app)
-        except:
-            debug.printException(debug.LEVEL_FINEST)
-
-    debug.println(debug.LEVEL_FINEST,
-                  "...util.getKnownApplications")
-
-    return apps
Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 2111)
+++ src/orca/default.py	(working copy)
@@ -3445,6 +3445,30 @@
 # here so that they can be customized in application scripts if so desired.
 # 
 
+    def getKnownApplications(self):
+        """Retrieves the list of currently running apps for the desktop
+        as a list of Accessible objects.
+        """
+
+        debug.println(debug.LEVEL_FINEST,
+                      "Script.getKnownApplications...")
+
+        apps = []
+        registry = atspi.Registry()
+        for i in range(0, registry.desktop.childCount):
+            try:
+                acc = registry.desktop.getChildAtIndex(i)
+                app = atspi.Accessible.makeAccessible(acc)
+                if app:
+                    apps.insert(0, app)
+            except:
+                debug.printException(debug.LEVEL_FINEST)
+
+        debug.println(debug.LEVEL_FINEST,
+                      "...Script.getKnownApplications")
+
+        return apps
+
     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
@@ -3649,7 +3673,7 @@
 
         level = debug.LEVEL_OFF
 
-        apps = util.getKnownApplications()
+        apps = self.getKnownApplications()
         debug.println(level, "There are %d Accessible applications" % len(apps))
         for app in apps:
             debug.printDetails(level, "  App: ", app, False)
@@ -3700,7 +3724,7 @@
         """
 
         window = None
-        apps = util.getKnownApplications()
+        apps = self.getKnownApplications()
         for app in apps:
             for i in range(0, app.childCount):
                 try:
Index: src/orca/hierarchical_presenter.py
===================================================================
--- src/orca/hierarchical_presenter.py	(revision 2109)
+++ src/orca/hierarchical_presenter.py	(working copy)
@@ -107,7 +107,7 @@
         accessible
         """
 
-        apps = util.getKnownApplications()
+        apps = orca_state.activeScript.getKnownApplications()
         for i in range(0, len(apps)):
             if accessible.app == apps[i]:
                 return i
@@ -155,7 +155,7 @@
     def _navigateInterObject(self, keystring):
         """Navigates between objects in the component hierarchy."""
 
-        apps = util.getKnownApplications()
+        apps = orca_state.activeScript.getKnownApplications()
         if keystring == "Up":
             if self._currentObject == self._currentObject.app:
                 index = max(self._getApplicationIndex(self._currentObject) - 1,
@@ -436,7 +436,7 @@
 
         speech.speak(_("Switching to hierarchical navigation mode."))
 
-        apps = util.getKnownApplications()
+        apps = orca_state.activeScript.getKnownApplications()
 
         win = orca_state.activeScript.findActiveWindow()
 
