[orca] Remove the skipObjectEvent() checks for focus: events



commit 827d72efc45429850e33a493682ecd710cffa753
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Nov 9 18:31:48 2013 -0500

    Remove the skipObjectEvent() checks for focus: events

 src/orca/script.py                                 |    2 +-
 src/orca/scripts/apps/ekiga/script.py              |   12 ----------
 src/orca/scripts/apps/evolution/script.py          |   12 ----------
 src/orca/scripts/apps/gajim/script.py              |   12 ----------
 src/orca/scripts/apps/gcalctool/script.py          |   12 ----------
 src/orca/scripts/apps/gnome-documents/script.py    |   12 ----------
 src/orca/scripts/apps/gnome-mud/script.py          |   12 ----------
 .../apps/gnome-screensaver-dialog/script.py        |   12 ----------
 .../scripts/apps/gtk-window-decorator/script.py    |   12 ----------
 src/orca/scripts/apps/liferea/script.py            |   12 ----------
 src/orca/scripts/apps/metacity/script.py           |   12 ----------
 src/orca/scripts/apps/nautilus/script.py           |   12 ----------
 .../scripts/apps/notification-daemon/script.py     |   12 ----------
 src/orca/scripts/apps/notify-osd/script.py         |   22 ++-----------------
 src/orca/scripts/apps/pidgin/script.py             |   12 ----------
 src/orca/scripts/apps/planner/script.py            |   12 ----------
 src/orca/scripts/apps/rhythmbox/script.py          |   12 ----------
 src/orca/scripts/apps/soffice/script.py            |   12 ----------
 src/orca/scripts/apps/xfwm4/script.py              |   12 ----------
 19 files changed, 4 insertions(+), 224 deletions(-)
---
diff --git a/src/orca/script.py b/src/orca/script.py
index 9f26306..927fd24 100644
--- a/src/orca/script.py
+++ b/src/orca/script.py
@@ -437,7 +437,7 @@ class Script:
         if not cachedEvent or cachedEvent == event:
             return False
 
-        focus    = ["focus:", "object:state-changed:focused"]
+        focus    = ["object:state-changed:focused"]
         typing   = ["object:text-changed:insert", "object:text-changed:delete"]
         arrowing = ["object:text-caret-moved", "object:text-selection-changed",
                     "object:selection-changed", "object:active-descendant-changed"]
