Commit 887f1112 authored by Daniel Brötzmann's avatar Daniel Brötzmann

Roster: Don't build resources submenu for start_chat_menuitem

This avoids being able to open multiple ChatControls for one contact.
Historically, this was used to send a message to a specific resource.
parent 45f078d1
Pipeline #4613 passed with stages
in 3 minutes and 15 seconds
......@@ -206,8 +206,6 @@ control=None, gc_contact=None, is_anonymous=True):
contacts = app.contacts.get_contacts(account, jid)
if len(contacts) > 1 and use_multiple_contacts: # several resources
start_chat_menuitem.set_submenu(build_resources_submenu(contacts,
account, app.interface.on_open_chat_window))
send_file_menuitem.set_submenu(build_resources_submenu(
contacts,
account,
......@@ -216,8 +214,6 @@ control=None, gc_contact=None, is_anonymous=True):
execute_command_menuitem.set_submenu(build_resources_submenu(
contacts, account, roster.on_execute_command, cap=NS_COMMANDS))
else:
start_chat_menuitem.connect('activate',
app.interface.on_open_chat_window, contact, account)
if contact.supports(NS_JINGLE_FILE_TRANSFER_5):
send_file_menuitem.set_sensitive(True)
send_file_menuitem.connect('activate',
......@@ -238,6 +234,9 @@ control=None, gc_contact=None, is_anonymous=True):
else:
execute_command_menuitem.set_sensitive(False)
start_chat_menuitem.connect(
'activate', app.interface.on_open_chat_window, contact, account)
rename_menuitem.connect('activate', roster.on_rename, 'contact', jid,
account)
......
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