Index: src/orca/scripts/Evolution.py
===================================================================
--- src/orca/scripts/Evolution.py	(revision 3434)
+++ src/orca/scripts/Evolution.py	(working copy)
@@ -249,7 +249,7 @@
 
         # Set the debug level for all the methods in this script.
         #
-        self.debugLevel = debug.LEVEL_FINEST
+        self.debugLevel = debug.LEVEL_OFF
 
         default.Script.__init__(self, app)
 
@@ -716,6 +716,7 @@
         - newLocusOfFocus: Accessible that is the new locus of focus
         """
 
+        print "Evolution: locusOfFocusChanged called."
         # Pylint is confused and flags several errors of the type:
         #
         # E1101:1040:Script.locusOfFocusChanged: Module 'orca.rolenames'
@@ -749,7 +750,11 @@
 
         rolesList = [pyatspi.ROLE_TEXT, \
                      pyatspi.ROLE_PANEL, \
-                     pyatspi.ROLE_UNKNOWN]
+                     pyatspi.ROLE_UNKNOWN, \
+                     pyatspi.ROLE_PANEL, \
+                     pyatspi.ROLE_SCROLL_PANE, \
+                     pyatspi.ROLE_FILLER, \
+                     pyatspi.ROLE_SPLIT_PANE]
         if self.isDesiredFocusedItem(event.source, rolesList):
             debug.println(self.debugLevel,
                           "evolution.locusOfFocusChanged - mail view: " \
@@ -1276,13 +1281,29 @@
 
         rolesList = [pyatspi.ROLE_TEXT, \
                      pyatspi.ROLE_PANEL, \
+                     pyatspi.ROLE_UNKNOWN, \
                      pyatspi.ROLE_PANEL, \
-                     pyatspi.ROLE_SCROLL_PANE]
+                     pyatspi.ROLE_SCROLL_PANE, \
+                     pyatspi.ROLE_FILLER, \
+                     pyatspi.ROLE_PANEL]
         if self.isDesiredFocusedItem(event.source, rolesList):
             debug.println(self.debugLevel,
                           "evolution.locusOfFocusChanged - mail " \
                           + "compose window: message area.")
 
+            # We are getting extra (bogus?) "focus:" events from Evolution
+            # when we type the first character at the beginning of a line.
+            # If the parent of the locusOfFocus and the event.source are
+            # the same, and the last key pressed wasn't an arrow key, then
+            # just ignore. See bug #490317 for more details.
+            #
+            if self.isSameObject(event.source.parent,
+                                 orca_state.locusOfFocus.parent):
+                lastKey = orca_state.lastNonModifierKeyEvent.event_string
+                if lastKey != "Left" and lastKey != "Right" and \
+                   lastKey != "Up" and lastKey != "Down":
+                    return
+
             self.message_panel = event.source.parent.parent
 
             if self.speakNewLine(event.source):
