From 0d645437d8ff20b61ac4e184e818f4507f633236 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Sun, 8 Jun 2008 14:35:40 +0000 Subject: [PATCH] Don't act like if self contact is in group General. See #4000. Don't make General group visible when we have self contact. --- src/roster_window.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 86315f45a..4ac63ab5a 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -953,7 +953,9 @@ class RosterWindow: groups = contact.groups if contact.is_observer(): groups = [_('Observers')] - elif not groups: + elif not groups and \ + not contact.jid == gajim.get_jid_from_account(account): + # no group, and not self contact groups = [_('General')] # gets number of unread gc marked messages @@ -1375,9 +1377,11 @@ class RosterWindow: accounts = [account] for _acc in accounts: for contact in gajim.contacts.iter_contacts(_acc): - # Is this contact in this group ? + # Is this contact in this group ? (last part of if check if it's + # self contact) if group in contact.groups or (group == _('General') and not \ - contact.groups): + contact.groups and \ + not contact.jid == gajim.get_jid_from_account(account)): if self.contact_is_visible(contact, _acc): return True return False