diff frontends/src/quick_frontend/quick_contact_list.py @ 2017:7aa58b7a47e2

quick_frontend, primitivus (contact_list): ContactList widget must now call postInit() when ready, to avoid being registered before being constructed
author Goffi <goffi@goffi.org>
date Sun, 24 Jul 2016 17:56:18 +0200
parents f09562b0704d
children d941fa9954f4
line wrap: on
line diff
--- 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