[orca] Fix a couple of issues related to composing HTML messages in Thunderbird



commit a27c9fe3849807d38c424efe4949c4d4b2fee175
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Apr 19 15:22:10 2014 -0400

    Fix a couple of issues related to composing HTML messages in Thunderbird

 src/orca/scripts/apps/Thunderbird/script.py |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index 6195c9f..c98ce9c 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -203,6 +203,11 @@ class Script(Gecko.Script):
         if event.source == self.spellcheck.getSuggestionsList():
             return
 
+        parent = event.source.parent
+        if parent and parent.getRole() == pyatspi.ROLE_COMBO_BOX \
+           and not parent.getState().contains(pyatspi.STATE_FOCUSED):
+            return
+
         Gecko.Script.onSelectionChanged(self, event)
 
     def onSensitiveChanged(self, event):
@@ -400,16 +405,16 @@ class Script(Gecko.Script):
     def isEditableMessage(self, obj):
         """Returns True if this is a editable message."""
 
-        # For now, look specifically to see if this object is the
-        # document frame. If it's not, we cannot be sure how complex
-        # this message is and should let the Gecko code kick in.
-        #
-        if obj \
-           and obj.getRole() == pyatspi.ROLE_DOCUMENT_FRAME \
-           and obj.getState().contains(pyatspi.STATE_EDITABLE):
-            return True
+        if not obj:
+            return False
+
+        if not obj.getState().contains(pyatspi.STATE_EDITABLE):
+            return False
+
+        if self.isNonHTMLEntry(obj):
+            return False
 
-        return False
+        return True
 
     def useCaretNavigationModel(self, keyboardEvent):
         """Returns True if we should do our own caret navigation."""


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