From e02543456935626f33b4e4a438e19a32bb43b836 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sun, 11 May 2014 22:48:05 +0200 Subject: [PATCH] Return True when we called a callback --- naja/widgets/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- 2.34.1