[orca] Include SayAllContext in debug log
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Include SayAllContext in debug log
- Date: Thu, 28 Jan 2021 11:50:18 +0000 (UTC)
commit 5584d3547f969d262fbc2a7a399ff4e6351e4cc2
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Jan 28 12:45:11 2021 +0100
Include SayAllContext in debug log
src/orca/scripts/default.py | 2 ++
src/orca/scripts/web/script.py | 2 ++
src/orca/speechserver.py | 4 ++++
3 files changed, 8 insertions(+)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index fb27b88bd..5f76af466 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -3692,6 +3692,8 @@ class Script(script.Script):
context = speechserver.SayAllContext(
obj, lineString, startOffset, endOffset)
+ msg = "DEFAULT %s" % context
+ debug.println(debug.LEVEL_INFO, msg, True)
self._sayAllContexts.append(context)
eventsynthesizer.scrollIntoView(obj, startOffset, endOffset)
yield [context, voice]
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index f9986f471..a2630de43 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -648,6 +648,8 @@ class Script(default.Script):
for i, element in enumerate(elements):
context = speechserver.SayAllContext(
obj, element, startOffset, endOffset)
+ msg = "WEB %s" % context
+ debug.println(debug.LEVEL_INFO, msg, True)
self._sayAllContexts.append(context)
eventsynthesizer.scrollIntoView(obj, startOffset, endOffset)
yield [context, voices[i]]
diff --git a/src/orca/speechserver.py b/src/orca/speechserver.py
index 128fbc65f..ee9207612 100644
--- a/src/orca/speechserver.py
+++ b/src/orca/speechserver.py
@@ -86,6 +86,10 @@ class SayAllContext:
self.currentOffset = startOffset
self.currentEndOffset = None
+ def __str__(self):
+ return "SAY ALL: %s '%s' (%i-%i, current: %i)" % \
+ (self.obj, self.utterance, self.startOffset, self.endOffset, self.currentOffset)
+
class SpeechServer(object):
"""Provides speech server abstraction."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]