[orca] Use Orca's web support to say word contents for editable messages in Thunderbird
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Use Orca's web support to say word contents for editable messages in Thunderbird
- Date: Thu, 15 Oct 2015 16:37:41 +0000 (UTC)
commit 9d58924f9108481f2c33309e4344d12e8ee8919e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Oct 15 12:25:29 2015 -0400
Use Orca's web support to say word contents for editable messages in Thunderbird
Because Orca's default support doesn't have all the hackarounds and
sanity checks needed to present Gecko text correctly.
src/orca/scripts/apps/Thunderbird/script.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index 332ebed..8ebcb64 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -378,6 +378,19 @@ class Script(Gecko.Script):
Gecko.Script.sayCharacter(self, obj)
+ def sayWord(self, obj):
+ """Speaks the word at the current caret position."""
+
+ contextObj, offset = self.utilities.getCaretContext(documentFrame=None)
+ if contextObj != obj:
+ Gecko.Script.sayWord(self, obj)
+ return
+
+ wordContents = self.utilities.getWordContentsAtOffset(obj, offset)
+ textObj, startOffset, endOffset, word = wordContents[0]
+ self.speakMisspelledIndicator(textObj, startOffset)
+ self.speakContents(wordContents)
+
def toggleFlatReviewMode(self, inputEvent=None):
"""Toggles between flat review mode and focus tracking mode."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]