From 37e547b67d262c5007e0beee703e578d6f3073bf Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 3 Dec 2009 13:46:04 +0200 Subject: no ticket. system messages where without time after changeset 5886:8987aefb8b91 --HG-- branch : product-engine --- indra/newview/llnearbychat.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llnearbychat.cpp') diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index fda3df43ae..18e5169930 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -58,6 +58,7 @@ #include "llbottomtray.h" #include "llnearbychatbar.h" #include "llfloaterreg.h" +#include "lltrans.h" static const S32 RESIZE_BAR_THICKNESS = 3; @@ -131,6 +132,21 @@ void LLNearbyChat::applySavedVariables() } } +std::string appendTime() +{ + time_t utc_time; + utc_time = time_corrected(); + std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" + +LLTrans::getString("TimeMin")+"] "; + + LLSD substitution; + + substitution["datetime"] = (S32) utc_time; + LLStringUtil::format (timeStr, substitution); + + return timeStr; +} + void LLNearbyChat::addMessage(const LLChat& chat,bool archive) { @@ -153,6 +169,11 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive) } } + LLChat& tmp_chat = const_cast(chat); + + if(tmp_chat.mTimeStr.empty()) + tmp_chat.mTimeStr = appendTime(); + bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory"); if (!chat.mMuted) -- cgit v1.3