Author: asterix Date: 2007-09-04 22:16:15 +0200 (Tue, 04 Sep 2007) New Revision: 8719
Modified: branches/gajim_0.11.1/src/common/contacts.py branches/gajim_0.11.1/src/roster_window.py Log: clear contact list when we connect. fixes #3234
Modified: branches/gajim_0.11.1/src/common/contacts.py =================================================================== --- branches/gajim_0.11.1/src/common/contacts.py 2007-09-04 20:15:52 UTC (rev 8718) +++ branches/gajim_0.11.1/src/common/contacts.py 2007-09-04 20:16:15 UTC (rev 8719) @@ -189,6 +189,9 @@ if len(self._contacts[account][contact.jid]) == 0: del self._contacts[account][contact.jid]
+ def clear_contacts(self, account): + self._contacts[account] = {} + def remove_jid(self, account, jid): '''Removes all contacts for a given jid''' if not self._contacts.has_key(account):
Modified: branches/gajim_0.11.1/src/roster_window.py =================================================================== --- branches/gajim_0.11.1/src/roster_window.py 2007-09-04 20:15:52 UTC (rev 8718) +++ branches/gajim_0.11.1/src/roster_window.py 2007-09-04 20:16:15 UTC (rev 8719) @@ -1119,6 +1119,8 @@ gajim.contacts.add_account(account) if not gajim.groups.has_key(account): gajim.groups[account] = {} + # Empty contact list + gajim.contacts.clear_contacts(account) for jid in array.keys(): jids = jid.split('/') #get jid