Fix invite menu. Fixes #7422
This commit is contained in:
parent
e9eead0c92
commit
a7a0a108b6
|
@ -118,7 +118,6 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]):
|
||||||
invite_to_new_room_menuitem.set_sensitive(False)
|
invite_to_new_room_menuitem.set_sensitive(False)
|
||||||
rooms = [] # a list of (room_jid, account) tuple
|
rooms = [] # a list of (room_jid, account) tuple
|
||||||
invite_to_submenu.append(invite_to_new_room_menuitem)
|
invite_to_submenu.append(invite_to_new_room_menuitem)
|
||||||
rooms = [] # a list of (room_jid, account) tuple
|
|
||||||
minimized_controls = []
|
minimized_controls = []
|
||||||
for account in connected_accounts:
|
for account in connected_accounts:
|
||||||
minimized_controls += \
|
minimized_controls += \
|
||||||
|
@ -133,7 +132,7 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]):
|
||||||
continue
|
continue
|
||||||
if room_jid in gajim.gc_connected[acct] and \
|
if room_jid in gajim.gc_connected[acct] and \
|
||||||
gajim.gc_connected[acct][room_jid] and \
|
gajim.gc_connected[acct][room_jid] and \
|
||||||
contacts_transport == gajim.get_transport_name_from_jid(room_jid):
|
contacts_transport in ['jabber', None]:
|
||||||
rooms.append((room_jid, acct))
|
rooms.append((room_jid, acct))
|
||||||
if len(rooms):
|
if len(rooms):
|
||||||
item = gtk.SeparatorMenuItem() # separator
|
item = gtk.SeparatorMenuItem() # separator
|
||||||
|
@ -142,8 +141,8 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]):
|
||||||
menuitem = gtk.MenuItem(room_jid.split('@')[0])
|
menuitem = gtk.MenuItem(room_jid.split('@')[0])
|
||||||
if len(contact_list) > 1: # several resources
|
if len(contact_list) > 1: # several resources
|
||||||
menuitem.set_submenu(build_resources_submenu(
|
menuitem.set_submenu(build_resources_submenu(
|
||||||
contact_list, account, roster.on_invite_to_room, room_jid,
|
contact_list, account, roster.on_invite_to_room, room_jid,
|
||||||
account))
|
account))
|
||||||
else:
|
else:
|
||||||
# use resource if it's self contact
|
# use resource if it's self contact
|
||||||
if contact.jid == gajim.get_jid_from_account(account):
|
if contact.jid == gajim.get_jid_from_account(account):
|
||||||
|
|
Loading…
Reference in New Issue