[orca] Fix for bgo#582491 - Strange message table behavior with Evolution



commit c781be400c4714dba6f99face5828cd7b3624242
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Fri Jul 31 20:35:12 2009 -0400

    Fix for bgo#582491 - Strange message table behavior with Evolution
    
    Note that this only handles the most extreme problem found - incoming
    mail when Evo is not focused causing Orca to no longer provide access
    to the app with focus. The within-Evo issues are due to bgo#483452
    which was filed against Evolution in October 2007 and which has not
    even been triaged by the Evolution maintainers. :-(

 src/orca/scripts/apps/evolution/script.py |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
index 22582f1..2335cac 100644
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -1629,6 +1629,24 @@ class Script(default.Script):
         #
         default.Script.onStateChanged(self, event)
 
+    def isActivatableEvent(self, event):
+        """Returns True if the given event is one that should cause this
+        script to become the active script.  This is only a hint to
+        the focus tracking manager and it is not guaranteed this
+        request will be honored.  Note that by the time the focus
+        tracking manager calls this method, it thinks the script
+        should become active.  This is an opportunity for the script
+        to say it shouldn't.
+        """
+
+        # If the Evolution window is not focused, ignore this event.
+        #
+        window = self.getTopLevel(event.source)
+        if window and not window.getState().contains(pyatspi.STATE_ACTIVE):
+            return False
+
+        return True
+
     def onFocus(self, event):
         """Called whenever an object gets focus.
 



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