GNOME Bugzilla – Bug 420173
Escape becomes bound to exiting learn mode
Last modified: 2007-03-19 19:36:50 UTC
Steps to reproduce: 1. Launch Orca 2. Launch Gedit 3. Enter learn mode and press Escape 4. Press Control O for Gedit's Open dialog 5. Press Escape to close the Open dialog Actual results: Orca says "Exiting learn mode" and the dialog box does not close Expected results: Orca wouldn't say "Exiting learn mode" and the dialog box would close.
This was the result of the for statement refactoring (bug #402494). In keybindings.py, KeyBindings' remove method now looks like this: for item in self.keyBindings: if keyBinding == item: del item It used to look like this: for i in range(0, len(self.keyBindings)): if keyBinding == self.keyBindings[i]: del self.keyBindings[i] I'm guessing that to delete an item from a list, you have to specify that item by listName[indexOfItem]
Created attachment 84893 [details] [review] proposed patch
Actually, I suggest just putting it back the way it was: for i in range(0, len(self.keyBindings)): if keyBinding == self.keyBindings[i]: del self.keyBindings[i] This was another of those cases, where I should have left it alone...
Created attachment 84908 [details] [review] Alternative patch - reverting the code back to what it was before the "for refactoring". I've checked the patch in. I'm going to close the bug as fixed. Will/Mike, we probably want to either apply this patch to the systems at CSUN (if we are using a version of Orca from SVN trunk/HEAD). Adding that comment here so that we don't forget.