Philipp Hörist pushed to branch master at gajim / gajim
Commits:
022e0e29 by lovetox at 2020-03-11T19:03:16+01:00
ServerInfo: Simplify showing connection type
- - - - -
1 changed file:
- gajim/gtk/server_info.py
Changes:
=====================================
gajim/gtk/server_info.py
=====================================
@@ -101,16 +101,10 @@ class ServerInfo(Gtk.ApplicationWindow, EventHelper):
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')
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/022e0e296aac1a79de774ad336e53277f79e2a95
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/022e0e296aac1a79de774ad336e53277f79e2a95
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits