[orca] Fix for bgo#619648 - Orca doesn't speak list bullets and numbers when they are automatically inserte
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bgo#619648 - Orca doesn't speak list bullets and numbers when they are automatically inserte
- Date: Sun, 30 May 2010 21:59:29 +0000 (UTC)
commit a60e9deb161aa5b95c845c583379b21c26204657
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Sun May 30 17:58:13 2010 -0400
Fix for bgo#619648 - Orca doesn't speak list bullets and numbers when they are automatically inserted by OOo Writer
src/orca/scripts/apps/soffice/script.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 6011606..37d97c8 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -1726,6 +1726,21 @@ class Script(default.Script):
orca_state.locusOfFocus.parent, event.source):
return
+ # Auto-inserted bullets and numbers are presented in braille, but not
+ # spoken. So we'll speak them before sending this event off to the
+ # default script.
+ #
+ if isinstance(orca_state.lastInputEvent, input_event.KeyboardEvent) \
+ and orca_state.lastNonModifierKeyEvent \
+ and orca_state.lastNonModifierKeyEvent.event_string == "Return" \
+ and event.source.getRole() == pyatspi.ROLE_PARAGRAPH:
+ try:
+ charCount = event.source.queryText().characterCount
+ except:
+ charCount = 0
+ if charCount:
+ speech.speak(self.speechGenerator.generateSpeech(event.source))
+
default.Script.onFocus(self, event)
def onActiveDescendantChanged(self, event):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]