wix: chat: date is now printed in grey

This commit is contained in:
Goffi 2010-07-08 18:29:44 +08:00
commit bad54b993d

View file

@ -215,7 +215,7 @@ class Chat(wx.Frame, QuickChat):
_font_bold = wx.Font(self.font["points"], self.font["family"], wx.NORMAL, wx.BOLD)
_font_normal = wx.Font(self.font["points"], self.font["family"], wx.NORMAL, wx.NORMAL)
_font_italic = wx.Font(self.font["points"], self.font["family"], wx.ITALIC if mymess else wx.NORMAL, wx.NORMAL)
self.chatWindow.SetDefaultStyle(wx.TextAttr("BLACK", font=_font_normal))
self.chatWindow.SetDefaultStyle(wx.TextAttr("GREY", font=_font_normal))
msg_time = time.localtime(timestamp or None)
time_format = "%c" if msg_time < self.day_change else "%H:%M" #if the message was sent before today, we print the full date
self.chatWindow.AppendText("[%s]" % time.strftime(time_format, msg_time ))