diff options
author | mathieui <mathieui@mathieui.net> | 2015-04-13 17:32:35 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-04-13 17:35:40 +0200 |
commit | 91fde24388c97d5f74b1b68d5ada7f69725ab964 (patch) | |
tree | 340a64563b9ce98f26d26e817200da325e2f146f /src/tabs | |
parent | 1c9257b4a28e88c7f575e70939367fc9175ad53c (diff) | |
download | poezio-91fde24388c97d5f74b1b68d5ada7f69725ab964.tar.gz poezio-91fde24388c97d5f74b1b68d5ada7f69725ab964.tar.bz2 poezio-91fde24388c97d5f74b1b68d5ada7f69725ab964.tar.xz poezio-91fde24388c97d5f74b1b68d5ada7f69725ab964.zip |
Display error messages inside a conversation
if the error has the same id as a sent message, it will be displayed
with a cross where there is usually a checkmark (ack), and the
received error will be appended to the message, in red.
if it does not have a know id, it will be added as another message to
the conversation, without a nick, and in red.
Diffstat (limited to 'src/tabs')
-rw-r--r-- | src/tabs/basetabs.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tabs/basetabs.py b/src/tabs/basetabs.py index 16752b5e..184a9243 100644 --- a/src/tabs/basetabs.py +++ b/src/tabs/basetabs.py @@ -747,6 +747,17 @@ class OneToOneTab(ChatTab): self.text_win.modify_message(msg_id, new_msg) self.core.refresh_window() + def nack_message(self, error, msg_id, msg_jid): + """ + Ack a message + """ + new_msg = self._text_buffer.nack_message(error, msg_id, msg_jid) + if new_msg: + self.text_win.modify_message(msg_id, new_msg) + self.core.refresh_window() + return True + return False + @command_args_parser.raw def command_xhtml(self, xhtml_data): message = self.generate_xhtml_message(xhtml_data) |