don't count our jid in number of contacts, count transport only if show_transports_group is True, update transports row when a transport connects / disconnects. fixes #1728

This commit is contained in:
Yann Leboulanger 2006-11-15 15:56:42 +00:00
parent c86f7fcef4
commit 40d298c231
2 changed files with 6 additions and 1 deletions

View File

@ -259,8 +259,12 @@ class Contacts:
nbr_online = 0 nbr_online = 0
nbr_total = 0 nbr_total = 0
for account in accounts: for account in accounts:
our_jid = common.gajim.get_jid_from_account(account)
for jid in self.get_jid_list(account): for jid in self.get_jid_list(account):
if common.gajim.jid_is_transport(jid): if jid == our_jid:
continue
if common.gajim.jid_is_transport(jid) and not \
common.gajim.config.get('show_transports_group'):
# do not count transports # do not count transports
continue continue
contact = self.get_contact_with_highest_priority(account, jid) contact = self.get_contact_with_highest_priority(account, jid)

View File

@ -440,6 +440,7 @@ class Interface:
if ji in jid_list: if ji in jid_list:
# Update existing iter # Update existing iter
self.roster.draw_contact(ji, account) self.roster.draw_contact(ji, account)
self.roster.draw_group(_('Transports'), account)
# transport just signed in/out, don't show popup notifications # transport just signed in/out, don't show popup notifications
# for 30s # for 30s
account_ji = account + '/' + ji account_ji = account + '/' + ji