# HG changeset patch # User Goffi # Date 1576841377 -3600 # Node ID 13bc00b9743a7fbc50a070ac6ad1ac02ca248827 # Parent d36040493434f13191af0ef746ebed63684dc1c7 chat: use `bind` for EncryptionButton events: binding them on init doesn't seem to work anymore diff -r d36040493434 -r 13bc00b9743a cagou/plugins/plugin_wid_chat.py --- a/cagou/plugins/plugin_wid_chat.py Fri Dec 20 12:29:37 2019 +0100 +++ b/cagou/plugins/plugin_wid_chat.py Fri Dec 20 12:29:37 2019 +0100 @@ -283,14 +283,19 @@ selected=True, bold=False, ) + btn.bind( + on_release=self.unencrypted, + ) self.add_widget(btn) for plugin in G.host.encryption_plugins: btn = EncryptionButton( text=plugin['name'], + trust_button=True, + ) + btn.bind( on_release=partial(self.startEncryption, plugin=plugin), on_trust_release=partial(self.getTrustUI, plugin=plugin), - trust_button=True, - ) + ) self.add_widget(btn) log.info("added encryption: {}".format(plugin['name']))