Commit 022e0e29 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

ServerInfo: Simplify showing connection type

parent 6764c110
......@@ -101,16 +101,10 @@ def header_func(row, before, user_data):
def _add_connection_info(self):
# Connection type
con_type = app.connections[self.account].connection.current_connection_type
con_type_short = ''
if ConnectionType.DIRECT_TLS:
con_type_short = 'DIRECT TLS'
elif ConnectionType.START_TLS:
con_type_short = 'START TLS'
else:
con_type_short = 'PLAIN'
self._ui.connection_type.set_text(con_type_short)
if con_type is ConnectionType.PLAIN:
client = app.connections[self.account].connection
con_type = client.current_connection_type
self._ui.connection_type.set_text(con_type.value)
if con_type.is_plain:
self._ui.conection_type.get_style_context().add_class(
'error-color')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment