diff options
author | mberezhnoy <mberezhnoy@productengine.com> | 2013-02-06 10:03:42 +0200 |
---|---|---|
committer | mberezhnoy <mberezhnoy@productengine.com> | 2013-02-06 10:03:42 +0200 |
commit | 3781615afa6db7289f26f404885ac614c7f1cee0 (patch) | |
tree | 7dd2cade0b1a59210a9089d31820cf75e089e0cf /indra/newview/llconversationloglist.cpp | |
parent | 2fe6fce0183904936a3af7d9ce707b60b34895d1 (diff) |
CHUI-597 (Messages shown in Conversation Log are inaccurate)
Added messages, for now they're displayed in two cases:
1) no log entries, logging disabled
2) no log entries, logging enabled
Case when there are existing log entries and
logging is disabled is still under discussion
Diffstat (limited to 'indra/newview/llconversationloglist.cpp')
-rw-r--r-- | indra/newview/llconversationloglist.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index 6dbcb7bef7..96b225b841 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -33,6 +33,7 @@ #include "llconversationloglist.h" #include "llconversationloglistitem.h" #include "llviewermenu.h" +#include "lltrans.h" static LLDefaultChildRegistry::Register<LLConversationLogList> r("conversation_log_list"); @@ -200,8 +201,9 @@ void LLConversationLogList::rebuildList() clear(); bool have_filter = !mNameFilter.empty(); + LLConversationLog &log_instance = LLConversationLog::instance(); - const std::vector<LLConversation>& conversations = LLConversationLog::instance().getConversations(); + const std::vector<LLConversation>& conversations = log_instance.getConversations(); std::vector<LLConversation>::const_iterator iter = conversations.begin(); for (; iter != conversations.end(); ++iter) @@ -212,6 +214,26 @@ void LLConversationLogList::rebuildList() addNewItem(&*iter); } + + + bool logging_enabled = log_instance.getIsLoggingEnabled(); + bool log_empty = log_instance.isLogEmpty(); + if (!logging_enabled && log_empty) + { + setNoItemsCommentText(LLTrans::getString("logging_calls_disabled_log_empty")); + } + else if (!logging_enabled && !log_empty) + { + setNoItemsCommentText(LLTrans::getString("logging_calls_disabled_log_not_empty")); + } + else if (logging_enabled && log_empty) + { + setNoItemsCommentText(LLTrans::getString("logging_calls_enabled_log_empty")); + } + else if (logging_enabled && !log_empty) + { + setNoItemsCommentText(""); + } } void LLConversationLogList::onCustomAction(const LLSD& userdata) |