# HG changeset patch # User Neil Muller # Date 1316084032 -7200 # Node ID 190aa1481908bb0d6f721014e89b17d127d73974 # Parent 74ae1645df6e78691751aa4403e63f41b4f11722 Add forced_click method to buttons diff -r 74ae1645df6e -r 190aa1481908 mamba/widgets/base.py --- a/mamba/widgets/base.py Thu Sep 15 12:24:05 2011 +0200 +++ b/mamba/widgets/base.py Thu Sep 15 12:53:52 2011 +0200 @@ -88,6 +88,13 @@ return True return False + def forced_click(self): + """Force calling the clicked handler""" + for callback, args in self.callbacks['clicked']: + if callback(None, self, *args): + return True + return False + class Container(Widget):