[orca/gnome-3-4] Minor adjustments to get Orca working with Empathy 3.4



commit 457b97f4d475ddf421cd75ea449b54a345c78976
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Mar 27 23:10:29 2012 -0400

    Minor adjustments to get Orca working with Empathy 3.4

 src/orca/script_manager.py              |    1 +
 src/orca/scripts/apps/empathy/script.py |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/script_manager.py b/src/orca/script_manager.py
index ffebbb7..00a50fd 100644
--- a/src/orca/script_manager.py
+++ b/src/orca/script_manager.py
@@ -60,6 +60,7 @@ class ScriptManager:
              'Earlybird':        'Thunderbird',
              'bug-buddy':        'gnome_segv2',
              'gaim':             'pidgin',
+             'empathy-chat':     'empathy',
              'gnome-calculator': 'gcalctool',
              'Nereid':           'Banshee',
              'vte':              'gnome-terminal'}
diff --git a/src/orca/scripts/apps/empathy/script.py b/src/orca/scripts/apps/empathy/script.py
index d9f6c89..cd01112 100644
--- a/src/orca/scripts/apps/empathy/script.py
+++ b/src/orca/scripts/apps/empathy/script.py
@@ -94,6 +94,21 @@ class Script(default.Script):
 
         self.chat.setAppPreferences(prefs)
 
+    def skipObjectEvent(self, event):
+        """Gives us, and scripts, the ability to decide an event isn't
+        worth taking the time to process under the current circumstances.
+
+        Arguments:
+        - event: the Event
+
+        Returns True if we shouldn't bother processing this object event.
+        """
+
+        if self.chat.isChatRoomMsg(event.source):
+            return False
+
+        return default.Script.skipObjectEvent(self, event)
+
     def onTextInserted(self, event):
         """Called whenever text is added to an object."""
 



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