diff --git a/gajim/common/app.py b/gajim/common/app.py index 467190f4d22052ec0f8db472bedc0a6b0caa27f6..ee11af9098c03631b7be917fb94fb38403ce6488 100644 --- a/gajim/common/app.py +++ b/gajim/common/app.py @@ -115,9 +115,6 @@ # from this transport block_signed_in_notifications = {} # type: Dict[str, bool] - # type of each connection (ssl, tls, tcp, ...) -con_types = {} # type: Dict[str, Optional[str]] - proxy65_manager = None cert_store = None @@ -466,21 +463,6 @@ def in_groupchat(account, room_jid): return False return gc_connected[account][room_jid] -def get_number_of_securely_connected_accounts(): - """ - Return the number of the accounts that are SSL/TLS connected - """ - num_of_secured = 0 - for account in connections: - if account_is_securely_connected(account): - num_of_secured += 1 - return num_of_secured - -def account_is_securely_connected(account): - if not account_is_connected(account): - return False - return con_types.get(account) in ('tls', 'ssl') - def get_transport_name_from_jid(jid, use_config_setting=True): """ Returns 'gg', 'irc' etc diff --git a/gajim/gtk/tooltips.py b/gajim/gtk/tooltips.py index 299759554e160b17fb6758a12c7d639dd762dc19..f427f60a7e94f880a9a4ad1f2cc436f34874a121 100644 --- a/gajim/gtk/tooltips.py +++ b/gajim/gtk/tooltips.py @@ -91,8 +91,7 @@ def add_text_row(self, text, col_inc=0): 1) self.current_row += 1 - def add_status_row(self, show, str_status, show_lock=False, - indent=True, transport=None): + def add_status_row(self, show, str_status, indent=True, transport=None): """ Append a new row with status icon to the table """ @@ -117,10 +116,6 @@ def add_status_row(self, show, str_status, show_lock=False, status_label.set_ellipsize(Pango.EllipsizeMode.END) status_label.set_max_width_chars(30) self.table.attach(status_label, 3, self.current_row, 1, 1) - if show_lock: - lock_image = Gtk.Image() - lock_image.set_from_icon_name('dialog-password', Gtk.IconSize.MENU) - self.table.attach(lock_image, 4, self.current_row, 1, 1) self.current_row += 1 def fill_table_with_accounts(self, accounts): @@ -128,8 +123,6 @@ def fill_table_with_accounts(self, accounts): message = acct['message'] message = helpers.reduce_chars_newlines(message, 100, 1) message = GLib.markup_escape_text(message) - con_type = app.con_types.get(acct['name']) - show_lock = con_type in ('tls', 'ssl') account_label = GLib.markup_escape_text(acct['account_label']) if message: @@ -137,10 +130,7 @@ def fill_table_with_accounts(self, accounts): else: status = account_label - self.add_status_row(acct['show'], - status, - show_lock=show_lock, - indent=False) + self.add_status_row(acct['show'], status, indent=False) for line in acct['event_lines']: self.add_text_row(' ' + line, 1) diff --git a/gajim/roster_window.py b/gajim/roster_window.py index 42a96d9d142f67643e2e60ab8c387061786937b5..7a2a9b0ac1a4d739db494d8300cd260e02bb76ae 100644 --- a/gajim/roster_window.py +++ b/gajim/roster_window.py @@ -290,13 +290,9 @@ def add_account(self, account): show = helpers.get_connection_status(account) our_jid = app.get_jid_from_account(account) - tls_pixbuf = None - if app.account_is_securely_connected(account): - tls_pixbuf = 'changes-prevent' - it = self.model.append(None, [get_icon_name(show), GLib.markup_escape_text(account), 'account', our_jid, - account, None, None, None, None, None, tls_pixbuf, True] + + account, None, None, None, None, None, None, True] + [None] * self.nb_ext_renderers) self._iters[account]['account'] = it @@ -1009,15 +1005,6 @@ def _really_draw_account(self, account): if not child_iter: return - num_of_accounts = app.get_number_of_connected_accounts() - num_of_secured = app.get_number_of_securely_connected_accounts() - - tls_pixbuf = None - if app.account_is_securely_connected(account) and not self.regroup or\ - self.regroup and num_of_secured and num_of_secured == num_of_accounts: - tls_pixbuf = 'changes-prevent' - self.model[child_iter][Column.PADLOCK_PIXBUF] = tls_pixbuf - if self.regroup: account_name = _('Merged accounts') accounts = [] @@ -2188,8 +2175,6 @@ def on_status_changed(self, account, show): # No need to redraw contacts if we're quitting if child_iterA: self.model[child_iterA][Column.AVATAR_IMG] = None - if account in app.con_types: - app.con_types[account] = None for jid in list(app.contacts.get_jid_list(account)): lcontact = app.contacts.get_contacts(account, jid) ctrl = app.interface.msg_win_mgr.get_gc_control(jid,