orca r3928 - in trunk: . src/orca



Author: richb
Date: Tue May 27 15:49:33 2008
New Revision: 3928
URL: http://svn.gnome.org/viewvc/orca?rev=3928&view=rev

Log:
        * src/orca/orca.py:
          src/orca/mouse_review.py:
          Fix for bug #534383 - Orca mouse review traceback at startup.


Modified:
   trunk/ChangeLog
   trunk/src/orca/mouse_review.py
   trunk/src/orca/orca.py

Modified: trunk/src/orca/mouse_review.py
==============================================================================
--- trunk/src/orca/mouse_review.py	(original)
+++ trunk/src/orca/mouse_review.py	Tue May 27 15:49:33 2008
@@ -198,6 +198,9 @@
         - y: Y coordinate.
         """
         current_element = self._getContextUnderMouse(x, y)
+        if not current_element:
+            return
+
         self._currentMouseOver, self._oldMouseOver = \
             current_element, self._currentMouseOver
 
@@ -283,11 +286,12 @@
             if not app:
                 continue
             script = orca.getScriptForApp(app)
+            if not script:
+                continue
             for frame in app:
                 if not frame:
                     continue
-                acc = script.getComponentAtDesktopCoords(
-                    frame, x, y)
+                acc = script.getComponentAtDesktopCoords(frame, x, y)
                 if acc:
                     try:
                         z_order = self._getZOrder(frame.name)

Modified: trunk/src/orca/orca.py
==============================================================================
--- trunk/src/orca/orca.py	(original)
+++ trunk/src/orca/orca.py	Tue May 27 15:49:33 2008
@@ -157,7 +157,12 @@
 
     Returns a Script instance.
     """
-    return _PRESENTATION_MANAGERS[_currentPresentationManager].getScript(app)
+
+    script = None
+    if _currentPresentationManager >= 0:
+        script = \
+            _PRESENTATION_MANAGERS[_currentPresentationManager].getScript(app)
+    return script
 
 ########################################################################
 #                                                                      #



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