changeset 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 e15d8a01cf6a
children bc811915a96a
files frontends/src/primitivus/chat.py frontends/src/primitivus/constants.py
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Fri Sep 05 19:29:30 2014 +0200
+++ b/frontends/src/primitivus/chat.py	Fri Sep 05 19:29:30 2014 +0200
@@ -73,7 +73,10 @@
             else:
                 render_txt.append(('my_nick' if self.my_mess else 'other_nick',"[%s] " % self.nick))
         render_txt.append(self.message)
-        return urwid.Text(render_txt, align=self.align)
+        txt_widget = urwid.Text(render_txt, align=self.align)
+        if self.is_info:
+            return urwid.AttrMap(txt_widget, 'info_msg')
+        return txt_widget
 
 
 class Chat(urwid.WidgetWrap, QuickChat):
--- a/frontends/src/primitivus/constants.py	Fri Sep 05 19:29:30 2014 +0200
+++ b/frontends/src/primitivus/constants.py	Fri Sep 05 19:29:30 2014 +0200
@@ -35,6 +35,7 @@
                ('date', 'light gray', 'default'),
                ('my_nick', 'dark red,bold', 'default'),
                ('other_nick', 'dark cyan,bold', 'default'),
+               ('info_msg', 'yellow', 'default', 'bold'),
                ('menubar', 'light gray,bold', 'dark red'),
                ('menubar_focus', 'light gray,bold', 'dark green'),
                ('selected_menu', 'light gray,bold', 'dark green'),