[orca] Remove the now-obsolete expandComboBox() method



commit 46bf055bb00e772cc0c5747f27d66be50de3954d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Aug 20 23:18:48 2014 -0400

    Remove the now-obsolete expandComboBox() method
    
    * The native Gecko behavior works so we don't have to override it
    * The reason we overrode it in the first place was because it was
      possible to caret nav accidentally into an unfocused combo box.
      That never should have been possible in the first place and is
      fixed by the new modes.

 src/orca/scripts/toolkits/Gecko/keymaps.py |    1 -
 src/orca/scripts/toolkits/Gecko/script.py  |   42 ----------------------------
 2 files changed, 0 insertions(+), 43 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/keymaps.py b/src/orca/scripts/toolkits/Gecko/keymaps.py
index 38f6045..471aa24 100644
--- a/src/orca/scripts/toolkits/Gecko/keymaps.py
+++ b/src/orca/scripts/toolkits/Gecko/keymaps.py
@@ -51,7 +51,6 @@ arrowKeymap = (
     ("Left", defaultModifierMask, CTRL_MODIFIER_MASK, "goPreviousWordHandler"),
     ("Up", defaultModifierMask, NO_MODIFIER_MASK, "goPreviousLineHandler"),
     ("Down", defaultModifierMask, NO_MODIFIER_MASK, "goNextLineHandler"),
-    ("Down", defaultModifierMask, ALT_MODIFIER_MASK, "expandComboBoxHandler"),
     ("Home", defaultModifierMask, CTRL_MODIFIER_MASK, "goTopOfFileHandler"),
     ("End", defaultModifierMask, CTRL_MODIFIER_MASK, "goBottomOfFileHandler"),
     ("Home", defaultModifierMask, NO_MODIFIER_MASK, "goBeginningOfLineHandler"),
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index c1f9611..51c4d07 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -122,7 +122,6 @@ class Script(default.Script):
              Script.goPreviousWord,
              Script.goNextLine,
              Script.goPreviousLine,
-             Script.expandComboBox,
              Script.goTopOfFile,
              Script.goBottomOfFile,
              Script.goBeginningOfLine,
@@ -372,11 +371,6 @@ class Script(default.Script):
                 Script.goEndOfLine,
                 cmdnames.CARET_NAVIGATION_LINE_END)
 
-        self.inputEventHandlers["expandComboBoxHandler"] = \
-            input_event.InputEventHandler(
-                Script.expandComboBox,
-                cmdnames.CARET_NAVIGATION_EXPAND_COMBO_BOX)
-
         self.inputEventHandlers["advanceLivePoliteness"] = \
             input_event.InputEventHandler(
                 Script.advanceLivePoliteness,
@@ -3432,42 +3426,6 @@ class Script(default.Script):
         self.setCaretPosition(obj, characterOffset)
         self.presentLine(obj, characterOffset)
 
-    def expandComboBox(self, inputEvent):
-        """If focus is on a menu item, but the containing combo box does not
-        have focus, give the combo box focus and expand it.  Note that this
-        is necessary because with Orca controlling the caret it is possible
-        to arrow to a menu item within the combo box without actually giving
-        the containing combo box focus.
-        """
-
-        [obj, characterOffset] = self.getCaretContext()
-        comboBox = None
-        if obj.getRole() == pyatspi.ROLE_MENU_ITEM:
-            comboBox = self.utilities.ancestorWithRole(
-                obj, [pyatspi.ROLE_COMBO_BOX], [pyatspi.ROLE_DOCUMENT_FRAME])
-        else:
-            index = self.getChildIndex(obj, characterOffset)
-            if index >= 0:
-                comboBox = obj[index]
-
-        if not comboBox:
-            return
-
-        try:
-            action = comboBox.queryAction()
-        except:
-            pass
-        else:
-            orca.setLocusOfFocus(None, comboBox)
-            comboBox.queryComponent().grabFocus()
-            for i in range(0, action.nActions):
-                name = action.getName(i)
-                # Translators: this is the action name for the 'open' action.
-                #
-                if name in ["open", _("open")]:
-                    action.doAction(i)
-                    break
-
     def advanceLivePoliteness(self, inputEvent):
         """Advances live region politeness level."""
         if _settingsManager.getSetting('inferLiveRegions'):


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