[orca/gnome-3-2] Additional fix for bug 665769
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-2] Additional fix for bug 665769
- Date: Fri, 9 Dec 2011 18:44:39 +0000 (UTC)
commit 378b3e824f62e51caccdb73ed419f757beaea4de
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Dec 9 13:45:26 2011 -0500
Additional fix for bug 665769
src/orca/orca.py | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index c187083..4ff17d3 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -839,7 +839,15 @@ def isModifierKey(event_string):
'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R' ]
if not orca_state.bypassNextCommand:
- modifierKeys.extend(settings.orcaModifierKeys)
+ orcaModifiers = settings.orcaModifierKeys
+ try:
+ orcaModifiers = map(lambda x: x.encode('UTF-8'), orcaModifiers)
+ except (UnicodeDecodeError, UnicodeEncodeError):
+ pass
+ modifierKeys.extend(orcaModifiers)
+
+ if isinstance(event_string, unicode):
+ event_string.encode('UTF-8')
reply = event_string in modifierKeys
debug.println(debug.LEVEL_FINEST,
@@ -1251,6 +1259,12 @@ def _processKeyboardEvent(event):
else:
allPossibleKeysyms = settings.orcaModifierKeys
+ try:
+ allPossibleKeysyms = \
+ map(lambda x: x.encode('UTF-8'), allPossibleKeysyms)
+ except (UnicodeDecodeError, UnicodeEncodeError):
+ pass
+
isOrcaModifier = allPossibleKeysyms.count(keyboardEvent.event_string) > 0
if event.type == pyatspi.KEY_PRESSED_EVENT:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]