aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llstartup.cpp96
1 files changed, 47 insertions, 49 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 88445c3..4028cad 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -802,7 +802,7 @@ bool idle_startup()
802 802
803 timeout_count = 0; 803 timeout_count = 0;
804 804
805 if(LLStartUp::shouldAutoLogin()) 805 if (LLStartUp::shouldAutoLogin())
806 { 806 {
807 show_connect_box = false; 807 show_connect_box = false;
808 } 808 }
@@ -823,23 +823,33 @@ bool idle_startup()
823 823
824 // Show the login dialog 824 // Show the login dialog
825 login_show(); 825 login_show();
826 // connect dialog is already shown, so fill in the names 826
827 // connect dialog is already shown, so fill in the names associated with the grid
828 // note how we always remember avatar names, but don't necessarily have to
827 // icky how usernames get bolted on here as a kind of hack -- MC 829 // icky how usernames get bolted on here as a kind of hack -- MC
828 if (gHippoGridManager && gHippoGridManager->getCurrentGrid()->isUsernameCompat()) 830 if (gHippoGridManager)
829 { 831 {
830 if (lastname == "resident" || lastname == "Resident") 832 firstname = gHippoGridManager->getCurrentGrid()->getFirstName();
833 lastname = gHippoGridManager->getCurrentGrid()->getLastName();
834 // RememberPassword toggles this being saved
835 password = gHippoGridManager->getCurrentGrid()->getAvatarPassword();
836
837 if (gHippoGridManager->getCurrentGrid()->isUsernameCompat())
831 { 838 {
832 LLPanelLogin::setFields(firstname, password); 839 if (lastname == "resident" || lastname == "Resident")
840 {
841 LLPanelLogin::setFields(firstname, password);
842 }
843 else
844 {
845 LLPanelLogin::setFields(firstname+"."+lastname, password);
846 }
833 } 847 }
834 else 848 else
835 { 849 {
836 LLPanelLogin::setFields(firstname+"."+lastname, password); 850 LLPanelLogin::setFields(firstname, lastname, password);
837 } 851 }
838 } 852 }
839 else
840 {
841 LLPanelLogin::setFields(firstname, lastname, password);
842 }
843 853
844 LLPanelLogin::giveFocus(); 854 LLPanelLogin::giveFocus();
845 855
@@ -972,21 +982,8 @@ bool idle_startup()
972 lastname = gLoginHandler.getLastName(); 982 lastname = gLoginHandler.getLastName();
973 web_login_key = gLoginHandler.getWebLoginKey(); 983 web_login_key = gLoginHandler.getWebLoginKey();
974 } 984 }
975 985 // note: the grid manager overrides defaults, always -- MC
976 /* Jacek - Grid manager stuff that's changed with 1.23 986 else if (show_connect_box)
977 if(!gLoginHandler.mPassword.empty())
978 {
979 firstname = gLoginHandler.mFirstName;
980 lastname = gLoginHandler.mLastName;
981 password = gLoginHandler.mPassword;
982
983 gLoginHandler.mFirstName = "";
984 gLoginHandler.mLastName = "";
985 gLoginHandler.mPassword = "";
986 LLStartUp::setShouldAutoLogin(false);
987 }*/
988
989 if (show_connect_box)
990 { 987 {
991 // TODO if not use viewer auth 988 // TODO if not use viewer auth
992 // Load all the name information out of the login view 989 // Load all the name information out of the login view
@@ -995,6 +992,8 @@ bool idle_startup()
995 992
996 // HACK: Try to make not jump on login 993 // HACK: Try to make not jump on login
997 gKeyboard->resetKeys(); 994 gKeyboard->resetKeys();
995
996 LLStartUp::setShouldAutoLogin(false);
998 } 997 }
999 998
1000 if (!firstname.empty() && !lastname.empty()) 999 if (!firstname.empty() && !lastname.empty())
@@ -1003,16 +1002,17 @@ bool idle_startup()
1003 gSavedSettings.setString("LastName", lastname); 1002 gSavedSettings.setString("LastName", lastname);
1004 1003
1005 //LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL; 1004 //LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL;
1006 gDebugInfo["LoginName"] = firstname + " " + lastname; 1005 gDebugInfo["LoginName"] = firstname + " " + lastname;
1007 }
1008
1009 1006
1010 1007 // create necessary directories
1011 1008 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname);
1012 // create necessary directories 1009 LLFile::mkdir(gDirUtilp->getLindenUserDir());
1013 // *FIX: these mkdir's should error check 1010 }
1014 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); 1011 else
1015 LLFile::mkdir(gDirUtilp->getLindenUserDir()); 1012 {
1013 // we don't do anything from here on out -- MC
1014 llerrs << "No first or last name given! Cannot proceed!" << llendl;
1015 }
1016 1016
1017 // Set PerAccountSettingsFile to the default value. 1017 // Set PerAccountSettingsFile to the default value.
1018 gSavedSettings.setString("PerAccountSettingsFile", 1018 gSavedSettings.setString("PerAccountSettingsFile",
@@ -1547,7 +1547,7 @@ bool idle_startup()
1547 default: 1547 default:
1548 if (sAuthUriNum >= (int) sAuthUris.size() - 1) 1548 if (sAuthUriNum >= (int) sAuthUris.size() - 1)
1549 { 1549 {
1550 emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridNick() << ".\n"; 1550 emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridName() << ".\n";
1551 emsg << LLUserAuth::getInstance()->errorMessage(); 1551 emsg << LLUserAuth::getInstance()->errorMessage();
1552 } else { 1552 } else {
1553 sAuthUriNum++; 1553 sAuthUriNum++;
@@ -1826,31 +1826,31 @@ bool idle_startup()
1826 std::string tmp = LLUserAuth::getInstance()->getResponse("gridname"); 1826 std::string tmp = LLUserAuth::getInstance()->getResponse("gridname");
1827 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp); 1827 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp);
1828 tmp = LLUserAuth::getInstance()->getResponse("loginuri"); 1828 tmp = LLUserAuth::getInstance()->getResponse("loginuri");
1829 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginUri(tmp); 1829 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginURI(tmp);
1830 tmp = LLUserAuth::getInstance()->getResponse("welcome"); 1830 tmp = LLUserAuth::getInstance()->getResponse("welcome");
1831 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); 1831 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp);
1832 tmp = LLUserAuth::getInstance()->getResponse("loginpage"); 1832 tmp = LLUserAuth::getInstance()->getResponse("loginpage");
1833 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); 1833 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp);
1834 tmp = LLUserAuth::getInstance()->getResponse("economy"); 1834 tmp = LLUserAuth::getInstance()->getResponse("economy");
1835 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); 1835 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperURI(tmp);
1836 tmp = LLUserAuth::getInstance()->getResponse("helperuri"); 1836 tmp = LLUserAuth::getInstance()->getResponse("helperuri");
1837 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); 1837 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperURI(tmp);
1838 tmp = LLUserAuth::getInstance()->getResponse("about"); 1838 tmp = LLUserAuth::getInstance()->getResponse("about");
1839 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); 1839 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp);
1840 tmp = LLUserAuth::getInstance()->getResponse("website"); 1840 tmp = LLUserAuth::getInstance()->getResponse("website");
1841 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); 1841 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp);
1842 tmp = LLUserAuth::getInstance()->getResponse("help"); 1842 tmp = LLUserAuth::getInstance()->getResponse("help");
1843 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); 1843 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportURL(tmp);
1844 tmp = LLUserAuth::getInstance()->getResponse("support"); 1844 tmp = LLUserAuth::getInstance()->getResponse("support");
1845 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); 1845 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportURL(tmp);
1846 tmp = LLUserAuth::getInstance()->getResponse("register"); 1846 tmp = LLUserAuth::getInstance()->getResponse("register");
1847 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); 1847 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterURL(tmp);
1848 tmp = LLUserAuth::getInstance()->getResponse("account"); 1848 tmp = LLUserAuth::getInstance()->getResponse("account");
1849 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); 1849 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterURL(tmp);
1850 tmp = LLUserAuth::getInstance()->getResponse("password"); 1850 tmp = LLUserAuth::getInstance()->getResponse("password");
1851 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordUrl(tmp); 1851 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordURL(tmp);
1852 tmp = LLUserAuth::getInstance()->getResponse("search"); 1852 tmp = LLUserAuth::getInstance()->getResponse("search");
1853 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchUrl(tmp); 1853 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchURL(tmp);
1854 tmp = LLUserAuth::getInstance()->getResponse("currency"); 1854 tmp = LLUserAuth::getInstance()->getResponse("currency");
1855 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); 1855 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp);
1856 tmp = LLUserAuth::getInstance()->getResponse("real_currency"); 1856 tmp = LLUserAuth::getInstance()->getResponse("real_currency");
@@ -2375,9 +2375,7 @@ bool idle_startup()
2375 LLStringUtil::format_map_t args; 2375 LLStringUtil::format_map_t args;
2376 args["[FIRST_NAME]"] = firstname; 2376 args["[FIRST_NAME]"] = firstname;
2377 args["[LAST_NAME]"] = lastname; 2377 args["[LAST_NAME]"] = lastname;
2378 args["[GRID_NAME]"] = (gHippoGridManager->getConnectedGrid()->getGridName().empty()) ? 2378 args["[GRID_NAME]"] = gHippoGridManager->getConnectedGrid()->getGridName();
2379 gHippoGridManager->getConnectedGrid()->getGridNick() :
2380 gHippoGridManager->getConnectedGrid()->getGridName();
2381 std::string title_text = LLTrans::getString("TitleBarMultiple", args); 2379 std::string title_text = LLTrans::getString("TitleBarMultiple", args);
2382 gWindowTitle = gSecondLife + " - " + title_text; 2380 gWindowTitle = gSecondLife + " - " + title_text;
2383 LLStringUtil::truncate(gWindowTitle, 255); 2381 LLStringUtil::truncate(gWindowTitle, 255);
@@ -3271,7 +3269,7 @@ bool first_run_dialog_callback(const LLSD& notification, const LLSD& response)
3271 if (0 == option) 3269 if (0 == option)
3272 { 3270 {
3273 LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL; 3271 LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL;
3274 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); 3272 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterURL();
3275 if (!url.empty()) { 3273 if (!url.empty()) {
3276 LLWeb::loadURL(url); 3274 LLWeb::loadURL(url);
3277 } else { 3275 } else {
@@ -3323,7 +3321,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response)
3323 case 0: // OK 3321 case 0: // OK
3324 break; 3322 break;
3325 case 1: { // Help 3323 case 1: { // Help
3326 const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); 3324 const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportURL();
3327 if (!url.empty()) LLWeb::loadURLInternal(url); 3325 if (!url.empty()) LLWeb::loadURLInternal(url);
3328 break; 3326 break;
3329 } 3327 }