[orca] Make sanity checking when getting scripts optional
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Make sanity checking when getting scripts optional
- Date: Sat, 25 Feb 2017 14:23:49 +0000 (UTC)
commit 5835fca530345a6375756fe66329dfaff38f3f32
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Feb 25 09:18:59 2017 -0500
Make sanity checking when getting scripts optional
Apparently fixing the bogus-multiple accessible-application instances
had the unintended side effect of making certain apps less responsive.
We need to try to figure out the magic combination to prevent double-
speaking without this side effect. NOTE: This particular change does not
change the current behavior or fix; it merely makes it possible to turn
checking off, which will be done on a trial-and-error basis in subsequent
commits.
src/orca/event_manager.py | 5 +++--
src/orca/script_manager.py | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 5bc9dcf..bfb4687 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -540,9 +540,10 @@ class EventManager:
msg = 'WARNING: Exception when getting script for event.'
debug.println(debug.LEVEL_WARNING, msg, True)
else:
- msg = 'EVENT MANAGER: Getting script for %s' % app
+ check = True
+ msg = 'EVENT MANAGER: Getting script for %s (check: %s)' % (app, check)
debug.println(debug.LEVEL_INFO, msg, True)
- script = _scriptManager.getScript(app, event.source)
+ script = _scriptManager.getScript(app, event.source, sanityCheck=check)
msg = 'EVENT MANAGER: Script is %s' % script
debug.println(debug.LEVEL_INFO, msg, True)
diff --git a/src/orca/script_manager.py b/src/orca/script_manager.py
index 631e760..f0f8ea6 100644
--- a/src/orca/script_manager.py
+++ b/src/orca/script_manager.py
@@ -240,7 +240,7 @@ class ScriptManager:
debug.println(debug.LEVEL_INFO, msg, True)
return script
- def getScript(self, app, obj=None):
+ def getScript(self, app, obj=None, sanityCheck=False):
"""Get a script for an app (and make it if necessary). This is used
instead of a simple calls to Script's constructor.
@@ -302,7 +302,7 @@ class ScriptManager:
and not issubclass(appScript.__class__, toolkitScript.__class__):
return toolkitScript
- if app:
+ if app and sanityCheck:
appScript = self.sanityCheckScript(appScript)
return appScript
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]