[orca] More debugging output to track down another bug I cannot reproduce
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] More debugging output to track down another bug I cannot reproduce
- Date: Sun, 22 Nov 2015 17:30:57 +0000 (UTC)
commit 9e06d4c26bc64a71d72cec9f28ef8005c732f982
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Nov 22 12:28:31 2015 -0500
More debugging output to track down another bug I cannot reproduce
src/orca/scripts/apps/Thunderbird/script.py | 8 +++++++-
src/orca/scripts/default.py | 18 +++++++++++++++++-
src/orca/scripts/web/script.py | 17 ++++++++++++-----
3 files changed, 36 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index 8ebcb64..2f5faeb 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -362,9 +362,15 @@ class Script(Gecko.Script):
self.utilities.setCaretPosition(obj, offset)
self.updateBraille(obj)
if not _settingsManager.getSetting('sayAllOnLoad'):
+ msg = "THUNDERBIRD: SayAllOnLoad is False. Presenting line."
+ debug.println(debug.LEVEL_INFO, msg)
contents = self.utilities.getLineContentsAtOffset(obj, offset)
self.speakContents(contents)
- elif _settingsManager.getSetting('enableSpeech'):
+ return
+
+ if _settingsManager.getSetting('enableSpeech'):
+ msg = "THUNDERBIRD: SayAllOnLoad is True and speech is enabled"
+ debug.println(debug.LEVEL_INFO, msg)
self.sayAll(None)
def sayCharacter(self, obj):
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index ce03556..a921896 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -3070,7 +3070,19 @@ class Script(script.Script):
text.setSelection(0, context.currentOffset, context.currentOffset)
def inSayAll(self):
- return self._inSayAll or self._sayAllIsInterrupted
+ if self._inSayAll:
+ msg = "DEFAULT: In SayAll"
+ debug.println(debug.LEVEL_INFO, msg)
+ return True
+
+ if self._sayAllIsInterrupted:
+ msg = "DEFAULT: SayAll is interrupted"
+ debug.println(debug.LEVEL_INFO, msg)
+ return True
+
+ msg = "DEFAULT: Not in SayAll"
+ debug.println(debug.LEVEL_INFO, msg)
+ return False
def echoPreviousSentence(self, obj):
"""Speaks the sentence prior to the caret, as long as there is
@@ -3707,6 +3719,10 @@ class Script(script.Script):
self._inSayAll = False
self._sayAllContexts = []
+ msg = "DEFAULT: textLines complete. Verifying SayAll status"
+ debug.println(debug.LEVEL_INFO, msg)
+ self.inSayAll()
+
def getTextLineAtCaret(self, obj, offset=None, startOffset=None, endOffset=None):
"""To-be-removed. Returns the string, caretOffset, startOffset."""
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index cd8c178..7a718f6 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -499,6 +499,8 @@ class Script(default.Script):
"""Creates a generator that can be used to iterate document content."""
if not self.utilities.inDocumentContent():
+ msg = "WEB: textLines called for non-document content %s" % obj
+ debug.println(debug.LEVEL_INFO, msg)
super().textLines(obj, offset)
return
@@ -549,6 +551,10 @@ class Script(default.Script):
self._sayAllContents = []
self._sayAllContexts = []
+ msg = "WEB: textLines complete. Verifying SayAll status"
+ debug.println(debug.LEVEL_INFO, msg)
+ self.inSayAll()
+
def presentFindResults(self, obj, offset):
"""Updates the context and presents the find results if appropriate."""
@@ -585,13 +591,14 @@ class Script(default.Script):
"""
if not self.utilities.inDocumentContent():
+ msg = "WEB: SayAll called for non-document content %s" % obj
+ debug.println(debug.LEVEL_INFO, msg)
return super().sayAll(inputEvent, obj, offset)
- else:
- obj = obj or orca_state.locusOfFocus
- speech.sayAll(self.textLines(obj, offset),
- self.__sayAllProgressCallback)
-
+ obj = obj or orca_state.locusOfFocus
+ msg = "WEB: SayAll called for document content %s" % obj
+ debug.println(debug.LEVEL_INFO, msg)
+ speech.sayAll(self.textLines(obj, offset), self.__sayAllProgressCallback)
return True
def _rewindSayAll(self, context, minCharCount=10):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]