[orca] Add debugging



commit d0817627f0232379436a53acf8b0195be3b4d18e
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Jul 8 13:58:25 2019 -0400

    Add debugging

 src/orca/mouse_review.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index ade98d3d8..d91032d40 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -82,7 +82,14 @@ class _StringContext:
     def present(self):
         """Presents this context to the user."""
 
-        if not (self._script and self._string):
+        if not self._script:
+            msg = "MOUSE REVIEW: Not presenting due to lack of script"
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return False
+
+        if not self._string:
+            msg = "MOUSE REVIEW: Not presenting due to lack of string"
+            debug.println(debug.LEVEL_INFO, msg, True)
             return False
 
         voice = self._script.speechGenerator.voice(string=self._string)
@@ -195,6 +202,8 @@ class _ItemContext:
         """Presents this context to the user."""
 
         if self == prior or self._treatAsDuplicate(prior):
+            msg = "MOUSE REVIEW: Not presenting due to no change"
+            debug.println(debug.LEVEL_INFO, msg, True)
             return False
 
         interrupt = self._obj and self._obj != prior._obj \


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