[orca/gnome-3-12] Filter out some superfluous name-changed events from Gtk+ apps



commit e0e69a1d47109d7b6616214755d229a1ca782063
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Mar 20 14:54:15 2014 -0400

    Filter out some superfluous name-changed events from Gtk+ apps

 src/orca/scripts/toolkits/gtk/script.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index eaeb256..2316cdd 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -75,6 +75,20 @@ class Script(default.Script):
         self.updateBraille(obj)
         speech.speak(self.speechGenerator.generateSpeech(obj, alreadyFocused=True))
 
+    def onNameChanged(self, event):
+        """Callback for object:property-change:accessible-name events."""
+
+        role = event.source.getRole()
+        try:
+            focusRole = orca_state.locusOfFocus.getRole()
+        except:
+            focusRole = None
+
+        if role == pyatspi.ROLE_FRAME and focusRole == pyatspi.ROLE_TABLE_CELL:
+            return
+
+        default.Script.onNameChanged(self, event)
+
     def onFocus(self, event):
         """Callback for focus: accessibility events."""
 


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