projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a9f5c7
)
Return True when we called a callback
author
Stefano Rivera
<stefano@rivera.za.net>
Sun, 11 May 2014 20:48:05 +0000
(22:48 +0200)
committer
Stefano Rivera
<stefano@rivera.za.net>
Sun, 11 May 2014 20:48:05 +0000
(22:48 +0200)
naja/widgets/base.py
patch
|
blob
|
history
diff --git
a/naja/widgets/base.py
b/naja/widgets/base.py
index c82026179c9856b4812f6937d433881a8321fddc..ee6190b91939bdd35176e11257fc570ac2a78adf 100644
(file)
--- 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):