From cb246c6a8778fe8fd96de7d2f35808960e07b65f Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 2 Jan 2011 16:52:37 +0000 Subject: [PATCH] Signal item can have more than one callback to handle svn: r16330 --- src/gen/plug/_gramplet.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gen/plug/_gramplet.py b/src/gen/plug/_gramplet.py index 73206026f..a0c0afb63 100644 --- a/src/gen/plug/_gramplet.py +++ b/src/gen/plug/_gramplet.py @@ -410,12 +410,14 @@ class Gramplet(object): def connect(self, signal_obj, signal, method): id = signal_obj.connect(signal, method) - self._signal[signal] = (id, signal_obj) + signal_list = self._signal.get(signal, []) + signal_list.append((id, signal_obj)) + self._signal[signal] = signal_list def disconnect(self, signal): if signal in self._signal: - (id, signal_obj) = self._signal[signal] - signal_obj.disconnect(id) + for (id, signal_obj) in self._signal[signal]: + signal_obj.disconnect(id) else: raise AttributeError("unknown signal: '%s'" % signal)