draw the TLS icon when we connect to a server. Fixes #1736
This commit is contained in:
parent
0a4cf6eae4
commit
fd859966c5
|
@ -258,6 +258,7 @@ class Interface:
|
||||||
def handle_event_con_type(self, account, con_type):
|
def handle_event_con_type(self, account, con_type):
|
||||||
# ('CON_TYPE', account, con_type) which can be 'ssl', 'tls', 'tcp'
|
# ('CON_TYPE', account, con_type) which can be 'ssl', 'tls', 'tcp'
|
||||||
gajim.con_types[account] = con_type
|
gajim.con_types[account] = con_type
|
||||||
|
self.roster.draw_account(account)
|
||||||
|
|
||||||
def allow_notif(self, account):
|
def allow_notif(self, account):
|
||||||
gajim.allow_notifications[account] = True
|
gajim.allow_notifications[account] = True
|
||||||
|
|
|
@ -164,6 +164,17 @@ class RosterWindow:
|
||||||
gtkgui_helpers.escape_for_pango_markup(account),
|
gtkgui_helpers.escape_for_pango_markup(account),
|
||||||
'account', our_jid, account, False, tls_pixbuf])
|
'account', our_jid, account, False, tls_pixbuf])
|
||||||
|
|
||||||
|
def draw_account(self, account):
|
||||||
|
model = self.tree.get_model()
|
||||||
|
iter = self.get_account_iter(account)
|
||||||
|
if gajim.con_types.has_key(account) and \
|
||||||
|
gajim.con_types[account] in ('tls', 'ssl'):
|
||||||
|
tls_pixbuf = self.window.render_icon(gtk.STOCK_DIALOG_AUTHENTICATION,
|
||||||
|
gtk.ICON_SIZE_MENU) # the only way to create a pixbuf from stock
|
||||||
|
model[iter][C_SECPIXBUF] = tls_pixbuf
|
||||||
|
else:
|
||||||
|
model[iter][C_SECPIXBUF] = None
|
||||||
|
|
||||||
def remove_newly_added(self, jid, account):
|
def remove_newly_added(self, jid, account):
|
||||||
if jid in gajim.newly_added[account]:
|
if jid in gajim.newly_added[account]:
|
||||||
gajim.newly_added[account].remove(jid)
|
gajim.newly_added[account].remove(jid)
|
||||||
|
|
Loading…
Reference in New Issue