don't add self contact row if it's not needed

This commit is contained in:
Yann Leboulanger 2006-07-19 11:53:21 +00:00
parent f76aa7e2ec
commit 43bacb684f
1 changed files with 9 additions and 0 deletions

View File

@ -349,6 +349,15 @@ class RosterWindow:
self.draw_contact(jid, account)
self.draw_avatar(jid, account)
return
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
if not contact:
return
showOffline = gajim.config.get('showoffline')
if (contact.show in ('offline', 'error')) and not showOffline and \
not gajim.awaiting_events[account].has_key(jid):
return
model = self.tree.get_model()
iterAcct = self.get_account_iter(account)
model.append(iterAcct, (None, gajim.nicks[account], 'self_contact', jid,