From db9dd625892ca3a251148f45d1f852845e9c3ffb Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 30 Aug 2010 15:58:47 -0700 Subject: Added debug setting UseLegacyChatLogsFolder for saving chat.txt and IM logs in non-grid-specific folders --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llprefsim.cpp | 12 ++++++++++-- linden/indra/newview/llstartup.cpp | 9 ++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 76f549d..d6dbe1f 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -844,6 +844,17 @@ Value 1 + UseLegacyChatLogsFolder + + Comment + Enable legacy chat log format (firstname_lastname instead of firstname_lastname@grid). Requires restart + Persist + 1 + Type + Boolean + Value + 0 + UseUTCTime Comment diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 045139c..e7c39e2 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -190,8 +190,16 @@ void LLPrefsIMImpl::apply() gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); - gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), gSavedSettings.getString("FirstName"), - gSavedSettings.getString("LastName") ); + if (gSavedSettings.getBOOL("UseLegacyChatLogsFolder")) + { + gDirUtilp->setPerAccountChatLogsDir(LLStringUtil::null, + gSavedSettings.getString("FirstName"), gSavedSettings.getString("LastName") ); + } + else + { + gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), + gSavedSettings.getString("FirstName"), gSavedSettings.getString("LastName") ); + } LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); bool new_im_via_email = childGetValue("send_im_to_email").asBoolean(); diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index a3fde55..592e938 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -936,7 +936,14 @@ bool idle_startup() gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); } - gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); + if (gSavedSettings.getBOOL("UseLegacyChatLogsFolder")) + { + gDirUtilp->setPerAccountChatLogsDir(LLStringUtil::null, firstname, lastname); + } + else + { + gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); + } LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); -- cgit v1.1