diff browser_side/panels.py @ 404:c393e7dc9ae6

browser_side: refactorize SimpleTextEditor init parameters
author souliane <souliane@mailoo.org>
date Sat, 15 Mar 2014 00:21:04 +0100
parents d7e78cb78dfc
children 6a6551de4414
line wrap: on
line diff
--- a/browser_side/panels.py	Fri Mar 14 21:00:13 2014 +0100
+++ b/browser_side/panels.py	Sat Mar 15 00:21:04 2014 +0100
@@ -526,7 +526,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 = LightTextEditor(content, self.__modifiedCb, self.__afterEditCb, single_line=True, listen_focus=False)
+            self.bubble = LightTextEditor(content, self.__modifiedCb, self.__afterEditCb, options={'no_xhtml': True})
         self.bubble.setStyleName("bubble")
         try:
             self.toggle_syntax_button.removeFromParent()
@@ -951,7 +951,7 @@
     def __init__(self, host, status=''):
         self.host = host
         modifiedCb = lambda content: self.host.bridge.call('setStatus', None, self.host.status_panel.presence, content['text']) or True
-        HTMLTextEditor.__init__(self, {'text': status}, modifiedCb, None, single_line=True, listen_click=True)
+        HTMLTextEditor.__init__(self, {'text': status}, modifiedCb, options={'no_xhtml': True, 'listen_focus': True, 'listen_click': True})
         self.edit(False)
         self.setStyleName('statusPanel')