summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/tabs.py b/src/tabs.py
index c396c270..8d4e6447 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -395,7 +395,6 @@ class MucTab(ChatTab):
self.ignores = [] # set of Users
# keys
self.key_func['^I'] = self.completion
- self.key_func['M-i'] = self.completion
self.key_func['M-u'] = self.scroll_user_list_down
self.key_func['M-y'] = self.scroll_user_list_up
# commands
@@ -919,7 +918,7 @@ class MucTab(ChatTab):
if status:
leave_msg += ' (%s)' % status
room.add_message(leave_msg)
- self.refresh_window()
+ self.core.refresh_window()
self.core.on_user_left_private_conversation(from_room, from_nick, status)
def on_user_change_status(self, room, user, from_nick, from_room, affiliation, role, show, status):
@@ -979,7 +978,6 @@ class PrivateTab(ChatTab):
self.input = windows.MessageInput()
# keys
self.key_func['^I'] = self.completion
- self.key_func['M-i'] = self.completion
# commands
self.commands['unquery'] = (self.command_unquery, _("Usage: /unquery\nUnquery: close the tab"), None)
self.commands['part'] = (self.command_unquery, _("Usage: /part\Part: close the tab"), None)
@@ -991,7 +989,11 @@ class PrivateTab(ChatTab):
def command_say(self, line):
msg = self.core.xmpp.make_message(self.get_name())
msg['type'] = 'chat'
- msg['body'] = line
+ if line.find('\x19') == -1:
+ msg['body'] = line
+ else:
+ 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'] = 'active'
msg.send()
@@ -1119,7 +1121,6 @@ class RosterInfoTab(Tab):
self.input = self.default_help_message
self.set_color_state(theme.COLOR_TAB_NORMAL)
self.key_func['^I'] = self.completion
- self.key_func['M-i'] = self.completion
self.key_func[' '] = self.on_space
self.key_func["/"] = self.on_slash
self.key_func["KEY_UP"] = self.move_cursor_up
@@ -1466,7 +1467,6 @@ class ConversationTab(ChatTab):
self.input = windows.MessageInput()
# keys
self.key_func['^I'] = self.completion
- self.key_func['M-i'] = self.completion
# commands
self.commands['unquery'] = (self.command_unquery, _("Usage: /unquery\nUnquery: close the tab"), None)
self.commands['part'] = (self.command_unquery, _("Usage: /part\Part: close the tab"), None)
@@ -1478,7 +1478,11 @@ class ConversationTab(ChatTab):
def command_say(self, line):
msg = self.core.xmpp.make_message(self.get_name())
msg['type'] = 'chat'
- msg['body'] = line
+ if line.find('\x19') == -1:
+ msg['body'] = line
+ else:
+ 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'] = 'active'
msg.send()
@@ -1594,7 +1598,6 @@ class MucListTab(Tab):
self.key_func["KEY_DOWN"] = self.listview.move_cursor_down
self.key_func["KEY_UP"] = self.listview.move_cursor_up
self.key_func['^I'] = self.completion
- self.key_func['M-i'] = self.completion
self.key_func["/"] = self.on_slash
self.key_func['j'] = self.join_selected
self.key_func['J'] = self.join_selected_no_focus