# HG changeset patch # User Goffi # Date 1439679694 -7200 # Node ID c74015dc2785ce7580965fcbd6d0f401ed11eec5 # Parent 9fce331ba0fdee9e6a0191279be816764e8ba807 quick_frontend: minor fixes diff -r 9fce331ba0fd -r c74015dc2785 frontends/src/quick_frontend/quick_chat.py --- a/frontends/src/quick_frontend/quick_chat.py Sun Aug 16 01:00:54 2015 +0200 +++ b/frontends/src/quick_frontend/quick_chat.py Sun Aug 16 01:01:34 2015 +0200 @@ -29,7 +29,7 @@ # FIXME: to be removed when an acceptable solution is here unicode('') # XXX: unicode doesn't exist in pyjamas except (TypeError, AttributeError): # Error raised is not the same depending on pyjsbuild options - unicode = lambda x: str(x) + unicode = str class QuickChat(quick_widgets.QuickWidget): diff -r 9fce331ba0fd -r c74015dc2785 frontends/src/quick_frontend/quick_contact_list.py --- a/frontends/src/quick_frontend/quick_contact_list.py Sun Aug 16 01:00:54 2015 +0200 +++ b/frontends/src/quick_frontend/quick_contact_list.py Sun Aug 16 01:01:34 2015 +0200 @@ -134,17 +134,18 @@ result.setdefault(entity, set()).add(group) return result + def _gotContacts(self, contacts): + for contact in contacts: + self.host.newContactHandler(*contact, profile=self.profile) + def fill(self): """Get all contacts from backend, and fill the widget Contacts will be cleared before refilling them """ self.clearContacts(keep_cache=True) - def gotContacts(contacts): - for contact in contacts: - self.host.newContactHandler(*contact, profile=self.profile) - self.host.bridge.getContacts(self.profile, callback=gotContacts) + self.host.bridge.getContacts(self.profile, callback=self._gotContacts) def update(self): """Update the display when something changed"""