[orca/gnome-3-2] Fix for #660163 - Traceback when try to edit a keybinding.
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-2] Fix for #660163 - Traceback when try to edit a keybinding.
- Date: Fri, 30 Sep 2011 19:06:50 +0000 (UTC)
commit 866b743e6b7d6dfa8f00bc810d7d7f5de4c20e30
Author: Alejandro Leiva <aleiva emergya es>
Date: Mon Sep 26 20:40:49 2011 +0200
Fix for #660163 - Traceback when try to edit a keybinding.
src/orca/keybindings.py | 5 ++++-
src/orca/orca.py | 9 ++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/keybindings.py b/src/orca/keybindings.py
index 3bbc438..7d4d63c 100644
--- a/src/orca/keybindings.py
+++ b/src/orca/keybindings.py
@@ -73,7 +73,10 @@ def getAllKeysyms(keysym):
# we are looking for.
#
if keycode != 0:
- success, entries = keymap.get_entries_for_keycode(keycode)
+ entries_for_keycode = keymap.get_entries_for_keycode(keycode)
+ success = entries_for_keycode[0]
+ entries = entries_for_keycode[1]
+
for entry in entries:
keyval = entry[0]
name = Gdk.keyval_name(keyval)
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 05033fb..ecd57cd 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -1150,8 +1150,15 @@ def _processKeyCaptured(event):
# character. (i.e. "1" instead of "!")
#
keymap = Gdk.Keymap.get_default()
- success, entries = keymap.get_entries_for_keycode(event.hw_code)
+ entries_for_keycode = keymap.get_entries_for_keycode(event.hw_code)
+ success = entries_for_keycode[0]
+ entries = entries_for_keycode[1]
event.event_string = Gdk.keyval_name(entries[0].keycode)
+
+ if not event.event_string:
+ orca_state.capturingKeys = False
+ return False
+
if event.event_string.startswith("KP") and \
event.event_string != "KP_Enter":
name = Gdk.keyval_name(entries[1].keycode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]