[orca] Fix for bug 681718 - Cannot enable laptop keyboard layout in Python 3
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 681718 - Cannot enable laptop keyboard layout in Python 3
- Date: Mon, 13 Aug 2012 12:34:41 +0000 (UTC)
commit 3f6c63ea8623b7729139a1e024ba1510cee6c307
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Aug 13 08:34:15 2012 -0400
Fix for bug 681718 - Cannot enable laptop keyboard layout in Python 3
src/orca/orca.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 8d45c4a..8b3bdb9 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -322,7 +322,7 @@ def _setCapsLockAsOrcaModifier(enable):
r'^\s*action\s*=\s*LockMods\s*\(\s*modifiers\s*=\s*Lock\s*\)\s*;\s*$', re.I)
normalCapsLine = ' action= LockMods(modifiers=Lock);'
capsModLine = ' action= SetMods(modifiers=Lock,clearLocks);'
- lines = _originalXmodmap.split('\n')
+ lines = _originalXmodmap.decode('UTF-8').split('\n')
foundCapsInterpretSection = False
for i in range(len(lines)):
line = lines[i]
@@ -333,12 +333,12 @@ def _setCapsLockAsOrcaModifier(enable):
if enable:
if normalCapsLineProg.match(line):
lines[i] = capsModLine
- _setXmodmap('\n'.join(lines))
+ _setXmodmap(bytes('\n'.join(lines), 'UTF-8'))
return
else:
if capsModLineProg.match(line):
lines[i] = normalCapsLine
- _setXmodmap('\n'.join(lines))
+ _setXmodmap(bytes('\n'.join(lines), 'UTF-8'))
return
if line.find('}'):
# Failed to find the line we need to change
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]