[orca] Prevent Live Region commands from kicking in unexpectedly
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Prevent Live Region commands from kicking in unexpectedly
- Date: Wed, 3 Jun 2015 23:15:44 +0000 (UTC)
commit 19249136024a67a85f748ec6c706607af98ba93c
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jun 3 19:14:38 2015 -0400
Prevent Live Region commands from kicking in unexpectedly
src/orca/liveregions.py | 6 ++++++
src/orca/scripts/toolkits/Gecko/script.py | 12 ++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/liveregions.py b/src/orca/liveregions.py
index e26e698..dbc84ab 100644
--- a/src/orca/liveregions.py
+++ b/src/orca/liveregions.py
@@ -78,6 +78,12 @@ class LiveRegionManager:
self.inputEventHandlers = self._getInputEventHandlers()
self.keyBindings = self._getKeyBindings()
+ # This is temporary.
+ self.functions = [self.advancePoliteness,
+ self.setLivePolitenessOff,
+ self.toggleMonitoring,
+ self.reviewLiveAnnouncement]
+
# Message cache. Used to store up to 9 previous messages so user can
# review if desired.
self.msg_cache = []
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 57ab674..c3879ee 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -649,6 +649,12 @@ class Script(default.Script):
self._lastCommandWasCaretNav = False
self._lastCommandWasStructNav = consumes
self._lastCommandWasMouseButton = False
+ elif handler and handler.function in self.liveRegionManager.functions:
+ # This is temporary.
+ consumes = self.useStructuralNavigationModel()
+ self._lastCommandWasCaretNav = False
+ self._lastCommandWasStructNav = consumes
+ self._lastCommandWasMouseButton = False
else:
consumes = handler != None
self._lastCommandWasCaretNav = False
@@ -666,6 +672,12 @@ class Script(default.Script):
self._lastCommandWasCaretNav = False
self._lastCommandWasStructNav = consumes
self._lastCommandWasMouseButton = False
+ elif handler and handler.function in self.liveRegionManager.functions:
+ # This is temporary.
+ consumes = self.useStructuralNavigationModel()
+ self._lastCommandWasCaretNav = False
+ self._lastCommandWasStructNav = consumes
+ self._lastCommandWasMouseButton = False
else:
consumes = handler != None
self._lastCommandWasCaretNav = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]