Mercurial > libervia-desktop-kivy
comparison cagou/plugins/plugin_wid_chat.py @ 332:13bc00b9743a
chat: use `bind` for EncryptionButton events:
binding them on init doesn't seem to work anymore
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 20 Dec 2019 12:29:37 +0100 |
parents | 51520ce98154 |
children | 69d2a96ce26f |
comparison
equal
deleted
inserted
replaced
331:d36040493434 | 332:13bc00b9743a |
---|---|
281 text=_("unencrypted (plain text)"), | 281 text=_("unencrypted (plain text)"), |
282 on_release=self.unencrypted, | 282 on_release=self.unencrypted, |
283 selected=True, | 283 selected=True, |
284 bold=False, | 284 bold=False, |
285 ) | 285 ) |
286 btn.bind( | |
287 on_release=self.unencrypted, | |
288 ) | |
286 self.add_widget(btn) | 289 self.add_widget(btn) |
287 for plugin in G.host.encryption_plugins: | 290 for plugin in G.host.encryption_plugins: |
288 btn = EncryptionButton( | 291 btn = EncryptionButton( |
289 text=plugin['name'], | 292 text=plugin['name'], |
293 trust_button=True, | |
294 ) | |
295 btn.bind( | |
290 on_release=partial(self.startEncryption, plugin=plugin), | 296 on_release=partial(self.startEncryption, plugin=plugin), |
291 on_trust_release=partial(self.getTrustUI, plugin=plugin), | 297 on_trust_release=partial(self.getTrustUI, plugin=plugin), |
292 trust_button=True, | 298 ) |
293 ) | |
294 self.add_widget(btn) | 299 self.add_widget(btn) |
295 log.info("added encryption: {}".format(plugin['name'])) | 300 log.info("added encryption: {}".format(plugin['name'])) |
296 | 301 |
297 def messageEncryptionStopCb(self): | 302 def messageEncryptionStopCb(self): |
298 log.info(_("Session with {destinee} is now in plain text").format( | 303 log.info(_("Session with {destinee} is now in plain text").format( |