Mercurial > libervia-desktop-kivy
diff cagou/plugins/plugin_wid_chat.kv @ 233:ba8f3a4a5ac7
plugin chat: e2e encryption improvments:
OTR buttons has been replaced with a more generic one, which use new encryption mechanisms
to retrieve all current encryption algorithms (+ a button for plain text).
"refresh" and "authentify" buttons for OTR are temporarily removed.
Encryption state is checked on chat widget startup, and current encryption method is
selected (it will appear with a different background in encryption menu).
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 11 Aug 2018 18:34:16 +0200 |
parents | ab3f5173ef5c |
children | c2503168fab7 |
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.kv Sat Aug 11 19:48:58 2018 +0200 +++ b/cagou/plugins/plugin_wid_chat.kv Sat Aug 11 18:34:16 2018 +0200 @@ -128,20 +128,26 @@ width: dp(30) on_release: TransferMenu(callback=root.onTransferOK).show(self) -<EncryptionButton>: +<EncryptionMainButton>: size_hint: None, 1 width: dp(30) color: self.getColor() symbol: self.getSymbol() -<OtrButton@Button>: +<EncryptionButton>: + group: 'encryption' size_hint: None, None - size: self.texture_size + width: max(self.texture_size[0], self.parent.minimum_width if self.parent else 0) + height: self.texture_size[1] padding: dp(5), dp(10) + color: 0, 0, 0, 1 + bold: True + background_normal: app.expand('{media}/misc/borders/border_filled_black.png') + background_color: app.c_sec if self.selected else app.c_prim_dark -<OtrMenu>: +<EncryptionMenu>: size_hint_x: None - width: start_btn.width + width: self.container.minimum_width auto_width: False canvas.before: Color: @@ -149,16 +155,16 @@ Rectangle: pos: self.pos size: self.size - OtrButton: - size_hint: 1, None - id: start_btn - text: _(u"Start/Refresh encrypted session") - on_release: root.otr_start() - OtrButton: - size_hint: 1, None - text: _(u"Finish encrypted session") - on_release: root.otr_end() - OtrButton: - size_hint: 1, None - text: _(u"Authenticate destinee") - on_release: root.otr_authenticate() + # EncryptionButton: + # size_hint: 1, None + # id: start_btn + # text: _(u"Start/Refresh encrypted session") + # on_release: root.otr_start() + # EncryptionButton: + # size_hint: 1, None + # text: _(u"Finish encrypted session") + # on_release: root.otr_end() + # EncryptionButton: + # size_hint: 1, None + # text: _(u"Authenticate destinee") + # on_release: root.otr_authenticate()