[orca/orca-xdesktop] Fix for bug 654111 - Need to map 'gtk' to GAIL toolkit script



commit ff96d3625848a3e2886f46afdf11f8d676851011
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Wed Jul 6 13:51:18 2011 -0400

    Fix for bug 654111 - Need to map 'gtk' to GAIL toolkit script

 src/orca/script_manager.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/script_manager.py b/src/orca/script_manager.py
index d10d7af..a0ddbb1 100644
--- a/src/orca/script_manager.py
+++ b/src/orca/script_manager.py
@@ -63,6 +63,8 @@ class ScriptManager:
              'gnome-help':       'yelp',
              'Nereid':           'Banshee',
              'vte':              'gnome-terminal'}
+        self._toolkitNames = \
+            {'gtk':              'GAIL'}
 
         self.setActiveScript(None, "__init__")
 
@@ -127,6 +129,14 @@ class ScriptManager:
         if not (app and name):
             return None
 
+        altNames = self._toolkitNames.keys()
+        names = filter(lambda n: n.lower() == name.lower(), altNames)
+        if names:
+            newName = self._toolkitNames.get(names[0])
+            debug.println(debug.LEVEL_FINEST,
+                          "mapped %s to %s" % (name, newName))
+            name = newName
+
         script = None
         for package in self._scriptPackages:
             moduleName = '.'.join((package, name))



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