Commit cb0ee988 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

Fix on_renamed issue introduced while rebasing

parent 5c4299cf
Pipeline #3570 passed with stages
in 2 minutes and 35 seconds
......@@ -2884,30 +2884,6 @@ class RosterWindow:
message = _('Enter a new name for group %s') % \
GLib.markup_escape_text(jid)
def on_renamed(new_text, account, row_type, jid, old_text):
if 'rename' in app.interface.instances:
del app.interface.instances['rename']
if row_type in ('contact', 'agent'):
if old_text == new_text:
return
contacts = app.contacts.get_contacts(account, jid)
for contact in contacts:
contact.name = new_text
con = app.connections[account]
con.get_module('Roster').update_contact(
jid, new_text, contacts[0].groups)
self.draw_contact(jid, account)
# Update opened chats
for ctrl in app.interface.msg_win_mgr.get_controls(jid,
account):
ctrl.update_ui()
win = app.interface.msg_win_mgr.get_window(jid, account)
win.redraw_tab(ctrl)
win.show_title()
elif row_type == 'group':
# in Column.JID column, we hold the group name (which is not escaped)
self.rename_group(old_text, new_text, account)
def on_canceled():
if 'rename' in app.interface.instances:
del app.interface.instances['rename']
......@@ -2925,8 +2901,9 @@ class RosterWindow:
contacts = app.contacts.get_contacts(account, jid)
for contact in contacts:
contact.name = new_text
app.connections[account].update_contact(jid, new_text, \
contacts[0].groups)
con = app.connections[account]
con.get_module('Roster').update_contact(
jid, new_text, contacts[0].groups)
self.draw_contact(jid, account)
# Update opened chats
for ctrl in app.interface.msg_win_mgr.get_controls(jid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment