Mercurial > libervia-web
diff src/browser/sat_browser/chat.py @ 696:c2f22ca12e23
browser and server side: remove unibox
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 20 Apr 2015 08:51:25 +0200 |
parents | 3845a086f0b3 |
children | b395d1309936 |
line wrap: on
line diff
--- a/src/browser/sat_browser/chat.py Sun Apr 19 13:10:41 2015 +0200 +++ b/src/browser/sat_browser/chat.py Mon Apr 20 08:51:25 2015 +0200 @@ -119,7 +119,12 @@ self.addStyleName('chatPanel') self.setWidget(self.vpanel) self.chat_state_machine = plugin_xep_0085.ChatStateMachine(self.host, unicode(self.target)) - self.refresh() + + self.message_box = editor_widget.MessageBox(self.host) + self.message_box.onSelectedChange(self) + self.message_box.addKeyboardListener(self) + self.vpanel.add(self.message_box) + if type_ == C.CHAT_ONE2ONE: self.historyPrint(profile=self.profile) @@ -153,22 +158,6 @@ # _new_panel.refresh() # return _new_panel - def refresh(self): # FIXME: not needed anymore since unibox has been removed - """Refresh the display of this widget. If the unibox is disabled, - add a message box at the bottom of the panel""" - # FIXME: must be checked - # self.host.contact_panel.setContactMessageWaiting(self.target.bare, False) - # self.content_scroll.scrollToBottom() - - enable_box = self.host.uni_box is None - if hasattr(self, 'message_box'): - self.message_box.setVisible(enable_box) - elif enable_box: - self.message_box = editor_widget.MessageBox(self.host) - self.message_box.onSelectedChange(self) - self.message_box.addKeyboardListener(self) - self.vpanel.add(self.message_box) - def onKeyDown(self, sender, keycode, modifiers): if keycode == KEY_ENTER: self.host.showWarning(None, None)