diff src/browser/sat_browser/blog.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 63697f082e8a
children 2df91d0308ac
line wrap: on
line diff
--- a/src/browser/sat_browser/blog.py	Thu Feb 26 13:10:46 2015 +0100
+++ b/src/browser/sat_browser/blog.py	Thu Feb 26 18:10:54 2015 +0100
@@ -41,10 +41,10 @@
 from time import time
 
 import html_tools
-import base_panels
 import dialog
-import base_widget
 import richtext
+import editor_widget
+import libervia_widget
 from constants import Const as C
 from sat_frontends.quick_frontend import quick_widgets
 from sat_frontends.tools import jid
@@ -233,7 +233,7 @@
                 options = [] if self.empty else ['update_msg']
             self.bubble = richtext.RichTextEditor(self._blog_panel.host, content, self.__modifiedCb, self.__afterEditCb, options)
         else:  # assume raw text message have no title
-            self.bubble = base_panels.LightTextEditor(content, self.__modifiedCb, self.__afterEditCb, options={'no_xhtml': True})
+            self.bubble = editor_widget.LightTextEditor(content, self.__modifiedCb, self.__afterEditCb, options={'no_xhtml': True})
         self.bubble.addStyleName("bubble")
         try:
             self.toggle_syntax_button.removeFromParent()
@@ -355,7 +355,7 @@
             self._blog_panel.host.bridge.call('syntaxConvert', setBubble, text, C.SYNTAX_TEXT, C.SYNTAX_XHTML)
 
 
-class MicroblogPanel(quick_widgets.QuickWidget, base_widget.LiberviaWidget):
+class MicroblogPanel(quick_widgets.QuickWidget, libervia_widget.LiberviaWidget):
     warning_msg_public = "This message will be <b>PUBLIC</b> and everybody will be able to see it, even people you don't know"
     warning_msg_group = "This message will be published for all the people of the group <span class='warningTarget'>%s</span>"
     # FIXME: all the generic parts must be moved to quick_frontends
@@ -367,7 +367,7 @@
         """
         self.setAcceptedGroup(accepted_groups)
         quick_widgets.QuickWidget.__init__(self, host, self.target, C.PROF_KEY_NONE)
-        base_widget.LiberviaWidget.__init__(self, host, ", ".join(accepted_groups), selectable=True)
+        libervia_widget.LiberviaWidget.__init__(self, host, ", ".join(accepted_groups), selectable=True)
         self.entries = {}
         self.comments = {}
         self.selected_entry = None
@@ -735,7 +735,7 @@
         return False
 
 
-base_widget.LiberviaWidget.addDropKey("GROUP", MicroblogPanel.onGroupDrop)
+libervia_widget.LiberviaWidget.addDropKey("GROUP", MicroblogPanel.onGroupDrop)
 
 # Needed for the drop keys to not be mixed between meta panel and panel for "Contacts" group
-base_widget.LiberviaWidget.addDropKey("CONTACT_TITLE", lambda host, item: MicroblogPanel.onGroupDrop(host, None))
+libervia_widget.LiberviaWidget.addDropKey("CONTACT_TITLE", lambda host, item: MicroblogPanel.onGroupDrop(host, None))