aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorArmin Weatherwax2010-03-12 17:03:19 +0100
committerArmin Weatherwax2010-04-12 17:11:03 +0200
commitec1fc19a7ef79ae27e68735e43dc9166397871f7 (patch)
tree2b7ac18281dcda78d1ab9270a83a3dcb73c3846a
parentRemoved Second Life from the default grid list. (diff)
downloadmeta-impy-ec1fc19a7ef79ae27e68735e43dc9166397871f7.zip
meta-impy-ec1fc19a7ef79ae27e68735e43dc9166397871f7.tar.gz
meta-impy-ec1fc19a7ef79ae27e68735e43dc9166397871f7.tar.bz2
meta-impy-ec1fc19a7ef79ae27e68735e43dc9166397871f7.tar.xz
respect --grid and --login (and --loginuri over --grid).
-rw-r--r--linden/indra/newview/llpanellogin.cpp32
-rw-r--r--linden/indra/newview/llstartup.cpp21
2 files changed, 38 insertions, 15 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index d3e295d..64a8a1f 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -634,7 +634,23 @@ void LLPanelLogin::addServer(const std::string& server)
634 } 634 }
635 else 635 else
636 { 636 {
637 std::string last_grid = gSavedSettings.getString("LastSelectedGrid"); 637 std::string last_grid = gSavedSettings.getString("CmdLineGridChoice");//imprudence TODO:errorcheck
638 std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString();
639 if (!last_grid.empty()&& cmd_line_login_uri.empty())//don't use --grid if --loginuri is also given
640 {
641 //give user chance to change their mind, even with --grid set
642 gSavedSettings.setString("CmdLineGridChoice","");
643 }
644 else if (!cmd_line_login_uri.empty())
645 {
646 last_grid = cmd_line_login_uri;
647 //also clear --grid no matter if it was given
648 gSavedSettings.setString("CmdLineGridChoice","");
649 }
650 else if (last_grid.empty())
651 {
652 last_grid = gSavedSettings.getString("LastSelectedGrid");
653 }
638 if (last_grid.empty()) last_grid = defaultGrid; 654 if (last_grid.empty()) last_grid = defaultGrid;
639 grids->setSimple(last_grid); 655 grids->setSimple(last_grid);
640 } 656 }
@@ -876,17 +892,17 @@ void LLPanelLogin::loadLoginPage()
876 location = "home"; 892 location = "home";
877 } 893 }
878 } 894 }
879 895
880 std::string firstname, lastname; 896 std::string firstname, lastname;
881 897
882 if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) 898 if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
883 { 899 {
884 LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); 900 LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
885 firstname = cmd_line_login[0].asString(); 901 firstname = cmd_line_login[0].asString();
886 lastname = cmd_line_login[1].asString(); 902 lastname = cmd_line_login[1].asString();
887 password = cmd_line_login[2].asString(); 903 password = cmd_line_login[2].asString();
888 } 904 }
889 905
890 if (firstname.empty()) 906 if (firstname.empty())
891 { 907 {
892 firstname = gSavedSettings.getString("FirstName"); 908 firstname = gSavedSettings.getString("FirstName");
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 11bd87b..993e6e2 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -683,9 +683,9 @@ bool idle_startup()
683 show_connect_box = 683 show_connect_box =
684 firstname.empty() || lastname.empty() || web_login_key.isNull(); 684 firstname.empty() || lastname.empty() || web_login_key.isNull();
685 } 685 }
686 else if((gSavedSettings.getLLSD("UserLoginInfo").size() == 3) && !LLStartUp::shouldAutoLogin()) 686 else if((gSavedSettings.getLLSD("UserLoginInfo").size() == 3) && !LLStartUp::shouldAutoLogin())
687 { 687 {
688 LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); 688 LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
689 firstname = cmd_line_login[0].asString(); 689 firstname = cmd_line_login[0].asString();
690 lastname = cmd_line_login[1].asString(); 690 lastname = cmd_line_login[1].asString();
691 691
@@ -700,7 +700,7 @@ bool idle_startup()
700 show_connect_box = false; 700 show_connect_box = false;
701#endif 701#endif
702 gSavedSettings.setBOOL("AutoLogin", TRUE); 702 gSavedSettings.setBOOL("AutoLogin", TRUE);
703 } 703 }
704 else if (gSavedSettings.getBOOL("AutoLogin")) 704 else if (gSavedSettings.getBOOL("AutoLogin"))
705 { 705 {
706 firstname = gSavedSettings.getString("FirstName"); 706 firstname = gSavedSettings.getString("FirstName");
@@ -877,13 +877,20 @@ bool idle_startup()
877 gDebugInfo["LoginName"] = firstname + " " + lastname; 877 gDebugInfo["LoginName"] = firstname + " " + lastname;
878 } 878 }
879 879
880 gHippoGridManager->setCurrentGridAsConnected(); 880 std::string cmd_line_grid_choice = gSavedSettings.getString("CmdLineGridChoice");
881 std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString();
882 if(!cmd_line_grid_choice.empty() && cmd_line_login_uri.empty())
883 {
884 gHippoGridManager->setCurrentGrid(cmd_line_grid_choice);
885 }
886
887 gHippoGridManager->setCurrentGridAsConnected();
881 // create necessary directories 888 // create necessary directories
882 // *FIX: these mkdir's should error check 889 // *FIX: these mkdir's should error check
883 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); 890 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname);
884 LLFile::mkdir(gDirUtilp->getLindenUserDir()); 891 LLFile::mkdir(gDirUtilp->getLindenUserDir());
885 892
886 // Set PerAccountSettingsFile to the default value. 893 // Set PerAccountSettingsFile to the default value.
887 gSavedSettings.setString("PerAccountSettingsFile", 894 gSavedSettings.setString("PerAccountSettingsFile",
888 gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, 895 gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,
889 LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount") 896 LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount")