diff src/browser/libervia_main.py @ 909:e8b133b77aa4

browser, server: update to get compatibility with 0.7-dev (not finished): Q&D update to restore compatibility - version changed to 0.7D - contact list has been modified to be compatible with changes, but it doesn't take profit of improvment yet - messageSend partially work, there is a disconnection and an error in console logs when sending a message - message are not received yet
author Goffi <goffi@goffi.org>
date Tue, 09 Aug 2016 01:07:15 +0200
parents 54f6c5b86a87
children 58f611481e6d
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Wed Jul 13 22:45:54 2016 +0200
+++ b/src/browser/libervia_main.py	Tue Aug 09 01:07:15 2016 +0200
@@ -366,10 +366,15 @@
     def profilePlugged(self, dummy):
         self._profile_plugged = True
         QuickApp.profilePlugged(self, C.PROF_KEY_NONE)
+        contact_list = self.widgets.getOrCreateWidget(ContactList, None, on_new_widget=None, profile=C.PROF_KEY_NONE)
+        self.panel.addContactList(contact_list)
+
+        # FIXME: the contact list height has to be set manually the first time
+        self.resize()
+
         # XXX: as contact_list.update() is slow and it's called a lot of time
         #      during profile plugging, we prevent it before it's plugged
         #      and do all at once now
-        contact_list = self.contact_list
         contact_list.update()
 
         try:
@@ -404,16 +409,7 @@
 
         def gotDefaultMUC(default_muc):
             self.default_muc = default_muc
-        self.bridge.getDefaultMUC(profile=None, callback=gotDefaultMUC)
-
-    def addContactList(self, dummy):
-        contact_list = ContactList(self)
-        self.panel.addContactList(contact_list)
-
-        # FIXME: the contact list height has to be set manually the first time
-        self.resize()
-
-        return contact_list
+        self.bridge.mucGetDefaultService(profile=None, callback=gotDefaultMUC)
 
     def newWidget(self, wid):
         log.debug(u"newWidget: {}".format(wid))