Fix invite menu. Fixes #7422

This commit is contained in:
Denis Fomin 2013-08-13 01:10:59 +04:00
parent e9eead0c92
commit a7a0a108b6
1 changed files with 3 additions and 4 deletions

View File

@ -118,7 +118,6 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]):
invite_to_new_room_menuitem.set_sensitive(False)
rooms = [] # a list of (room_jid, account) tuple
invite_to_submenu.append(invite_to_new_room_menuitem)
rooms = [] # a list of (room_jid, account) tuple
minimized_controls = []
for account in connected_accounts:
minimized_controls += \
@ -133,7 +132,7 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]):
continue
if room_jid in gajim.gc_connected[acct] 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))
if len(rooms):
item = gtk.SeparatorMenuItem() # separator
@ -142,8 +141,8 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]):
menuitem = gtk.MenuItem(room_jid.split('@')[0])
if len(contact_list) > 1: # several resources
menuitem.set_submenu(build_resources_submenu(
contact_list, account, roster.on_invite_to_room, room_jid,
account))
contact_list, account, roster.on_invite_to_room, room_jid,
account))
else:
# use resource if it's self contact
if contact.jid == gajim.get_jid_from_account(account):