From e3fb6c2607529003e9e51a4ea02547f6d67a7047 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 29 Mar 2006 21:23:13 +0000 Subject: [PATCH] we have to remove group from contact instances before removing them from roster so that gajim.groups in cleaned up. Fixes #1778 --- src/roster_window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 2ea8e106e..7df4e5580 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2503,17 +2503,19 @@ _('If "%s" accepts this request you will know his or her status.') % jid) elif type == 'group': # in C_JID column, we hold the group name (which is not escaped) old_name = model[iter][C_JID].decode('utf-8') - # Groups may not change name from or to 'Not in Roster' + # Groups may not change name from or to 'Not in Roster' nor Transports if _('Not in Roster') in (new_text, old_name): return + if _('Transports') in (new_text, old_name): + return # get all contacts in that group for jid in gajim.contacts.get_jid_list(account): contact = gajim.contacts.get_contact_with_highest_priority(account, jid) if old_name in contact.groups: # set them in the new one and remove it from the old - self.remove_contact(contact, account) contact.groups.remove(old_name) + self.remove_contact(contact, account) contact.groups.append(new_text) self.add_contact_to_roster(contact.jid, account) gajim.connections[account].update_contact(contact.jid,