Better saved logins, with grid

Please, someone throw away the oodles of dead, confusing and redundant code -.-
This commit is contained in:
Siana Gearz
2011-06-15 15:14:55 +02:00
parent 9d57163479
commit c82cf613a6
4 changed files with 56 additions and 24 deletions

View File

@@ -846,7 +846,7 @@ bool idle_startup()
gViewerWindow->setShowProgress(FALSE);
// Load login history
std::string login_hist_filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg1.xml");
std::string login_hist_filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg2.xml");
LLSavedLogins login_history = LLSavedLogins::loadFile(login_hist_filepath);
// Show the login dialog.
@@ -1547,7 +1547,7 @@ bool idle_startup()
text = LLUserAuth::getInstance()->getResponse("secure_session_id");
if(!text.empty()) gAgent.mSecureSessionID.set(text);
text = LLUserAuth::getInstance()->getResponse("first_name");
text = LLUserAuth::getInstance()->getResponse("firsst_name");
if(!text.empty())
{
// Remove quotes from string. Login.cgi sends these to force
@@ -1579,13 +1579,14 @@ bool idle_startup()
{
// Save the login history data to disk
std::string history_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg1.xml");
std::string history_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg2.xml");
LLSavedLogins history_data = LLSavedLogins::loadFile(history_file);
history_data.deleteEntry(firstname, lastname);
std::string grid_nick = gHippoGridManager->getConnectedGrid()->getGridNick();
history_data.deleteEntry(firstname, lastname, grid_nick);
if (gSavedSettings.getBOOL("RememberLogin"))
{
LLSavedLoginEntry login_entry(firstname, lastname, password);
LLSavedLoginEntry login_entry(firstname, lastname, password, grid_nick);
history_data.addEntry(login_entry);
}
else