decode one more string, and cleanup

This commit is contained in:
Nikos Kouremenos 2005-08-27 13:26:24 +00:00
parent 73cfebd78f
commit 23aaea5803
1 changed files with 3 additions and 4 deletions

View File

@ -1684,18 +1684,17 @@ _('If "%s" accepts this request you will know his status.') %jid)
'''When an iter is edited:
if text has changed, rename the contact'''
model = self.tree.get_model()
self.editing_path = None
# if this is a last item in the group, row is invalid
try:
iter = model.get_iter_from_string(row)
except:
self.editing_path = None
return
path = model.get_path(iter)
# do not set new name if row order has changed
if path != self.editing_path:
self.editing_path = None
return
self.editing_path = None
new_text = new_text.decode('utf-8')
account = model[iter][4].decode('utf-8')
jid = model[iter][3].decode('utf-8')
type = model[iter][2]