diff src/browser/sat_browser/contact_list.py @ 648:6d3142b782c3 frontends_multi_profiles

browser_side: classes reorganisation: - moved widgets in dedicated modules (base, contact, editor, libervia) and a widget module for single classes - same thing for panels (base, main, contact) - libervia_widget mix main panels and widget and drag n drop for technical reasons (see comments) - renamed WebPanel to WebWidget
author Goffi <goffi@goffi.org>
date Thu, 26 Feb 2015 18:10:54 +0100
parents e0021d571eef
children 2df91d0308ac
line wrap: on
line diff
--- a/src/browser/sat_browser/contact_list.py	Thu Feb 26 13:10:46 2015 +0100
+++ b/src/browser/sat_browser/contact_list.py	Thu Feb 26 18:10:54 2015 +0100
@@ -31,8 +31,8 @@
 from __pyjamas__ import doc
 
 from constants import Const as C
-import base_widget
-import base_panels
+import libervia_widget
+import contact_panel
 import blog
 import chat
 
@@ -70,7 +70,7 @@
     widget.presence_style = style
 
 
-class GroupLabel(base_widget.DragLabel, Label, ClickHandler):
+class GroupLabel(libervia_widget.DragLabel, Label, ClickHandler):
     def __init__(self, host, group):
         """
 
@@ -80,7 +80,7 @@
         self.group = group
         Label.__init__(self, group)  # , Element=DOM.createElement('div')
         self.setStyleName('group')
-        base_widget.DragLabel.__init__(self, group, "GROUP", host)
+        libervia_widget.DragLabel.__init__(self, group, "GROUP", host)
         ClickHandler.__init__(self)
         self.addClickListener(self)
 
@@ -133,13 +133,13 @@
         return self._groups
 
 
-class ContactsPanel(base_panels.ContactsPanel):
+class ContactsPanel(contact_panel.ContactsPanel):
     """The contact list that is displayed on the left side."""
 
     def __init__(self, parent):
         def on_click(contact_jid):
             self.host.displayWidget(chat.Chat, contact_jid, type_=C.CHAT_ONE2ONE)
-        base_panels.ContactsPanel.__init__(self, parent, on_click=on_click, handle_menu=True)
+        contact_panel.ContactsPanel.__init__(self, parent, on_click=on_click, handle_menu=True)
 
     def setState(self, jid_, type_, state):
         """Change the appearance of the contact, according to the state
@@ -161,12 +161,12 @@
             contact_box.setAlert(state)
 
 
-class ContactTitleLabel(base_widget.DragLabel, Label, ClickHandler):
+class ContactTitleLabel(libervia_widget.DragLabel, Label, ClickHandler):
 
     def __init__(self, host, text):
         Label.__init__(self, text)  # , Element=DOM.createElement('div')
         self.setStyleName('contactTitle')
-        base_widget.DragLabel.__init__(self, text, "CONTACT_TITLE", host)
+        libervia_widget.DragLabel.__init__(self, text, "CONTACT_TITLE", host)
         ClickHandler.__init__(self)
         self.addClickListener(self)