[orca] 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] Hack around GNOME Shell's broken text interface for word echo
- Date: Mon, 25 Apr 2016 21:55:44 +0000 (UTC)
commit 5687b44796aa448d456e8d7ef84eb6b05f526b50
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]