[orca] Recover gracefully when the Calc inputline toolbar is hidden



commit 9d603a514fa6683eb8b4d162df40fbe171c6126a
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jan 10 09:14:46 2014 -0500

    Recover gracefully when the Calc inputline toolbar is hidden

 src/orca/scripts/apps/soffice/script_utilities.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/script_utilities.py 
b/src/orca/scripts/apps/soffice/script_utilities.py
index d038886..2d02a30 100644
--- a/src/orca/scripts/apps/soffice/script_utilities.py
+++ b/src/orca/scripts/apps/soffice/script_utilities.py
@@ -326,6 +326,10 @@ class Utilities(script_utilities.Utilities):
                 toolbar = child
                 break
 
+        if not toolbar:
+            debug.println(debug.LEVEL_INFO, "Calc inputline toolbar not found.")
+            return
+
         isParagraph = lambda x: x and x.getRole() == pyatspi.ROLE_PARAGRAPH
         allParagraphs = pyatspi.findAllDescendants(toolbar, isParagraph)
         if len(allParagraphs) == 1:


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