From 8aaedd0a5fc73f45684c029ca9f349d793e61e93 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 12 Feb 2013 14:27:52 +0200 Subject: CHUI-742 FIXED Update log location when closing Preference floater. --- indra/newview/llfloaterpreference.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index da24bb3b8f..662d2df5d2 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -646,6 +646,9 @@ void LLFloaterPreference::cancel() LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get(); pPathfindingConsole->onRegionBoundaryCross(); } + + std::string dir_name(gSavedPerAccountSettings.getString("InstantMessageLogPath")); + updateLogLocation(dir_name); } void LLFloaterPreference::onOpen(const LLSD& key) @@ -1443,16 +1446,20 @@ void LLFloaterPreference::onClickLogPath() std::string dir_name = picker.getDirName(); gSavedPerAccountSettings.setString("InstantMessageLogPath", dir_name); + updateLogLocation(dir_name); + // enable/disable 'Delete transcripts button + updateDeleteTranscriptsButton(); +} + +void LLFloaterPreference::updateLogLocation(const std::string& dir_name) +{ gDirUtilp->setChatLogsDir(dir_name); gDirUtilp->updatePerAccountChatLogsDir(); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); // refresh IM floaters with new logs from files from new selected directory LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true); - - // enable/disable 'Delete transcripts button - updateDeleteTranscriptsButton(); } void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email) -- cgit v1.2.3