[orca] Have more scripts ignore focus: events in favor of object:state-changed:focused
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Have more scripts ignore focus: events in favor of object:state-changed:focused
- Date: Mon, 4 Nov 2013 12:52:39 +0000 (UTC)
commit 96ed0cc573eb0e21099558c6b0261cf97e99c335
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Nov 4 07:51:43 2013 -0500
Have more scripts ignore focus: events in favor of object:state-changed:focused
src/orca/scripts/apps/gajim/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 ++++++++++++
.../scripts/apps/notification-daemon/script.py | 12 +++++++++++-
src/orca/scripts/apps/notify-osd/script.py | 11 +++++++++++
src/orca/scripts/apps/pidgin/script.py | 11 +++++++++++
src/orca/scripts/apps/planner/script.py | 12 ++++++++++++
src/orca/scripts/apps/xfwm4/script.py | 12 ++++++++++++
12 files changed, 141 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/apps/gajim/script.py b/src/orca/scripts/apps/gajim/script.py
index 72ed844..99d245a 100644
--- a/src/orca/scripts/apps/gajim/script.py
+++ b/src/orca/scripts/apps/gajim/script.py
@@ -108,3 +108,15 @@ 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/gnome-documents/script.py b/src/orca/scripts/apps/gnome-documents/script.py
index 89c65d5..566ff62 100644
--- a/src/orca/scripts/apps/gnome-documents/script.py
+++ b/src/orca/scripts/apps/gnome-documents/script.py
@@ -78,3 +78,15 @@ 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 038779c..5ee4895 100644
--- a/src/orca/scripts/apps/gnome-mud/script.py
+++ b/src/orca/scripts/apps/gnome-mud/script.py
@@ -174,3 +174,15 @@ 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 5adc724..8bee44d 100644
--- a/src/orca/scripts/apps/gnome-screensaver-dialog/script.py
+++ b/src/orca/scripts/apps/gnome-screensaver-dialog/script.py
@@ -53,3 +53,15 @@ class Script(default.Script):
speech.speak(child.name)
else:
default.Script.onStateChanged(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 ef147fb..b3d5b01 100644
--- a/src/orca/scripts/apps/gtk-window-decorator/script.py
+++ b/src/orca/scripts/apps/gtk-window-decorator/script.py
@@ -126,3 +126,15 @@ 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 d1b2642..c1c9b7a 100644
--- a/src/orca/scripts/apps/liferea/script.py
+++ b/src/orca/scripts/apps/liferea/script.py
@@ -149,3 +149,15 @@ 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 3d3f493..171213c 100644
--- a/src/orca/scripts/apps/metacity/script.py
+++ b/src/orca/scripts/apps/metacity/script.py
@@ -181,3 +181,15 @@ 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/notification-daemon/script.py
b/src/orca/scripts/apps/notification-daemon/script.py
index d9a7240..ea1a9b3 100644
--- a/src/orca/scripts/apps/notification-daemon/script.py
+++ b/src/orca/scripts/apps/notification-daemon/script.py
@@ -57,8 +57,18 @@ class Script(default.Script):
- event: the Event.
"""
a = self.utilities.descendantsWithRole(event.source, pyatspi.ROLE_LABEL)
- print(a)
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 7a168d3..dc529f8 100644
--- a/src/orca/scripts/apps/notify-osd/script.py
+++ b/src/orca/scripts/apps/notify-osd/script.py
@@ -83,3 +83,14 @@ class Script(default.Script):
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 bde1859..c78d615 100644
--- a/src/orca/scripts/apps/pidgin/script.py
+++ b/src/orca/scripts/apps/pidgin/script.py
@@ -221,3 +221,14 @@ class Script(default.Script):
default.Script.visualAppearanceChanged(self, event, obj)
+ 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 fd7f661..2ff1304 100644
--- a/src/orca/scripts/apps/planner/script.py
+++ b/src/orca/scripts/apps/planner/script.py
@@ -51,3 +51,15 @@ 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/xfwm4/script.py b/src/orca/scripts/apps/xfwm4/script.py
index cf81449..d9d96e8 100644
--- a/src/orca/scripts/apps/xfwm4/script.py
+++ b/src/orca/scripts/apps/xfwm4/script.py
@@ -71,3 +71,15 @@ 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]