comparison frontends/src/primitivus/chat.py @ 1173:cae023216bba

primivitus: info messages now use "info_msg" attribute (yellow)
author Goffi <goffi@goffi.org>
date Fri, 05 Sep 2014 19:29:30 +0200
parents c0f15e52695a
children 69aace10b46d
comparison
equal deleted inserted replaced
1172:e15d8a01cf6a 1173:cae023216bba
71 if self.parent.show_short_nick: 71 if self.parent.show_short_nick:
72 render_txt.append(('my_nick' if self.my_mess else 'other_nick',"**" if self.my_mess else "*")) 72 render_txt.append(('my_nick' if self.my_mess else 'other_nick',"**" if self.my_mess else "*"))
73 else: 73 else:
74 render_txt.append(('my_nick' if self.my_mess else 'other_nick',"[%s] " % self.nick)) 74 render_txt.append(('my_nick' if self.my_mess else 'other_nick',"[%s] " % self.nick))
75 render_txt.append(self.message) 75 render_txt.append(self.message)
76 return urwid.Text(render_txt, align=self.align) 76 txt_widget = urwid.Text(render_txt, align=self.align)
77 if self.is_info:
78 return urwid.AttrMap(txt_widget, 'info_msg')
79 return txt_widget
77 80
78 81
79 class Chat(urwid.WidgetWrap, QuickChat): 82 class Chat(urwid.WidgetWrap, QuickChat):
80 83
81 def __init__(self, target, host, type_='one2one'): 84 def __init__(self, target, host, type_='one2one'):