comparison browser_side/dialog.py @ 272:0cb9869b42b6

browser_side: bug fix for RoomAndContactsChooser (do not display the MUCs in the list)
author souliane <souliane@mailoo.org>
date Thu, 21 Nov 2013 13:44:26 +0100
parents d868181d0649
children aebb96bfa8d1
comparison
equal deleted inserted replaced
271:d868181d0649 272:0cb9869b42b6
138 def setContacts(self, selected=[]): 138 def setContacts(self, selected=[]):
139 """Fill the list with the connected contacts 139 """Fill the list with the connected contacts
140 @param select: list of the contacts to select by default 140 @param select: list of the contacts to select by default
141 """ 141 """
142 self.contacts_list.clear() 142 self.contacts_list.clear()
143 contacts = self.host.contact_panel.getConnected() 143 contacts = self.host.contact_panel.getConnected(filter_muc=True)
144 self.contacts_list.setVisibleItemCount(10 if len(contacts) > 5 else 5) 144 self.contacts_list.setVisibleItemCount(10 if len(contacts) > 5 else 5)
145 self.contacts_list.addItem("") 145 self.contacts_list.addItem("")
146 for contact in contacts: 146 for contact in contacts:
147 if contact not in [room.bare for room in self.host.room_list]: 147 if contact not in [room.bare for room in self.host.room_list]:
148 self.contacts_list.addItem(contact) 148 self.contacts_list.addItem(contact)
216 216
217 def onOK(self, sender): 217 def onOK(self, sender):
218 room_jid = self.getRoom() 218 room_jid = self.getRoom()
219 if room_jid != "" and "@" not in room_jid: 219 if room_jid != "" and "@" not in room_jid:
220 Window.alert('You must enter a room jid in the form room@chat.%s' % self.host._defaultDomain) 220 Window.alert('You must enter a room jid in the form room@chat.%s' % self.host._defaultDomain)
221 return
221 self.hide() 222 self.hide()
222 self.callback(room_jid, self.getContacts()) 223 self.callback(room_jid, self.getContacts())
223 224
224 def onCancel(self, sender): 225 def onCancel(self, sender):
225 self.hide() 226 self.hide()