[orca] Additional work on multi/embedded toolkit support
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Additional work on multi/embedded toolkit support
- Date: Thu, 1 Dec 2011 19:41:39 +0000 (UTC)
commit b208388b297d1b1dcbac3c5d96ce3db17042e33e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Dec 1 20:40:47 2011 +0100
Additional work on multi/embedded toolkit support
src/orca/script_manager.py | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/script_manager.py b/src/orca/script_manager.py
index 20da93e..a79674c 100644
--- a/src/orca/script_manager.py
+++ b/src/orca/script_manager.py
@@ -221,11 +221,13 @@ class ScriptManager:
objToolkit = self._toolkitForObject(obj)
if objToolkit:
- toolkitScript = self.toolkitScripts.get(app)
+ toolkitScripts = self.toolkitScripts.get(app, {})
+ toolkitScript = toolkitScripts.get(objToolkit)
if not toolkitScript:
toolkitScript = self._createScript(app, obj)
- self.toolkitScripts[app] = toolkitScript
+ toolkitScripts[objToolkit] = toolkitScript
_eventManager.registerListeners(toolkitScript)
+ self.toolkitScripts[app] = toolkitScripts
if not app:
appScript = self.getDefaultScript()
@@ -287,11 +289,12 @@ class ScriptManager:
del appScript
try:
- toolkitScript = self.toolkitScripts.pop(app)
+ toolkitScripts = self.toolkitScripts.pop(app)
except KeyError:
pass
else:
- _eventManager.deregisterListeners(toolkitScript)
- del toolkitScript
+ for toolkitScript in toolkitScripts:
+ _eventManager.deregisterListeners(toolkitScript)
+ del toolkitScript
del app
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]