[pyatspi2] Move the allModifiers function in to deviceevent.py to resolve missing symbol error when registering
- From: Mark Doffman <markdoffman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pyatspi2] Move the allModifiers function in to deviceevent.py to resolve missing symbol error when registering
- Date: Fri, 1 Jan 2010 15:50:48 +0000 (UTC)
commit cc3b4b7e507d7745a6df7e17d393007e32c09e5d
Author: Mark Doffman <mark doffman codethink co uk>
Date: Thu Dec 24 09:10:45 2009 -0800
Move the allModifiers function in to deviceevent.py to
resolve missing symbol error when registering keystrokes for all
modifiers.
pyatspi/deviceevent.py | 14 ++++++++++++--
pyatspi/utils.py | 9 ---------
2 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/pyatspi/deviceevent.py b/pyatspi/deviceevent.py
index 4209784..ad795a8 100644
--- a/pyatspi/deviceevent.py
+++ b/pyatspi/deviceevent.py
@@ -102,6 +102,16 @@ MODIFIER_NUMLOCK = ModifierType(7)
MODIFIER_SHIFT = ModifierType(0)
MODIFIER_SHIFTLOCK = ModifierType(1)
+def allModifiers():
+ """
+ Generates all possible keyboard modifiers for use with
+ L{registry.Registry.registerKeystrokeListener}.
+ """
+ mask = 0
+ while mask <= (1 << MODIFIER_NUMLOCK):
+ yield mask
+ mask += 1
+
#------------------------------------------------------------------------------
class DeviceEvent(list):
@@ -547,7 +557,7 @@ class _DeviceEventRegister (object):
self.deviceClients[client] = ob
if mask is None:
# None means all modifier combinations
- mask = utils.allModifiers()
+ mask = allModifiers()
# register for new keystrokes on the observer
ob.register(self.dev, key_set, mask, kind)
@@ -560,7 +570,7 @@ class _DeviceEventRegister (object):
ob = self.deviceClients[client]
if mask is None:
# None means all modifier combinations
- mask = utils.allModifiers()
+ mask = allModifiers()
# register for new keystrokes on the observer
ob.unregister(self.dev, key_set, mask, kind)
diff --git a/pyatspi/utils.py b/pyatspi/utils.py
index db3e360..f77d9cd 100644
--- a/pyatspi/utils.py
+++ b/pyatspi/utils.py
@@ -155,15 +155,6 @@ def relationToString(value):
"""
return relation.RELATION_VALUE_TO_NAME.get(value)
-def allModifiers():
- """
- Generates all possible keyboard modifiers for use with
- L{registry.Registry.registerKeystrokeListener}.
- """
- mask = 0
- while mask <= (1 << MODIFIER_NUMLOCK):
- yield mask
- mask += 1
def findDescendant(acc, pred, breadth_first=False):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]