# HG changeset patch # User Goffi # Date 1469375778 -7200 # Node ID 7aa58b7a47e225ea5cb983f38e991a64f7cafda8 # Parent f09562b0704d0622ffb6604d61d280b7572301fa quick_frontend, primitivus (contact_list): ContactList widget must now call postInit() when ready, to avoid being registered before being constructed diff -r f09562b0704d -r 7aa58b7a47e2 frontends/src/primitivus/contact_list.py --- a/frontends/src/primitivus/contact_list.py Sun Jul 24 17:56:14 2016 +0200 +++ b/frontends/src/primitivus/contact_list.py Sun Jul 24 17:56:18 2016 +0200 @@ -51,6 +51,7 @@ urwid.connect_signal(self, 'change', on_change, user_data) self.host.addListener('notification', self.onNotification, [self.profile]) self.host.addListener('notificationsClear', self.onNotification, [self.profile]) + self.postInit() def update(self, entities=None, type_=None, profile=None): """Update display, keep focus""" diff -r f09562b0704d -r 7aa58b7a47e2 frontends/src/quick_frontend/quick_contact_list.py --- a/frontends/src/quick_frontend/quick_contact_list.py Sun Jul 24 17:56:14 2016 +0200 +++ b/frontends/src/quick_frontend/quick_contact_list.py Sun Jul 24 17:56:18 2016 +0200 @@ -821,7 +821,6 @@ def __init__(self, host, profiles): super(QuickContactList, self).__init__(host, None, profiles) - handler.register(self) # options # for next values, None means use indivual value per profile @@ -831,6 +830,10 @@ self.show_resources = None # TODO self.show_status = None # TODO + def postInit(self): + """Method to be called by frontend after widget is initialised""" + handler.register(self) + @property def items(self): return handler.items