diff src/browser/sat_browser/contact_list.py @ 616:1c0d5a87c554 frontends_multi_profiles

browser_side: add and use method displayWidget to harmonize widget's management in Libervia (not completely done, there are some issues)
author souliane <souliane@mailoo.org>
date Wed, 11 Feb 2015 11:18:13 +0100
parents 14bdf5394ae9
children 5baca9d46c34
line wrap: on
line diff
--- a/src/browser/sat_browser/contact_list.py	Tue Feb 10 20:52:02 2015 +0100
+++ b/src/browser/sat_browser/contact_list.py	Wed Feb 11 11:18:13 2015 +0100
@@ -35,9 +35,9 @@
 from sat_frontends.tools import jid
 from constants import Const as C
 import base_widget
-import panels
 import html_tools
 import chat
+import blog
 
 
 unicode = str # XXX: pyjama doesn't manage unicode
@@ -83,7 +83,7 @@
         self.addClickListener(self)
 
     def onClick(self, sender):
-        self.host.getOrCreateLiberviaWidget(panels.MicroblogPanel, {'item': self.group})
+        self.host.displayWidget(blog.MicroblogPanel, self.group)
 
 
 class ContactLabel(HTML):
@@ -219,7 +219,7 @@
 
         if handle_click:
             def cb(contact_jid):
-                host.widgets.getOrCreateWidget(chat.Chat, contact_jid, type_=C.CHAT_ONE2ONE, profile=C.PROF_KEY_NONE)
+                host.displayWidget(chat.Chat, contact_jid, type_=C.CHAT_ONE2ONE)
             self.click_listener = cb
 
     def add(self, jid_, name=None):
@@ -314,7 +314,7 @@
         self.addClickListener(self)
 
     def onClick(self, sender):
-        self.host.getOrCreateLiberviaWidget(panels.MicroblogPanel, {'item': None})
+        self.host.displayWidget(blog.MicroblogPanel, None)
 
 
 class ContactList(SimplePanel, QuickContactList):