[orca] Mouse Review: Check if we have Wnck in activate()



commit 892decdf28fd772ea1fd221538c4df35b9399e34
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Jun 28 11:02:48 2021 +0200

    Mouse Review: Check if we have Wnck in activate()
    
    Orca's loadUserSettings calls the Mouse Reviewer's activation method.
    That method should check if we have Wnck and return early if we don't.

 src/orca/mouse_review.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index 967f5de25..c2c548afb 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -365,6 +365,11 @@ class MouseReviewer:
     def activate(self):
         """Activates mouse review."""
 
+        if not _mouseReviewCapable:
+            msg = "MOUSE REVIEW ERROR: Wnck is not available"
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return
+
         # Set up the initial object as the one with the focus to avoid
         # presenting irrelevant info the first time.
         obj = orca_state.locusOfFocus


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