[orca] Present expandable and expanded states and state changes for menu items



commit 7b788aa49d0807ed92d5e8efc078621c88c0ed26
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Sep 14 13:16:29 2013 -0400

    Present expandable and expanded states and state changes for menu items

 src/orca/formatting.py      |    8 ++++----
 src/orca/scripts/default.py |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index a98446b..9d31904 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -195,8 +195,8 @@ formatting = {
             'basicWhereAmI': '(ancestors or parentRoleName) + labelAndName + roleName +  positionInList + ' 
+ MNEMONIC
             },
         pyatspi.ROLE_MENU_ITEM: {
-            'focused': '[]',
-            'unfocused': 'labelAndName + menuItemCheckedState + availability + ' + MNEMONIC + ' + 
accelerator + positionInList',
+            'focused': 'expandableState',
+            'unfocused': 'labelAndName + menuItemCheckedState + expandableState + availability + ' + 
MNEMONIC + ' + accelerator + positionInList',
             'basicWhereAmI': 'ancestors + labelAndName + accelerator + positionInList + ' + MNEMONIC
             },
         pyatspi.ROLE_NOTIFICATION: {
@@ -455,7 +455,7 @@ formatting = {
         #pyatspi.ROLE_MENU_BAR: 'default'
         pyatspi.ROLE_MENU_ITEM: {
             'unfocused': '[Component(obj,\
-                                     asString(label + displayedText + availability) + asString(accelerator),\
+                                     asString(label + displayedText + expandableState + availability) + 
asString(accelerator),\
                                      indicator=asString(menuItemCheckedState))]'
             },
         #pyatspi.ROLE_OPTION_PANE: 'default'
@@ -592,7 +592,7 @@ if settings.useExperimentalSpeechProsody:
     formatting['speech'][pyatspi.ROLE_MENU]['unfocused'] = 'labelAndName + allTextSelection + roleName + 
availability + ' + MNEMONIC + ' + accelerator + pause + positionInList'
     formatting['speech'][pyatspi.ROLE_MENU]['basicWhereAmI'] = \
         '(ancestors or parentRoleName) + pause + labelAndName + roleName + pause +  positionInList + ' + 
MNEMONIC
-    formatting['speech'][pyatspi.ROLE_MENU_ITEM]['unfocused'] = 'labelAndName + menuItemCheckedState + 
availability + ' + MNEMONIC + ' + accelerator + pause + positionInList'
+    formatting['speech'][pyatspi.ROLE_MENU_ITEM]['unfocused'] = 'labelAndName + menuItemCheckedState + 
expandableState + availability + ' + MNEMONIC + ' + accelerator + pause + positionInList'
     formatting['speech'][pyatspi.ROLE_MENU_ITEM]['basicWhereAmI'] = \
         'ancestors + pause + labelAndName + pause + accelerator + pause + positionInList + ' + MNEMONIC
     formatting['speech'][pyatspi.ROLE_PAGE_TAB]['focused'] = 'labelAndName + roleName + pause + 
positionInList + ' + MNEMONIC + ' + accelerator'
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index be6df2e..a635d04 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -5062,3 +5062,4 @@ state_change_notifiers[pyatspi.ROLE_TABLE_CELL]      = ("checked",
                                                         "expanded",
                                                         None)
 state_change_notifiers[pyatspi.ROLE_LIST_ITEM]       = ("expanded", None)
+state_change_notifiers[pyatspi.ROLE_MENU_ITEM]       = ("expanded", None)


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