[orca/gnome-3-20] Hack around GNOME Shell's broken text interface for word echo
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-20] Hack around GNOME Shell's broken text interface for word echo
- Date: Mon, 25 Apr 2016 21:55:27 +0000 (UTC)
commit 836bf2edb97c082ef49b9d0f69d2833dfd84ea1d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Apr 25 17:53:31 2016 -0400
Hack around GNOME Shell's broken text interface for word echo
src/orca/scripts/apps/gnome-shell/script.py | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/gnome-shell/script.py b/src/orca/scripts/apps/gnome-shell/script.py
index 1720148..dbabd9f 100644
--- a/src/orca/scripts/apps/gnome-shell/script.py
+++ b/src/orca/scripts/apps/gnome-shell/script.py
@@ -193,3 +193,20 @@ class Script(clutter.Script):
self._activeDialogLabels[hash(label)] = label.name
clutter.Script.onFocusedChanged(self, event)
+
+ def echoPreviousWord(self, obj, offset=None):
+ try:
+ text = obj.queryText()
+ except NotImplementedError:
+ return False
+
+ if not offset:
+ if text.caretOffset == -1:
+ offset = text.characterCount - 1
+ else:
+ offset = text.caretOffset - 1
+
+ if offset == 0:
+ return False
+
+ return super().echoPreviousWord(obj, offset)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]