[orca] Attempt to fix timing issue when Tabbing in loading Gecko content
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Attempt to fix timing issue when Tabbing in loading Gecko content
- Date: Thu, 21 May 2015 15:52:02 +0000 (UTC)
commit 1861c86941ba8e17d2321b80ea7039b00b0af44e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu May 21 11:47:38 2015 -0400
Attempt to fix timing issue when Tabbing in loading Gecko content
src/orca/scripts/toolkits/Gecko/script.py | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 5577bcf..07808e5 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -958,8 +958,8 @@ class Script(default.Script):
orca.setLocusOfFocus(event, obj)
return True
- if self.utilities.isLink(obj) \
- and obj.getState().contains(pyatspi.STATE_FOCUSED):
+ state = obj.getState()
+ if self.utilities.isLink(obj) and state.contains(pyatspi.STATE_FOCUSED):
msg = "INFO: Setting locus of focus to focused link %s" % obj
debug.println(debug.LEVEL_INFO, msg)
orca.setLocusOfFocus(event, obj)
@@ -971,13 +971,22 @@ class Script(default.Script):
orca.setLocusOfFocus(event, obj)
return True
- self.setCaretPosition(obj, offset)
- contents = self.getLineContentsAtOffset(obj, offset)
self.updateBraille(obj)
- if not _settingsManager.getSetting('sayAllOnLoad'):
- self.speakContents(contents)
+ if state.contains(pyatspi.STATE_FOCUSABLE):
+ msg = "INFO: Not doing SayAll due to focusable context obj %s" % obj
+ debug.println(debug.LEVEL_INFO, msg)
+ speech.speak(self.speechGenerator.generateSpeech(obj))
+ elif not _settingsManager.getSetting('sayAllOnLoad'):
+ msg = "INFO: Not doing SayAll due to sayAllOnLoad being False"
+ debug.println(debug.LEVEL_INFO, msg)
+ self.speakContents(self.getLineContentsAtOffset(obj, offset))
elif _settingsManager.getSetting('enableSpeech'):
+ msg = "INFO: Doing SayAll"
+ debug.println(debug.LEVEL_INFO, msg)
self.sayAll(None)
+ else:
+ msg = "INFO: Not doing SayAll due to enableSpeech being False"
+ debug.println(debug.LEVEL_INFO, msg)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]