Proper per-account settings
This commit is contained in:
@@ -542,7 +542,7 @@ std::string LLDir::getForbiddenFileChars()
|
|||||||
return "\\/:*?\"<>|";
|
return "\\/:*?\"<>|";
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLDir::setLindenUserDir(const std::string &first, const std::string &last)
|
void LLDir::setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last)
|
||||||
{
|
{
|
||||||
// if both first and last aren't set, assume we're grabbing the cached dir
|
// if both first and last aren't set, assume we're grabbing the cached dir
|
||||||
if (!first.empty() && !last.empty())
|
if (!first.empty() && !last.empty())
|
||||||
@@ -558,6 +558,14 @@ void LLDir::setLindenUserDir(const std::string &first, const std::string &last)
|
|||||||
mLindenUserDir += firstlower;
|
mLindenUserDir += firstlower;
|
||||||
mLindenUserDir += "_";
|
mLindenUserDir += "_";
|
||||||
mLindenUserDir += lastlower;
|
mLindenUserDir += lastlower;
|
||||||
|
|
||||||
|
if (!grid.empty())
|
||||||
|
{
|
||||||
|
std::string gridlower(grid);
|
||||||
|
LLStringUtil::toLower(gridlower);
|
||||||
|
mPerAccountChatLogsDir += "@";
|
||||||
|
mPerAccountChatLogsDir += gridlower;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class LLDir
|
|||||||
|
|
||||||
virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir
|
virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir
|
||||||
virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory.
|
virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory.
|
||||||
virtual void setLindenUserDir(const std::string &first, const std::string &last); // Set the linden user dir to this user's dir
|
virtual void setLindenUserDir(const std::string& grid, const std::string& first, const std::string& last); // Set the linden user dir to this user's dir
|
||||||
virtual void setSkinFolder(const std::string &skin_folder);
|
virtual void setSkinFolder(const std::string &skin_folder);
|
||||||
virtual bool setCacheDir(const std::string &path);
|
virtual bool setCacheDir(const std::string &path);
|
||||||
|
|
||||||
|
|||||||
@@ -807,13 +807,6 @@ bool idle_startup()
|
|||||||
|
|
||||||
timeout_count = 0;
|
timeout_count = 0;
|
||||||
|
|
||||||
// OGPX : Load URL History File for saved user. Needs to happen *before* login panel is displayed.
|
|
||||||
// Note: it only loads them if it can figure out the saved username.
|
|
||||||
if (!firstname.empty() && !lastname.empty())
|
|
||||||
{
|
|
||||||
gDirUtilp->setLindenUserDir(firstname, lastname);
|
|
||||||
LLURLHistory::loadFile("url_history.xml");
|
|
||||||
}
|
|
||||||
|
|
||||||
// *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance().
|
// *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance().
|
||||||
|
|
||||||
@@ -972,7 +965,14 @@ bool idle_startup()
|
|||||||
|
|
||||||
// create necessary directories
|
// create necessary directories
|
||||||
// *FIX: these mkdir's should error check
|
// *FIX: these mkdir's should error check
|
||||||
gDirUtilp->setLindenUserDir(firstname, lastname);
|
if (gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||||
|
{
|
||||||
|
gDirUtilp->setLindenUserDir(LLStringUtil::null, firstname, lastname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname);
|
||||||
|
}
|
||||||
LLFile::mkdir(gDirUtilp->getLindenUserDir());
|
LLFile::mkdir(gDirUtilp->getLindenUserDir());
|
||||||
|
|
||||||
// Set PerAccountSettingsFile to the default value.
|
// Set PerAccountSettingsFile to the default value.
|
||||||
@@ -1044,20 +1044,11 @@ bool idle_startup()
|
|||||||
LLPanelLogin::close();
|
LLPanelLogin::close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//For HTML parsing in text boxes.
|
//For HTML parsing in text boxes.
|
||||||
LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") );
|
LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") );
|
||||||
|
|
||||||
// Load URL History File
|
// Load URL History File
|
||||||
LLURLHistory::loadFile("url_history.xml");
|
LLURLHistory::loadFile("url_history.xml");
|
||||||
// OGPX : Since loading the file wipes the new value that might have gotten added on
|
|
||||||
// the login panel, let's add it to URL history
|
|
||||||
// (appendToURLCollection() only adds unique values to list)
|
|
||||||
// OGPX kind of ugly. TODO: figure out something less hacky
|
|
||||||
if (!gSavedSettings.getString("CmdLineRegionURI").empty())
|
|
||||||
{
|
|
||||||
LLURLHistory::appendToURLCollection("regionuri",gSavedSettings.getString("CmdLineRegionURI"));
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// Handle startup progress screen
|
// Handle startup progress screen
|
||||||
|
|||||||
Reference in New Issue
Block a user