comparison src/browser/sat_browser/contact_panel.py @ 721:102bab805ec1

browser side(xmlui): basic JidsList implementation (read-only) using ContactsPanel, to fix params display
author Goffi <goffi@goffi.org>
date Fri, 21 Aug 2015 15:38:20 +0200
parents e86490a7c76e
children 76a9c074327b
comparison
equal deleted inserted replaced
720:bf0a7da558e8 721:102bab805ec1
24 log = getLogger(__name__) 24 log = getLogger(__name__)
25 from sat_frontends.tools import jid 25 from sat_frontends.tools import jid
26 26
27 from pyjamas.ui.VerticalPanel import VerticalPanel 27 from pyjamas.ui.VerticalPanel import VerticalPanel
28 28
29 import html_tools
30 import contact_widget 29 import contact_widget
31 from constants import Const as C 30 from constants import Const as C
32 31
33 32
34 class ContactsPanel(VerticalPanel): 33 class ContactsPanel(VerticalPanel):
70 69
71 @param contact_jid (jid.JID): contact JID 70 @param contact_jid (jid.JID): contact JID
72 @return: jid.JID 71 @return: jid.JID
73 """ 72 """
74 return contact_jid.bare if self.merge_resources else contact_jid 73 return contact_jid.bare if self.merge_resources else contact_jid
74
75 def getJids(self):
76 """Return jids present in the panel
77
78 @return (list[jid.JID]): full jids or bare jids if self.merge_resources is True
79 """
80 return self.contacts.keys()
81
75 82
76 def clear(self): 83 def clear(self):
77 """Clear all contacts.""" 84 """Clear all contacts."""
78 self._contacts.clear() 85 self._contacts.clear()
79 VerticalPanel.clear(self) 86 VerticalPanel.clear(self)