diff --git a/src/orca/scripts/apps/ekiga/script.py b/src/orca/scripts/apps/ekiga/script.py
index 4007ccd..59a07d3 100644
--- a/src/orca/scripts/apps/ekiga/script.py
+++ b/src/orca/scripts/apps/ekiga/script.py
@@ -94,15 +94,3 @@ class Script(default.Script):
             return
 
         default.Script.onValueChanged(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been complete, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
index cbb8991..81e55e6 100644
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -148,15 +148,3 @@ class Script(WebKitGtk.Script):
         voice = self.voices.get(settings.DEFAULT_VOICE)
         text = self.utilities.displayedText(obj)
         self.presentMessage(text, voice=voice)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been complete, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/gajim/script.py b/src/orca/scripts/apps/gajim/script.py
index 99d245a..72ed844 100644
--- a/src/orca/scripts/apps/gajim/script.py
+++ b/src/orca/scripts/apps/gajim/script.py
@@ -108,15 +108,3 @@ class Script(default.Script):
             event.source, pyatspi.ROLE_PAGE_TAB)
 
         default.Script.onWindowActivated(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/gcalctool/script.py b/src/orca/scripts/apps/gcalctool/script.py
index efefdd8..67f8183 100644
--- a/src/orca/scripts/apps/gcalctool/script.py
+++ b/src/orca/scripts/apps/gcalctool/script.py
@@ -92,15 +92,3 @@ class Script(default.Script):
             return
 
         default.Script.onTextInserted(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/gnome-documents/script.py b/src/orca/scripts/apps/gnome-documents/script.py
index 566ff62..89c65d5 100644
--- a/src/orca/scripts/apps/gnome-documents/script.py
+++ b/src/orca/scripts/apps/gnome-documents/script.py
@@ -78,15 +78,3 @@ class Script(default.Script):
             return self.sayAll(None)
 
         default.Script.onNameChanged(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/gnome-mud/script.py b/src/orca/scripts/apps/gnome-mud/script.py
index 5ee4895..038779c 100644
--- a/src/orca/scripts/apps/gnome-mud/script.py
+++ b/src/orca/scripts/apps/gnome-mud/script.py
@@ -174,15 +174,3 @@ class Script(default.Script):
                     speech.speak(message)
         else:
             default.Script.onTextInserted(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/gnome-screensaver-dialog/script.py 
b/src/orca/scripts/apps/gnome-screensaver-dialog/script.py
index 69dc308..56ec54e 100644
--- a/src/orca/scripts/apps/gnome-screensaver-dialog/script.py
+++ b/src/orca/scripts/apps/gnome-screensaver-dialog/script.py
@@ -50,15 +50,3 @@ class Script(default.Script):
                 return
 
         default.Script.onFocusedChanged(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/gtk-window-decorator/script.py 
b/src/orca/scripts/apps/gtk-window-decorator/script.py
index b3d5b01..ef147fb 100644
--- a/src/orca/scripts/apps/gtk-window-decorator/script.py
+++ b/src/orca/scripts/apps/gtk-window-decorator/script.py
@@ -126,15 +126,3 @@ class Script(default.Script):
         #
         if event.source.getRole() != pyatspi.ROLE_STATUS_BAR:
             default.Script.onTextDeleted(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/liferea/script.py b/src/orca/scripts/apps/liferea/script.py
index c1c9b7a..d1b2642 100644
--- a/src/orca/scripts/apps/liferea/script.py
+++ b/src/orca/scripts/apps/liferea/script.py
@@ -149,15 +149,3 @@ class Script(default.Script):
 
         default.Script.locusOfFocusChanged(self, event, 
                                            oldLocusOfFocus, newLocusOfFocus)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/metacity/script.py b/src/orca/scripts/apps/metacity/script.py
index 1b26b71..d22f8fe 100644
--- a/src/orca/scripts/apps/metacity/script.py
+++ b/src/orca/scripts/apps/metacity/script.py
@@ -174,15 +174,3 @@ class Script(default.Script):
         #
         if event.source.getRole() != pyatspi.ROLE_STATUS_BAR:
             default.Script.onCaretMoved(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/nautilus/script.py b/src/orca/scripts/apps/nautilus/script.py
index 354f2a2..166948b 100644
--- a/src/orca/scripts/apps/nautilus/script.py
+++ b/src/orca/scripts/apps/nautilus/script.py
@@ -43,15 +43,3 @@ class Script(default.Script):
         """
 
         default.Script.__init__(self, app)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been complete, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/notification-daemon/script.py 
b/src/orca/scripts/apps/notification-daemon/script.py
index ea1a9b3..102385d 100644
--- a/src/orca/scripts/apps/notification-daemon/script.py
+++ b/src/orca/scripts/apps/notification-daemon/script.py
@@ -60,15 +60,3 @@ class Script(default.Script):
         texts = [self.utilities.displayedText(acc) for acc in a]
         text = '%s %s' % (messages.NOTIFICATION, ' '.join(texts))
         speech.speak(text, None, True)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/notify-osd/script.py b/src/orca/scripts/apps/notify-osd/script.py
index dc529f8..f719dce 100644
--- a/src/orca/scripts/apps/notify-osd/script.py
+++ b/src/orca/scripts/apps/notify-osd/script.py
@@ -38,7 +38,7 @@ import orca.notification_messages as notification_messages
 ########################################################################
 
 class Script(default.Script):
-    def onValueChange(self, event):
+    def onValueChanged(self, event):
         try:
             ivalue = event.source.queryValue()
             value = int(ivalue.currentValue)
@@ -50,13 +50,9 @@ class Script(default.Script):
             self.displayBrailleMessage("%s" % value,
                                        flashTime=settings.brailleFlashTime)
 
-    def onNameChange(self, event):
-        """Called whenever an object's accessible name changes in the notify-osd
-        application.
+    def onNameChanged(self, event):
+        """Callback for object:property-change:accessible-name events."""
 
-        Arguments:
-        - event: the Event.
-        """
         try:
             ivalue = event.source.queryValue()
             value = ivalue.currentValue
@@ -82,15 +78,3 @@ class Script(default.Script):
         speech.speak(utterances, None, True)
         self.displayBrailleMessage(message, flashTime=settings.brailleFlashTime)
         notification_messages.saveMessage(message)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/pidgin/script.py b/src/orca/scripts/apps/pidgin/script.py
index 9b9ed94..f75e6ac 100644
--- a/src/orca/scripts/apps/pidgin/script.py
+++ b/src/orca/scripts/apps/pidgin/script.py
@@ -212,15 +212,3 @@ class Script(default.Script):
             return
             
         default.Script.onExpandedChanged(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/planner/script.py b/src/orca/scripts/apps/planner/script.py
index 2ff1304..fd7f661 100644
--- a/src/orca/scripts/apps/planner/script.py
+++ b/src/orca/scripts/apps/planner/script.py
@@ -51,15 +51,3 @@ class Script(default.Script):
 
     def getSpeechGenerator(self):
         return SpeechGenerator(self)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/rhythmbox/script.py b/src/orca/scripts/apps/rhythmbox/script.py
index bde083e..c451663 100644
--- a/src/orca/scripts/apps/rhythmbox/script.py
+++ b/src/orca/scripts/apps/rhythmbox/script.py
@@ -43,15 +43,3 @@ class Script(default.Script):
     def getFormatting(self):
         """Returns the formatting strings for this script."""
         return Formatting(self)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been complete, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 3b0b397..ab68491 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -1010,15 +1010,3 @@ class Script(default.Script):
             textLine[0] = self.utilities.displayedText(obj)
 
         return textLine
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)
diff --git a/src/orca/scripts/apps/xfwm4/script.py b/src/orca/scripts/apps/xfwm4/script.py
index d9d96e8..cf81449 100644
--- a/src/orca/scripts/apps/xfwm4/script.py
+++ b/src/orca/scripts/apps/xfwm4/script.py
@@ -71,15 +71,3 @@ class Script(default.Script):
 
         if event.source.getRole() != pyatspi.ROLE_LABEL:
             default.Script.onTextDeleted(self, event)
-
-    def skipObjectEvent(self, event):
-        # NOTE: This is here temporarily as part of the preparation for the
-        # deprecation/removal of accessible "focus:" events. Once the change
-        # has been completed, this method should be removed from this script.
-        if event.type == "focus:":
-            return True
-
-        if event.type == "object:state-changed:focused":
-            return False
-
-        return default.Script.skipObjectEvent(self, event)


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