[orca] Load/unload mouse reviewer when settings are reloaded
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Load/unload mouse reviewer when settings are reloaded
- Date: Tue, 27 Mar 2018 15:40:16 +0000 (UTC)
commit 056805731a9167eed664339cf5b02de77ba32f03
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Mar 27 11:39:13 2018 -0400
Load/unload mouse reviewer when settings are reloaded
src/orca/mouse_review.py | 6 +++++-
src/orca/orca.py | 6 ++++++
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/mouse_review.py b/src/orca/mouse_review.py
index dc81595..2c66698 100644
--- a/src/orca/mouse_review.py
+++ b/src/orca/mouse_review.py
@@ -291,7 +291,11 @@ class MouseReviewer:
return None
app = None
- pid = window.get_application().get_pid()
+ windowApp = window.get_application()
+ if not windowApp:
+ return None
+
+ pid = windowApp.get_pid()
for a in pyatspi.Registry.getDesktop(0):
if a.get_process_id() == pid:
app = a
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 363c4f8..6ab3922 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -70,6 +70,7 @@ from . import event_manager
from . import keybindings
from . import logger
from . import messages
+from . import mouse_review
from . import notification_messages
from . import orca_state
from . import orca_platform
@@ -377,6 +378,11 @@ def loadUserSettings(script=None, inputEvent=None, skipReloadMessage=False):
msg = 'ORCA: Could not initialize connection to braille.'
debug.println(debug.LEVEL_WARNING, msg, True)
+ if _settingsManager.getSetting('enableMouseReview'):
+ mouse_review.reviewer.activate()
+ else:
+ mouse_review.reviewer.deactivate()
+
if _settingsManager.getSetting('enableSound'):
player.init()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]