From 07ae3e0b09441cec7a7df8ad5a4e961aab04e5eb Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 30 Mar 2013 19:48:27 +0100 Subject: save and delete configs --- module/interaction/EventManager.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'module/interaction/EventManager.py') diff --git a/module/interaction/EventManager.py b/module/interaction/EventManager.py index b25514b6a..7d37ca6b9 100644 --- a/module/interaction/EventManager.py +++ b/module/interaction/EventManager.py @@ -56,6 +56,12 @@ class EventManager: if event in self.events: self.events[event].remove(func) + def removeFromEvents(self, func): + """ Removes func from all known events """ + for name, events in self.events.iteritems(): + if func in events: + events.remove(func) + def dispatchEvent(self, event, *args): """dispatches event with args""" for f in self.events["event"]: -- cgit v1.2.3