revert a commit

This commit is contained in:
Nikos Kouremenos 2005-08-27 17:24:12 +00:00
parent e050ae4532
commit c0c32680cd
1 changed files with 3 additions and 1 deletions

View File

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