comparison src/browser/sat_browser/contact_list.py @ 666:1bf645e73fe8 frontends_multi_profiles

browser_side: don't display MUC entities in the contact list + fixes ContactList.remove (QuickContactList and SimplePanel conflict)
author souliane <souliane@mailoo.org>
date Thu, 05 Mar 2015 13:27:41 +0100
parents 267761bf7f08
children 2201ff543a05
comparison
equal deleted inserted replaced
665:6a8a1103ad10 666:1bf645e73fe8
225 self._group_panel.add(group) 225 self._group_panel.add(group)
226 for group in removed_groups: 226 for group in removed_groups:
227 self._group_panel.remove(group) 227 self._group_panel.remove(group)
228 228
229 ### JIDS ### 229 ### JIDS ###
230 to_show = [jid_ for jid_ in self._cache.keys() if self.entityToShow(jid_) and jid_!=self.whoami.bare] 230 to_show = [jid_ for jid_ in self.roster_entities if self.entityToShow(jid_) and jid_ != self.whoami.bare]
231 to_show.sort() 231 to_show.sort()
232 232
233 self._contacts_panel.setList(to_show) 233 self._contacts_panel.setList(to_show)
234 234
235 for jid_ in self._alerts: 235 for jid_ in self._alerts:
236 self._contacts_panel.setState(jid_, "messageWaiting", True) 236 self._contacts_panel.setState(jid_, "messageWaiting", True)
237
238 def remove(self, entity):
239 # FIXME: SimplePanel and QuickContactList both have a 'remove' method
240 QuickContactList.remove(self, entity)
237 241
238 def onWindowResized(self, width, height): 242 def onWindowResized(self, width, height):
239 ideal_height = height - DOM.getAbsoluteTop(self.getElement()) - 5 243 ideal_height = height - DOM.getAbsoluteTop(self.getElement()) - 5
240 tab_panel = self.host.panel.tab_panel 244 tab_panel = self.host.panel.tab_panel
241 if tab_panel.getWidgetCount() > 1: 245 if tab_panel.getWidgetCount() > 1: