[orca] Prevent double-speaking autocompleted text in Thunderbird
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Prevent double-speaking autocompleted text in Thunderbird
- Date: Fri, 3 Jan 2014 12:53:38 +0000 (UTC)
commit b21ad0667d5c528376f1c20bab1210c31b0a70dc
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Jan 3 07:52:46 2014 -0500
Prevent double-speaking autocompleted text in Thunderbird
src/orca/scripts/apps/Thunderbird/script.py | 1 +
src/orca/scripts/default.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index db39891..3d0a58b 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -226,6 +226,7 @@ class Script(Gecko.Script):
if hasSelection or isSystemEvent:
speech.speak(event.any_data)
self._lastAutoComplete = event.any_data
+ self.pointOfReference['lastAutoComplete'] = hash(obj)
return
Gecko.Script.onTextInserted(self, event)
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 380d39c..44e5e5b 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2630,6 +2630,7 @@ class Script(script.Script):
string = event.any_data
speakThis = False
wasCommand = False
+ wasAutoComplete = False
try:
role = event.source.getRole()
except:
@@ -2648,7 +2649,9 @@ class Script(script.Script):
except:
selections = 0
- wasAutoComplete = role == pyatspi.ROLE_TEXT and selections
+ if selections:
+ wasAutoComplete = role in [pyatspi.ROLE_TEXT, pyatspi.ROLE_ENTRY]
+
if (string == " " and keyString == "space") or string == keyString:
pass
elif wasCommand or wasAutoComplete:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]