[orca] More work on bgo#589925 Adding support for Empathy.



commit 88e461d8b83172e389a365df7a4e1c9a90b90d5a
Author: Joanmarie Diggs <Joanmarie Diggs gmail com>
Date:   Tue Apr 27 23:59:02 2010 -0400

    More work on bgo#589925 Adding support for Empathy.
    
    This should stop Orca from speaking the "connected" time every
    second.

 src/orca/scripts/apps/empathy/script.py |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/empathy/script.py b/src/orca/scripts/apps/empathy/script.py
index 72e6201..4ac93d1 100644
--- a/src/orca/scripts/apps/empathy/script.py
+++ b/src/orca/scripts/apps/empathy/script.py
@@ -101,6 +101,11 @@ class Script(default.Script):
     def onTextInserted(self, event):
         """Called whenever text is added to an object."""
 
+        if event.source.getRole() == pyatspi.ROLE_LABEL:
+            # The is the timer of a call.
+            #
+            return
+
         if self.chat.presentInsertedText(event):
             return
 
@@ -116,3 +121,18 @@ class Script(default.Script):
         allPageTabs = self.findByRole(event.source, pyatspi.ROLE_PAGE_TAB)
 
         default.Script.onWindowActivated(self, event)
+
+    def onValueChanged(self, event):
+        """Called whenever an object's value changes.  Currently, the
+        value changes for non-focused objects are ignored.
+
+        Arguments:
+        - event: the Event
+        """
+
+        if event.source.getRole() == pyatspi.ROLE_WINDOW:
+            # The is the timer of a call.
+            #
+            return
+
+        default.Script.onValueChanged(self, event)



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