orca r3853 - in branches/gnome-2-22: . src/orca/scripts



Author: richb
Date: Mon Apr 28 15:29:05 2008
New Revision: 3853
URL: http://svn.gnome.org/viewvc/orca?rev=3853&view=rev

Log:
        * src/orca/scripts/metacity.py:
          Fixed bug #522797 - Orca should not speak false "inaccessible"
          messages when switching applications


Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/src/orca/scripts/metacity.py

Modified: branches/gnome-2-22/src/orca/scripts/metacity.py
==============================================================================
--- branches/gnome-2-22/src/orca/scripts/metacity.py	(original)
+++ branches/gnome-2-22/src/orca/scripts/metacity.py	Mon Apr 28 15:29:05 2008
@@ -67,6 +67,16 @@
         #
         speech.stop()
 
+        # If the window was iconified, then obj.name will be surronded by
+        # brackets. If this is the case, remove them before comparing the
+        # name against the various window names. See bug #522797 for more
+        # details.
+        #
+        objName = obj.name
+        if objName and len(objName):
+            if objName[0] == "[" and objName[-1] == "]":
+                objName = objName[1:-1]
+
         # Do we know about this window?  Traverse through our list of apps
         # and go through the toplevel windows in each to see if we know
         # about this one.  If we do, it's accessible.  If we don't, it is
@@ -79,11 +89,11 @@
                 win = app.getChildAtIndex(i)
                 if win is None:
                     print "app error " + app.name
-                elif win.name == obj.name:
+                elif win.name == objName:
                     found = True
                 i = i + 1
 
-        text = obj.name
+        text = objName
 
         # Translators: the "Workspace " and "Desk " strings are
         # the prefix of what metacity shows when you press



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