[pyatspi2] Fix deregisterKeystrokeListener
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyatspi2] Fix deregisterKeystrokeListener
- Date: Tue, 27 Dec 2011 23:15:55 +0000 (UTC)
commit 8d4ff5f3e2dfc7d49b3630bf2f54048540549f07
Author: Mike Gorse <mgorse novell com>
Date: Tue Dec 27 18:17:02 2011 -0500
Fix deregisterKeystrokeListener
deregisterKeystrokeListener would not work with the same parameters as
passed to registerKeystrokeListener.
http://bugzilla.gnome.org/show_bug.cgi?id=666871
pyatspi/registry.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/pyatspi/registry.py b/pyatspi/registry.py
index 7ea25b7..0a3a1c9 100644
--- a/pyatspi/registry.py
+++ b/pyatspi/registry.py
@@ -354,7 +354,14 @@ class Registry(object):
listener = self.event_listeners[client]
except:
return
- Atspi.deregister_keystroke_listener (listener, key_set, mask, kind)
+
+ if hasattr(mask, '__iter__'):
+ masks = mask
+ else:
+ masks = [mask]
+ for m in masks:
+ Atspi.deregister_keystroke_listener (listener, key_set,
+ m, self.makeKind(kind))
# TODO: enqueueEvent, etc?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]