comparison 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
comparison
equal deleted inserted replaced
232:557946bf9545 233:ba8f3a4a5ac7
126 symbol: "plus-circled" 126 symbol: "plus-circled"
127 size_hint: None, 1 127 size_hint: None, 1
128 width: dp(30) 128 width: dp(30)
129 on_release: TransferMenu(callback=root.onTransferOK).show(self) 129 on_release: TransferMenu(callback=root.onTransferOK).show(self)
130 130
131 <EncryptionButton>: 131 <EncryptionMainButton>:
132 size_hint: None, 1 132 size_hint: None, 1
133 width: dp(30) 133 width: dp(30)
134 color: self.getColor() 134 color: self.getColor()
135 symbol: self.getSymbol() 135 symbol: self.getSymbol()
136 136
137 <OtrButton@Button>: 137 <EncryptionButton>:
138 group: 'encryption'
138 size_hint: None, None 139 size_hint: None, None
139 size: self.texture_size 140 width: max(self.texture_size[0], self.parent.minimum_width if self.parent else 0)
141 height: self.texture_size[1]
140 padding: dp(5), dp(10) 142 padding: dp(5), dp(10)
143 color: 0, 0, 0, 1
144 bold: True
145 background_normal: app.expand('{media}/misc/borders/border_filled_black.png')
146 background_color: app.c_sec if self.selected else app.c_prim_dark
141 147
142 <OtrMenu>: 148 <EncryptionMenu>:
143 size_hint_x: None 149 size_hint_x: None
144 width: start_btn.width 150 width: self.container.minimum_width
145 auto_width: False 151 auto_width: False
146 canvas.before: 152 canvas.before:
147 Color: 153 Color:
148 rgba: 0, 0, 0, 1 154 rgba: 0, 0, 0, 1
149 Rectangle: 155 Rectangle:
150 pos: self.pos 156 pos: self.pos
151 size: self.size 157 size: self.size
152 OtrButton: 158 # EncryptionButton:
153 size_hint: 1, None 159 # size_hint: 1, None
154 id: start_btn 160 # id: start_btn
155 text: _(u"Start/Refresh encrypted session") 161 # text: _(u"Start/Refresh encrypted session")
156 on_release: root.otr_start() 162 # on_release: root.otr_start()
157 OtrButton: 163 # EncryptionButton:
158 size_hint: 1, None 164 # size_hint: 1, None
159 text: _(u"Finish encrypted session") 165 # text: _(u"Finish encrypted session")
160 on_release: root.otr_end() 166 # on_release: root.otr_end()
161 OtrButton: 167 # EncryptionButton:
162 size_hint: 1, None 168 # size_hint: 1, None
163 text: _(u"Authenticate destinee") 169 # text: _(u"Authenticate destinee")
164 on_release: root.otr_authenticate() 170 # on_release: root.otr_authenticate()