From 302f57e47fdab9e043a72e6a83f0f2b1992f2a99 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 6 Feb 2013 20:17:35 +0200
Subject: [PATCH] CHUI-744 FIXED KeepConversationLogTranscripts setting is
 moved to settings_per_account.xml

---
 indra/newview/app_settings/settings.xml             | 11 -----------
 indra/newview/app_settings/settings_per_account.xml | 11 +++++++++++
 indra/newview/llconversationlog.cpp                 |  4 ++--
 indra/newview/llfloaterimcontainer.cpp              |  4 ++--
 indra/newview/llfloaterimnearbychat.cpp             |  2 +-
 indra/newview/llimview.cpp                          |  2 +-
 6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index fb4cc6de624..79376f74678 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4667,17 +4667,6 @@
       <key>Value</key>
       <integer>1</integer>
     </map>
-    <key>KeepConversationLogTranscripts</key>
-    <map>
-      <key>Comment</key>
-      <string>Keep a conversation log and transcripts</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>2</integer>
-    </map>
     <key>LandBrushSize</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 68643283398..0b589e2da67 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -281,6 +281,17 @@
         <key>Value</key>
             <integer>0</integer>
         </map>
+    <key>KeepConversationLogTranscripts</key>
+    	<map>
+      	<key>Comment</key>
+      		<string>Keep a conversation log and transcripts</string>
+      	<key>Persist</key>
+      		<integer>1</integer>
+      	<key>Type</key>
+      		<string>S32</string>
+      	<key>Value</key>
+      		<integer>2</integer>
+    	</map>    
     <key>ShowFavoritesOnLogin</key>
         <map>
         <key>Comment</key>
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 04abda17992..c5be2f59be1 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -190,7 +190,7 @@ LLConversationLog::LLConversationLog() :
 	mAvatarNameCacheConnection(),
 	mLoggingEnabled(false)
 {
-	LLControlVariable * keep_log_ctrlp = gSavedSettings.getControl("KeepConversationLogTranscripts").get();
+	LLControlVariable * keep_log_ctrlp = gSavedPerAccountSettings.getControl("KeepConversationLogTranscripts").get();
 	S32 log_mode = keep_log_ctrlp->getValue();
 
 	if (log_mode > 0)
@@ -369,7 +369,7 @@ void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string
 
 void LLConversationLog::cache()
 {
-	if (gSavedSettings.getS32("KeepConversationLogTranscripts") > 0)
+	if (gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0)
 	{
 		saveToFile(getFileName());
 	}
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 5a284cc7b71..2b13ce63778 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1141,7 +1141,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
 
 	if ("conversation_log" == item)
 	{
-		return gSavedSettings.getS32("KeepConversationLogTranscripts") > 0;
+		return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;
 	}
 
 	//Enable Chat history item for ad-hoc and group conversations
@@ -1792,7 +1792,7 @@ void LLFloaterIMContainer::updateSpeakBtnState()
 
 bool LLFloaterIMContainer::isConversationLoggingAllowed()
 {
-	return gSavedSettings.getS32("KeepConversationLogTranscripts") > 0;
+	return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;
 }
 
 void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes)
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 345418bffca..430326203f5 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -542,7 +542,7 @@ void LLFloaterIMNearbyChat::addMessage(const LLChat& chat,bool archive,const LLS
 	}
 
 	// logging
-	if (!args["do_not_log"].asBoolean() && gSavedSettings.getS32("KeepConversationLogTranscripts") > 1)
+	if (!args["do_not_log"].asBoolean() && gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 1)
 	{
 		std::string from_name = chat.mFromName;
 
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 1cceb68e2af..d4c8d8c4f4f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -928,7 +928,7 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from,
 
 bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text)
 {
-	if (gSavedSettings.getS32("KeepConversationLogTranscripts") > 1)
+	if (gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 1)
 	{	
 		std::string from_name = from;
 
-- 
GitLab