[orca] Fix for bug 680228 - In Thunderbird 14.0 e-mail address auto completion results are not spoken



commit 34e4b8c1a6204af8b24ea2365f6130b1fe3527b0
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Oct 15 11:57:51 2012 -0400

    Fix for bug 680228 - In Thunderbird 14.0 e-mail address auto completion results are not spoken

 src/orca/scripts/apps/Thunderbird/script.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index 0a6cbef..62d4525 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -485,7 +485,16 @@ class Script(Gecko.Script):
                 default.Script.onTextInserted(self, event)
                 return
 
-            if event.type.endswith("system") and event.any_data:
+            # Mozilla cannot seem to get their ":system" suffix right
+            # to save their lives, so we'll add yet another sad hack.
+            try:
+                text = event.source.queryText()
+            except:
+                hasSelection = False
+            else:
+                hasSelection = text.getNSelections() > 0
+
+            if (hasSelection or event.type.endswith("system")) and event.any_data:
                 # The autocompleted address may start with the name,
                 # or it might start with the text typed by the user
                 # followed by ">>" followed by the address. Therefore



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]