Index: src/orca/scripts/gnome-panel.py
===================================================================
--- src/orca/scripts/gnome-panel.py	(revision 0)
+++ src/orca/scripts/gnome-panel.py	(revision 0)
@@ -0,0 +1,92 @@
+# Orca
+#
+# Copyright 2004-2007 Sun Microsystems Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+""" Custom script for gnome-panel
+"""
+
+__id__        = ""
+__version__   = ""
+__date__      = ""
+__copyright__ = "Copyright (c) 2005-2007 Sun Microsystems Inc."
+__license__   = "LGPL"
+
+import orca.orca as orca
+import orca.default as default
+import orca.debug as debug
+import orca.settings as settings
+import orca.rolenames as rolenames
+
+from orca.orca_i18n import _
+
+########################################################################
+#                                                                      #
+# The gnome-panel script class.                                        #
+#                                                                      #
+########################################################################
+
+class Script(default.Script):
+
+    def __init__(self, app):
+        """Creates a new script for gnome-terminal
+
+        Arguments:
+        - app: the application to create a script for.
+        """
+
+        # The same accessible name is returned for all
+        # applets in the gnome-panel when its tool tip
+        # is popped up.
+        settings.cacheNames = False
+        settings.cacheDescriptions = False
+        
+        # Set the debug level for all the methods in this script.
+        #
+        self.debugLevel = debug.LEVEL_SEVERE
+        self._debug("__init__")
+
+        default.Script.__init__(self, app)
+        
+
+    def _debug(self, msg):
+        """ Convenience method for printing debug messages
+        """
+        debug.println(self.debugLevel, "GNOME_PANEL: "+msg)
+
+
+    def onStateChanged(self, event):
+        """Called whenever an object's state changes.
+
+        Arguments:
+        - event: the Event
+        """
+        self._debug("onStateChanged: '%s' %s (%d, %d)" % \
+                    (event.source.description, event.type, event.detail1, event.detail2))
+
+        # Handle tool tip pop ups. The problem here is that
+        # the event source is always the same as the first
+        # gnome-panel item that was popped up.
+        #
+        if event.type == "object:state-changed:showing" and \
+           event.detail1 == 1 and \
+           event.source.role == rolenames.ROLE_TOOL_TIP:
+            orca.setLocusOfFocus(event, event.source)
+        else:
+            default.Script.onStateChanged(self, event)
+
+        
Index: src/orca/scripts/gnome-power-manager.py
===================================================================
--- src/orca/scripts/gnome-power-manager.py	(revision 2227)
+++ src/orca/scripts/gnome-power-manager.py	(working copy)
@@ -69,8 +69,8 @@
         """
         listeners = default.Script.getListeners(self)
 
-        listeners["object:bounds-changed"] = \
-            self.onBoundsChanged
+        # listeners["object:bounds-changed"] = \
+        #     self.onBoundsChanged
 
         return listeners
 
Index: src/orca/scripts/Makefile.am
===================================================================
--- src/orca/scripts/Makefile.am	(revision 2227)
+++ src/orca/scripts/Makefile.am	(working copy)
@@ -11,6 +11,7 @@
 	gnome_segv2.py \
 	gnome-mud.py \
 	gnome-keyring-ask.py \
+	gnome-panel.py \
 	gnome-power-manager.py \
 	gnome-search-tool.py \
 	gnome-terminal.py \
Index: src/orca/settings.py
===================================================================
--- src/orca/settings.py	(revision 2227)
+++ src/orca/settings.py	(working copy)
@@ -30,6 +30,7 @@
 import os
 import re
 import sys
+import gtk
 
 screenWidth = 640
 screenHeight = 480
@@ -459,6 +460,10 @@
 #
 doubleClickTimeout = 0.5
 
+# Whether tool tips can be presented.
+#
+presentToolTips = False
+
 # Obtain/set information regarding whether accessibility is enabled
 # or not.
 #
Index: src/orca/orca.py
===================================================================
--- src/orca/orca.py	(revision 2227)
+++ src/orca/orca.py	(working copy)
@@ -49,6 +49,7 @@
 import signal
 import string
 import time
+import gtk
 
 import atspi
 import braille
@@ -1028,6 +1029,20 @@
     if settings.timeoutCallback and (settings.timeoutTime > 0):
         signal.alarm(0)
 
+    # The bug that caused gnome-panel to crash is fixed in GTK 2.10.11.
+    minimum_gtk_version = (100000 * 2) + \
+                         (1000 * 10) + \
+                          11
+
+    current_gtk_version  = (100000 * gtk.gtk_version[0]) + \
+                           (1000 * gtk.gtk_version[1]) + \
+                            gtk.gtk_version[2]
+                           
+
+    settings.presentToolTips = (current_gtk_version >= minimum_gtk_version)
+    debug.println(debug.LEVEL_FINEST,
+                  "settings.presentToolTips='%s'" % settings.presentToolTips)
+                                 
     _initialized = True
     return True
 
Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 2227)
+++ src/orca/default.py	(working copy)
@@ -688,8 +688,8 @@
             self.noOp
         listeners["object:link-selected"]                   = \
             self.onLinkSelected
-        listeners["object:bounds-changed"]                  = \
-            self.noOp
+        # listeners["object:bounds-changed:"]                 = \
+        #     self.noOp
         listeners["object:state-changed:"]                  = \
             self.onStateChanged
         listeners["object:selection-changed"]               = \
Index: src/orca/focus_tracking_presenter.py
===================================================================
--- src/orca/focus_tracking_presenter.py	(revision 2227)
+++ src/orca/focus_tracking_presenter.py	(working copy)
@@ -29,6 +29,7 @@
 import Queue
 import threading
 import time
+import gtk
 
 import atspi
 import braille
@@ -376,18 +377,15 @@
 
         debug.printObjectEvent(debug.LEVEL_FINEST, event)
 
-        # [[[TODO: WDW - HACK to prevent gnome-panel from killing
-        # itself.  It seems to do so after it issues some tool tip
-        # events and Orca attempts to process them.  We're not really
-        # doing anything with tool tips right now, so we just ignore
-        # them.  Note that this is just a bandaid to the problem.  We
-        # should do something better.  Please refer to bug 368626
-        # http://bugzilla.gnome.org/show_bug.cgi?id=368626 to follow
-        # this problem.]]]
-        #
         try:
             if event.source.role == rolenames.ROLE_TOOL_TIP:
-                return
+                # Check that it's okay to present tool tips. There
+                # is a bug in GTK versions prior to 2.10.11 that
+                # caused gnome-panel to crash.
+                if not settings.presentToolTips:
+                    return
+                debug.println(debug.LEVEL_SEVERE, "TOOL TIP")
+
         except:
             pass
 
