modify treestore before iter becomes invalid

This commit is contained in:
Yann Leboulanger 2006-03-29 20:32:36 +00:00
parent 7043aeeb7e
commit 3a0e6bf000
1 changed files with 1 additions and 1 deletions

View File

@ -2484,6 +2484,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
account = model[iter][C_ACCOUNT].decode('utf-8') account = model[iter][C_ACCOUNT].decode('utf-8')
jid = model[iter][C_JID].decode('utf-8') jid = model[iter][C_JID].decode('utf-8')
type = model[iter][C_TYPE] type = model[iter][C_TYPE]
model[iter][C_EDITABLE] = False
if type in ('contact', 'agent'): if type in ('contact', 'agent'):
old_text = gajim.contacts.get_contact_with_highest_priority(account, old_text = gajim.contacts.get_contact_with_highest_priority(account,
jid).name jid).name
@ -2517,7 +2518,6 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
self.add_contact_to_roster(contact.jid, account) self.add_contact_to_roster(contact.jid, account)
gajim.connections[account].update_contact(contact.jid, gajim.connections[account].update_contact(contact.jid,
contact.name, contact.groups) contact.name, contact.groups)
model[iter][C_EDITABLE] = False
def on_service_disco_menuitem_activate(self, widget, account): def on_service_disco_menuitem_activate(self, widget, account):
server_jid = gajim.config.get_per('accounts', account, 'hostname') server_jid = gajim.config.get_per('accounts', account, 'hostname')