From 17e5411d8f050a3c5e5bcd010551eecac96b5911 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 7 Nov 2011 19:47:16 +0100 Subject: use only full color mode when sending messages. Simple color mode should never be used in any part of the code except inside the input. --- src/tabs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tabs.py b/src/tabs.py index 7a968740..cae188ae 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -323,7 +323,7 @@ class ChatTab(Tab): if not self.execute_command(clean_text): if txt.startswith('//'): txt = txt[1:] - self.command_say(txt) + self.command_say(xhtml.convert_simple_to_full_colors(txt)) self.cancel_paused_delay() def send_chat_state(self, state, always_send=False): @@ -601,7 +601,7 @@ class MucTab(ChatTab): r = self.core.open_private_window(self.name, user.nick) if r and len(args) > 1: msg = arg[len(nick)+1:] - self.core.current_tab().command_say(msg) + self.core.current_tab().command_say(xhtml.convert_simple_to_full_colors(msg)) if not r: self.core.information(_("Cannot find user: %s" % nick), 'Error') @@ -718,7 +718,7 @@ class MucTab(ChatTab): if line.find('\x19') == -1: msg['body'] = line else: - msg['body'] = xhtml.clean_text_simple(line) + msg['body'] = xhtml.clean_text(line) msg['xhtml_im'] = xhtml.poezio_colors_to_html(line) if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False: msg['chat_state'] = needed @@ -1211,7 +1211,7 @@ class PrivateTab(ChatTab): if line.find('\x19') == -1: msg['body'] = line else: - msg['body'] = xhtml.clean_text_simple(line) + msg['body'] = xhtml.clean_text(line) msg['xhtml_im'] = xhtml.poezio_colors_to_html(line) if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False: needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active' @@ -1875,7 +1875,7 @@ class ConversationTab(ChatTab): if line.find('\x19') == -1: msg['body'] = line else: - msg['body'] = xhtml.clean_text_simple(line) + msg['body'] = xhtml.clean_text(line) msg['xhtml_im'] = xhtml.poezio_colors_to_html(line) if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False: needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active' -- cgit v1.2.3