Mercurial > libervia-web
changeset 787:b2a75a103aac
browser side (contact list): fixed a traceback on mouse enter/leave + bad attribute name
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 02 Dec 2015 11:15:55 +0100 |
parents | f0ad3f62bae2 |
children | 7ebde6d1a4bd |
files | src/browser/sat_browser/contact_list.py src/browser/sat_browser/contact_panel.py |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/browser/sat_browser/contact_list.py Tue Dec 01 23:57:28 2015 +0100 +++ b/src/browser/sat_browser/contact_list.py Wed Dec 02 11:15:55 2015 +0100 @@ -211,14 +211,14 @@ def onMouseEnter(self, sender): if isinstance(sender, GroupLabel): jids = self.getGroupData(sender.group, "jids") - for contact in self._contacts_panel: + for contact in self._contacts_panel.getBoxes(): if contact.jid in jids: contact.label.addStyleName("selected") def onMouseLeave(self, sender): if isinstance(sender, GroupLabel): jids = self.getGroupData(sender.group, "jids") - for contact in self._contacts_panel: + for contact in self._contacts_panel.getBoxes(): if contact.jid in jids: contact.label.removeStyleName("selected")
--- a/src/browser/sat_browser/contact_panel.py Tue Dec 01 23:57:28 2015 +0100 +++ b/src/browser/sat_browser/contact_panel.py Wed Dec 02 11:15:55 2015 +0100 @@ -81,8 +81,14 @@ @return (list[jid.JID]): full jids or bare jids if self.merge_resources is True """ - return self.contacts.keys() + return self._contacts.keys() + def getBoxes(self): + """Return ContactBox present in the panel + + @return (list[ContactBox]): boxes of the contacts + """ + return self._contacts.itervalues() def clear(self): """Clear all contacts."""