From 43bacb684fc791c46e6f961d7567bc8795cda2d9 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 19 Jul 2006 11:53:21 +0000 Subject: [PATCH] don't add self contact row if it's not needed --- src/roster_window.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/roster_window.py b/src/roster_window.py index 1c32812d3..57ab467ed 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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,