Add signal_connected on signal event

This commit is contained in:
Cédric Krier committed 2009-04-02 00:43:16 +02:00
1 parent a91ff8efd9
commit 52e30bc4ac
1 file changed
+5 -1
+5 -1
View File
@@ -1,4 +1,5 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms.
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
"Signal event"
@@ -13,6 +14,9 @@ class SignalEvent(object):
fnct(self, signal_data, *data)
return True
def signal_connected(self, signal):
return bool(self.__connects.get(signal))
def signal_connect(self, key, signal, fnct, *data):
self.__connects.setdefault(signal, [])
if (fnct, data, key) not in self.__connects[signal]: