[orca] Fix for bug 673336 - Problems binding and rebinding commands with Caps_Lock



commit e8beb0b9568c184da4712fcd69515082d12f0933
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Apr 2 07:05:46 2012 -0400

    Fix for bug 673336 - Problems binding and rebinding commands with Caps_Lock

 src/orca/orca_gui_prefs.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 132d884..b63291f 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -2805,12 +2805,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         eventString = Gdk.keyval_name(entries[0])
         eventState = keyPressedEvent.state
 
-        modifierKeys =  ['Alt_L', 'Alt_R', 'Control_L', 'Control_R',
-                         'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R',
-                         'Num_Lock', 'Caps_Lock']
-        if eventString in modifierKeys:
-            return False
-
         orcaMods = settings.orcaModifierKeys
         try:
             orcaMods = map(lambda x: x.encode('UTF-8'), orcaMods)
@@ -2820,6 +2814,12 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             self._capturedKey = ['', settings.ORCA_MODIFIER_MASK, 0]
             return False
 
+        modifierKeys =  ['Alt_L', 'Alt_R', 'Control_L', 'Control_R',
+                         'Shift_L', 'Shift_R', 'Meta_L', 'Meta_R',
+                         'Num_Lock', 'Caps_Lock']
+        if eventString in modifierKeys:
+            return False
+
         if not self._capturedKey \
            or eventString in ['Return', 'Escape']:
             self._capturedKey = [eventString, eventState, 1]
@@ -2931,7 +2931,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         treeModel.set(myiter,
                       modMask, str(settings.defaultModifierMask),
-                      modUsed, str(mods),
+                      modUsed, str(int(mods)),
                       key, string,
                       text, new_text,
                       click_count, str(clickCount),



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