diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2012-12-26 01:50:11 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2012-12-29 13:14:50 +0100 |
commit | 590afbd4bcc8c9e3f04dd46d7747959290e71f51 (patch) | |
tree | e24cd224aa43221c0701856e30b76df668728e4c /src/tabs.py | |
parent | dc4e0302b493491f6b7c565bfe5aa99af3483f61 (diff) | |
download | poezio-590afbd4bcc8c9e3f04dd46d7747959290e71f51.tar.gz poezio-590afbd4bcc8c9e3f04dd46d7747959290e71f51.tar.bz2 poezio-590afbd4bcc8c9e3f04dd46d7747959290e71f51.tar.xz poezio-590afbd4bcc8c9e3f04dd46d7747959290e71f51.zip |
Fix /correct and /me highlights, and handle /correct a bit better.
Diffstat (limited to 'src/tabs.py')
-rw-r--r-- | src/tabs.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/tabs.py b/src/tabs.py index 037d591f..d9dae765 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -590,11 +590,6 @@ class ChatTab(Tab): def completion_correct(self, the_input): return the_input.auto_completion([self.last_sent_message['body']], '', quotify=False) - def modify_message(self, txt, old_id, new_id): - self._text_buffer.modify_message(txt, old_id, new_id) - self.text_win.rebuild_everything(self._text_buffer) - self.core.refresh_window() - @property def inactive(self): """Whether we should send inactive or active as a chatstate""" @@ -1641,6 +1636,14 @@ class MucTab(ChatTab): self._text_buffer.add_message(txt, time, nickname, nick_color, history, user, highlight=highlight, identifier=identifier) return highlight + def modify_message(self, txt, old_id, new_id, time=None, nickname=None): + self.log_message(txt, time, nickname) + highlight = self.do_highlight(txt, time, nickname) + self._text_buffer.modify_message(txt, old_id, new_id, highlight=highlight, time=time) + self.text_win.rebuild_everything(self._text_buffer) + self.core.refresh_window() + return highlight + def matching_names(self): return [safeJID(self.get_name()).user] |