From: Stefano Rivera Date: Sun, 11 May 2014 20:48:05 +0000 (+0200) Subject: Return True when we called a callback X-Git-Tag: 0.1~383 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=e02543456935626f33b4e4a438e19a32bb43b836;p=naja.git Return True when we called a callback --- diff --git a/naja/widgets/base.py b/naja/widgets/base.py index c820261..ee6190b 100644 --- a/naja/widgets/base.py +++ b/naja/widgets/base.py @@ -39,7 +39,7 @@ class Widget(object): self._prepared = False return False if SelectEvent.matches(ev) or ev.type == pgl.MOUSEBUTTONDOWN: - self.callback('click') + return self.callback('click') return False def add_callback(self, event, callback): @@ -48,6 +48,7 @@ class Widget(object): def callback(self, event): for callback in self.callbacks[event]: callback(event) + return bool(self.callbacks[event]) class Container(object):