[orca] Present accessible name-changed events for frames



commit cf2997e54c0fa6e2078721529d11dacc7376d6a4
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Sep 12 13:43:05 2013 -0400

    Present accessible name-changed events for frames

 src/orca/formatting.py      |    4 +++-
 src/orca/scripts/default.py |    7 ++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 0ae5439..a98446b 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -154,7 +154,7 @@ formatting = {
             'detailedWhereAmI': 'label + placeholderText + readOnly + textRole + textContentWithAttributes + 
anyTextSelection + ' + MNEMONIC + ' + ' + TUTORIAL
             },
         pyatspi.ROLE_FRAME: {
-            'focused': '[]',
+            'focused': 'labelAndName + roleName',
             'unfocused': 'labelAndName + allTextSelection + roleName + unfocusedDialogCount + availability'
             },
         pyatspi.ROLE_HEADING: {
@@ -402,6 +402,8 @@ formatting = {
             'unfocused': BRAILLE_TEXT
             },
         pyatspi.ROLE_FRAME: {
+            'focused':   '[Component(obj,\
+                                     asString(((label + displayedText) or name) + value + roleName + 
alertAndDialogCount))]',
             'unfocused': '[Component(obj,\
                                      asString(((label + displayedText) or name) + value + roleName + 
alertAndDialogCount))]'
             },
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index c1ec808..6a04d2e 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -904,7 +904,12 @@ class Script(script.Script):
             self.displayBrailleMessage(msg, flashTime=settings.brailleFlashTime)
             notification_messages.saveMessage(msg)
 
-        if not self.utilities.isSameObject(obj, orca_state.locusOfFocus):
+        # Normally, we only care about name changes in the current object.
+        # But with the new GtkHeaderBar, we are seeing instances where the
+        # real frame remains the same, but the functional frame changes
+        # e.g. g-c-c going from all settings to a specific panel.
+        if not self.utilities.isSameObject(obj, orca_state.locusOfFocus) \
+           and obj.getRole() != pyatspi.ROLE_FRAME:
             # Present state changes of child widgets of GtkListBox items
             isListBox = lambda x: x and x.getRole() == pyatspi.ROLE_LIST_BOX
             if not pyatspi.findAncestor(obj, isListBox):


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