Mercurial > libervia-web
diff src/browser/sat_browser/chat.py @ 697:b395d1309936
browser_side: clean the code that has been commented or isolated during the refactorisation to base libervia on quick_frontend
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 20 Apr 2015 09:14:03 +0200 |
parents | c2f22ca12e23 |
children | 78e4a79fbb5e |
line wrap: on
line diff
--- a/src/browser/sat_browser/chat.py Mon Apr 20 08:51:25 2015 +0200 +++ b/src/browser/sat_browser/chat.py Mon Apr 20 09:14:03 2015 +0200 @@ -147,17 +147,6 @@ def plugin_menu_context(self): return (C.MENU_ROOM,) if self.type == C.CHAT_GROUP else (C.MENU_SINGLE,) - # @classmethod - # def createPanel(cls, host, item, type_=C.CHAT_ONE2ONE): - # assert(item) - # _contact = item if isinstance(item, jid.JID) else jid.JID(item) - # host.contact_panel.setContactMessageWaiting(_contact.bare, False) - # _new_panel = Chat(host, _contact, type_) # XXX: pyjamas doesn't seems to support creating with cls directly - # _new_panel.historyPrint() - # host.setSelected(_new_panel) - # _new_panel.refresh() - # return _new_panel - def onKeyDown(self, sender, keycode, modifiers): if keycode == KEY_ENTER: self.host.showWarning(None, None) @@ -214,21 +203,6 @@ self.host.removeListener('presence', self.presenceListener) self.host.bridge.call('mucLeave', None, unicode(self.target.bare)) - # def historyPrint(self, size=C.HISTORY_LIMIT_DEFAULT): - # """Print the initial history""" - # def getHistoryCB(history): - # # display day change - # day_format = "%A, %d %b %Y" - # previous_day = datetime.now().strftime(day_format) - # for line in history: - # timestamp, from_jid_s, to_jid_s, message, mess_type, extra = line - # message_day = datetime.fromtimestamp(float(timestamp or time())).strftime(day_format) - # if previous_day != message_day: - # self.printInfo("* " + message_day) - # previous_day = message_day - # self.printMessage(jid.JID(from_jid_s), message, extra, timestamp) - # self.host.bridge.call('getHistory', getHistoryCB, self.host.whoami.bare, self.target.bare, size, True) - def printInfo(self, msg, type_='normal', extra=None, link_cb=None): """Print general info @param msg: message to print