From 213c617780ecc62efbb28daad58065cd1ff5151b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 16 Jun 2005 19:14:07 +0000 Subject: [PATCH] messages for us in gc are now bold and colored (thx Liorothiel) --- src/chat.py | 7 ++++++- src/common/config.py | 1 + src/groupchat_window.py | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/chat.py b/src/chat.py index 1163b58dc..9f97705e4 100644 --- a/src/chat.py +++ b/src/chat.py @@ -271,7 +271,12 @@ class Chat: self.tagStatus[jid] = conversation_buffer.create_tag('status') color = gajim.config.get('statusmsgcolor') self.tagStatus[jid].set_property('foreground', color) - + + tag = conversation_buffer.create_tag('marked') + color = gajim.config.get('markedmsgcolor') + tag.set_property('foreground', color) + tag.set_property('weight', pango.WEIGHT_BOLD) + tag = conversation_buffer.create_tag('time_sometimes') tag.set_property('foreground', '#9e9e9e') tag.set_property('scale', pango.SCALE_SMALL) diff --git a/src/common/config.py b/src/common/config.py index 31384f061..13ca248c3 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -59,6 +59,7 @@ class Config: 'inmsgcolor': [ opt_color, '#a34526' ], 'outmsgcolor': [ opt_color, '#164e6f' ], 'statusmsgcolor': [ opt_color, '#1eaa1e' ], + 'markedmsgcolor': [ opt_color, '#ff8080' ], 'collapsed_rows': [ opt_str, '' ], 'roster_theme': [ opt_str, 'green' ], 'saveposition': [ opt_bool, True ], diff --git a/src/groupchat_window.py b/src/groupchat_window.py index e0880ef4d..005d8b356 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -471,6 +471,7 @@ class GroupchatWindow(chat.Chat): if contact is set: it's a message from someone if contact is not set: it's a message from the server""" other_tags_for_name = [] + other_tags_for_text = [] if contact: if contact == self.nicks[room_jid]: kind = 'outgoing' @@ -483,9 +484,10 @@ class GroupchatWindow(chat.Chat): text.lower().split() or self.nicks[room_jid].lower() + ',' in \ text.lower().split()): other_tags_for_name.append('bold') + other_tags_for_text.append('marked') chat.Chat.print_conversation_line(self, text, room_jid, kind, contact, - tim, other_tags_for_name) + tim, other_tags_for_name, [], other_tags_for_text) def kick(self, widget, room_jid, nick): """kick a user"""