summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llconversationlog.cpp5
-rw-r--r--indra/newview/llconversationlog.h5
-rw-r--r--indra/newview/llconversationloglist.cpp24
-rw-r--r--indra/newview/llfloaterconversationlog.cpp9
-rw-r--r--indra/newview/llfloaterconversationlog.h2
-rw-r--r--indra/newview/skins/default/xui/en/floater_conversation_log.xml3
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml11
7 files changed, 42 insertions, 17 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 7bd6ef8cd7..5f037549ab 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -187,7 +187,8 @@ void LLConversationLogFriendObserver::changed(U32 mask)
/************************************************************************/
LLConversationLog::LLConversationLog() :
- mAvatarNameCacheConnection()
+ mAvatarNameCacheConnection(),
+ mLoggingEnabled(false)
{
LLControlVariable * keep_log_ctrlp = gSavedSettings.getControl("KeepConversationLogTranscripts").get();
S32 log_mode = keep_log_ctrlp->getValue();
@@ -202,6 +203,7 @@ LLConversationLog::LLConversationLog() :
void LLConversationLog::enableLogging(S32 log_mode)
{
+ mLoggingEnabled = log_mode > 0;
if (log_mode > 0)
{
LLIMMgr::instance().addSessionObserver(this);
@@ -217,7 +219,6 @@ void LLConversationLog::enableLogging(S32 log_mode)
LLIMMgr::instance().removeSessionObserver(this);
mNewMessageSignalConnection.disconnect();
LLAvatarTracker::instance().removeObserver(mFriendObserver);
- mConversations.clear();
}
notifyObservers();
diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h
index 65a18c02e5..d5b6eccb29 100644
--- a/indra/newview/llconversationlog.h
+++ b/indra/newview/llconversationlog.h
@@ -141,6 +141,9 @@ public:
void onClearLog();
void onClearLogResponse(const LLSD& notification, const LLSD& response);
+ bool getIsLoggingEnabled() { return mLoggingEnabled; }
+ bool isLogEmpty() { return mConversations.empty(); }
+
private:
LLConversationLog();
@@ -187,6 +190,8 @@ private:
boost::signals2::connection mNewMessageSignalConnection;
boost::signals2::connection mAvatarNameCacheConnection;
+
+ bool mLoggingEnabled;
};
class LLConversationLogObserver
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)
diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp
index 07723ce44d..4c910c5655 100644
--- a/indra/newview/llfloaterconversationlog.cpp
+++ b/indra/newview/llfloaterconversationlog.cpp
@@ -63,10 +63,6 @@ BOOL LLFloaterConversationLog::postBuild()
getChild<LLFilterEditor>("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterConversationLog::onFilterEdit, this, _2));
- LLControlVariable * keep_log_ctrlp = gSavedSettings.getControl("KeepConversationLogTranscripts").get();
- keep_log_ctrlp->getSignal()->connect(boost::bind(&LLFloaterConversationLog::onCallLoggingEnabledDisabled, this, _2));
- onCallLoggingEnabledDisabled(keep_log_ctrlp->getValue());
-
return LLFloater::postBuild();
}
@@ -136,8 +132,3 @@ bool LLFloaterConversationLog::isActionChecked(const LLSD& userdata)
return false;
}
-void LLFloaterConversationLog::onCallLoggingEnabledDisabled(S32 log_mode)
-{
- std::string no_items_msg = log_mode > 0 ? "" : getString("logging_calls_disabled");
- mConversationLogList->setNoItemsCommentText(no_items_msg);
-}
diff --git a/indra/newview/llfloaterconversationlog.h b/indra/newview/llfloaterconversationlog.h
index aa0f480aae..e971330f3d 100644
--- a/indra/newview/llfloaterconversationlog.h
+++ b/indra/newview/llfloaterconversationlog.h
@@ -49,8 +49,6 @@ private:
bool isActionEnabled(const LLSD& userdata);
bool isActionChecked(const LLSD& userdata);
- void onCallLoggingEnabledDisabled(S32 log_mode);
-
LLConversationLogList* mConversationLogList;
};
diff --git a/indra/newview/skins/default/xui/en/floater_conversation_log.xml b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
index 256e03c4d7..7229292a14 100644
--- a/indra/newview/skins/default/xui/en/floater_conversation_log.xml
+++ b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
@@ -13,9 +13,6 @@
reuse_instance="true"
title="CONVERSATION LOG"
width="300">
- <string name="logging_calls_disabled">
- Conversations are not being logged. To log conversations in the future, select "Save IM logs on my computer" under Preferences > Privacy.
- </string>
<panel
follows="left|top|right"
height="32"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index d6a2383e52..5aa743b32d 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3908,4 +3908,15 @@ Try enclosing path to the editor with double quotes.
<!-- Spell check settings floater -->
<string name="UserDictionary">[User]</string>
+ <!-- Conversation log messages -->
+ <string name="logging_calls_disabled_log_empty">
+ Conversations are not being logged. To begin keeping a log, choose "Save: Log only" or "Save: Log and transcripts" under Preferences > Chat.
+ </string>
+ <string name="logging_calls_disabled_log_not_empty">
+ No more conversations will be logged. To resume keeping a log, choose "Save: Log only" or "Save: Log and transcripts" under Preferences > Chat.
+ </string>
+ <string name="logging_calls_enabled_log_empty">
+ There are no logged conversations. After you contact someone, or someone contacts you, a log entry will be shown here.
+ </string>
+
</strings>