we now print restored message as grey and add an empty line at the end

This commit is contained in:
Yann Leboulanger 2005-06-03 21:29:07 +00:00
parent c39e0e80e9
commit 8a3d23cf81
2 changed files with 12 additions and 1 deletions

View File

@ -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 = []):

View File

@ -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'])