From 8a3d23cf8106455c97b3767ce43c5de46fcfb5bd Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 3 Jun 2005 21:29:07 +0000 Subject: [PATCH] we now print restored message as grey and add an empty line at the end --- src/chat.py | 9 +++++++++ src/tabbed_chat_window.py | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/chat.py b/src/chat.py index 0ed574748..46c6d5ea2 100644 --- a/src/chat.py +++ b/src/chat.py @@ -268,6 +268,9 @@ class Chat: tag = conversation_buffer.create_tag('small') tag.set_property('scale', pango.SCALE_SMALL) + tag = conversation_buffer.create_tag('grey') + tag.set_property('foreground', '#9e9e9e') + tag = conversation_buffer.create_tag('url') tag.set_property('foreground', '#0000ff') tag.set_property('underline', pango.UNDERLINE_SINGLE) @@ -652,6 +655,12 @@ class Chat: adjustment.set_value(0) return False + def print_empty_line(self, jid): + textview = self.xmls[jid].get_widget('conversation_textview') + buffer = textview.get_buffer() + end_iter = buffer.get_end_iter() + buffer.insert(end_iter, '\n') + def print_conversation_line(self, text, jid, kind, name, tim, other_tags_for_name = [], other_tags_for_time = [], other_tags_for_text = []): diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index e586284d5..bb27d7479 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -190,6 +190,8 @@ class Tabbed_chat_window(chat.Chat): #restore previous conversation self.restore_conversation(user.jid) + self.print_empty_line(user.jid) + #print queued messages if self.plugin.queues[self.account].has_key(user.jid): @@ -360,4 +362,4 @@ class Tabbed_chat_window(chat.Chat): text = ':'.join(msg[2:])[0:-1] #remove the latest \n self.print_conversation_line(text, jid, kind, name, tim, - ['small'], ['small'], ['small']) + ['small'], ['small', 'grey'], ['small', 'grey'])