diff options
Diffstat (limited to 'linden/indra/newview/llpanellogin.cpp')
-rw-r--r-- | linden/indra/newview/llpanellogin.cpp | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index e0acd34..df5601a 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -37,6 +37,8 @@ | |||
37 | #include "llpanelgeneral.h" | 37 | #include "llpanelgeneral.h" |
38 | 38 | ||
39 | #include "hippoGridManager.h" | 39 | #include "hippoGridManager.h" |
40 | #include "hippoLimits.h" | ||
41 | |||
40 | #include "floaterlogin.h" | 42 | #include "floaterlogin.h" |
41 | 43 | ||
42 | #include "indra_constants.h" // for key and mask constants | 44 | #include "indra_constants.h" // for key and mask constants |
@@ -460,7 +462,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask) | |||
460 | if ( KEY_F1 == key ) | 462 | if ( KEY_F1 == key ) |
461 | { | 463 | { |
462 | llinfos << "Spawning HTML help window" << llendl; | 464 | llinfos << "Spawning HTML help window" << llendl; |
463 | LLFloaterMediaBrowser::helpF1(); | 465 | gViewerHtmlHelp.show(); |
464 | return TRUE; | 466 | return TRUE; |
465 | } | 467 | } |
466 | 468 | ||
@@ -634,7 +636,23 @@ void LLPanelLogin::addServer(const std::string& server) | |||
634 | } | 636 | } |
635 | else | 637 | else |
636 | { | 638 | { |
637 | std::string last_grid = gSavedSettings.getString("LastSelectedGrid"); | 639 | std::string last_grid = gSavedSettings.getString("CmdLineGridChoice");//imprudence TODO:errorcheck |
640 | std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString(); | ||
641 | if (!last_grid.empty()&& cmd_line_login_uri.empty())//don't use --grid if --loginuri is also given | ||
642 | { | ||
643 | //give user chance to change their mind, even with --grid set | ||
644 | gSavedSettings.setString("CmdLineGridChoice",""); | ||
645 | } | ||
646 | else if (!cmd_line_login_uri.empty()) | ||
647 | { | ||
648 | last_grid = cmd_line_login_uri; | ||
649 | //also clear --grid no matter if it was given | ||
650 | gSavedSettings.setString("CmdLineGridChoice",""); | ||
651 | } | ||
652 | else if (last_grid.empty()) | ||
653 | { | ||
654 | last_grid = gSavedSettings.getString("LastSelectedGrid"); | ||
655 | } | ||
638 | if (last_grid.empty()) last_grid = defaultGrid; | 656 | if (last_grid.empty()) last_grid = defaultGrid; |
639 | grids->setSimple(last_grid); | 657 | grids->setSimple(last_grid); |
640 | } | 658 | } |
@@ -826,8 +844,9 @@ void LLPanelLogin::loadLoginPage() | |||
826 | } | 844 | } |
827 | 845 | ||
828 | // Channel and Version | 846 | // Channel and Version |
829 | std::string version = llformat("%d.%d.%d (%d)", | 847 | std::string version = llformat("%d.%d.%d %s", |
830 | LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD); | 848 | IMP_VERSION_MAJOR, IMP_VERSION_MINOR, |
849 | IMP_VERSION_PATCH, IMP_VERSION_TEST); | ||
831 | 850 | ||
832 | char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); | 851 | char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); |
833 | char* curl_version = curl_escape(version.c_str(), 0); | 852 | char* curl_version = curl_escape(version.c_str(), 0); |
@@ -875,17 +894,17 @@ void LLPanelLogin::loadLoginPage() | |||
875 | location = "home"; | 894 | location = "home"; |
876 | } | 895 | } |
877 | } | 896 | } |
878 | 897 | ||
879 | std::string firstname, lastname; | 898 | std::string firstname, lastname; |
880 | 899 | ||
881 | if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) | 900 | if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) |
882 | { | 901 | { |
883 | LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); | 902 | LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); |
884 | firstname = cmd_line_login[0].asString(); | 903 | firstname = cmd_line_login[0].asString(); |
885 | lastname = cmd_line_login[1].asString(); | 904 | lastname = cmd_line_login[1].asString(); |
886 | password = cmd_line_login[2].asString(); | 905 | password = cmd_line_login[2].asString(); |
887 | } | 906 | } |
888 | 907 | ||
889 | if (firstname.empty()) | 908 | if (firstname.empty()) |
890 | { | 909 | { |
891 | firstname = gSavedSettings.getString("FirstName"); | 910 | firstname = gSavedSettings.getString("FirstName"); |
@@ -998,8 +1017,7 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& | |||
998 | S32 option = LLNotification::getSelectedOption(notification, response); | 1017 | S32 option = LLNotification::getSelectedOption(notification, response); |
999 | if (0 == option) | 1018 | if (0 == option) |
1000 | { | 1019 | { |
1001 | llinfos << "Going to account creation URL" << llendl; | 1020 | onClickNewAccount(0); |
1002 | LLWeb::loadURLExternal( CREATE_ACCOUNT_URL ); | ||
1003 | } | 1021 | } |
1004 | else | 1022 | else |
1005 | { | 1023 | { |
@@ -1012,7 +1030,14 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& | |||
1012 | // static | 1030 | // static |
1013 | void LLPanelLogin::onClickNewAccount(void*) | 1031 | void LLPanelLogin::onClickNewAccount(void*) |
1014 | { | 1032 | { |
1015 | LLWeb::loadURLExternal( CREATE_ACCOUNT_URL ); | 1033 | const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); |
1034 | if (!url.empty()) { | ||
1035 | llinfos << "Going to account creation URL." << llendl; | ||
1036 | LLWeb::loadURLExternal(url); | ||
1037 | } else { | ||
1038 | llinfos << "Account creation URL is empty." << llendl; | ||
1039 | sInstance->setFocus(TRUE); | ||
1040 | } | ||
1016 | } | 1041 | } |
1017 | 1042 | ||
1018 | 1043 | ||
@@ -1043,7 +1068,12 @@ void LLPanelLogin::onClickForgotPassword(void*) | |||
1043 | { | 1068 | { |
1044 | if (sInstance ) | 1069 | if (sInstance ) |
1045 | { | 1070 | { |
1046 | LLWeb::loadURLExternal(sInstance->getString( "forgot_password_url" )); | 1071 | const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordUrl(); |
1072 | if (!url.empty()) { | ||
1073 | LLWeb::loadURLExternal(url); | ||
1074 | } else { | ||
1075 | llwarns << "Link for 'forgotton password' not set." << llendl; | ||
1076 | } | ||
1047 | } | 1077 | } |
1048 | } | 1078 | } |
1049 | 1079 | ||
@@ -1082,7 +1112,8 @@ void LLPanelLogin::onSelectServer(LLUICtrl* ctrl, void*) | |||
1082 | // //childSetText("gridname", gridInfo->getGridName()); | 1112 | // //childSetText("gridname", gridInfo->getGridName()); |
1083 | // LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 ); | 1113 | // LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 ); |
1084 | // } | 1114 | // } |
1085 | 1115 | if (mCurGrid == gHippoGridManager->getConnectedGrid()->getGridNick()) | |
1116 | gHippoLimits->setLimits(); | ||
1086 | 1117 | ||
1087 | llwarns << "current grid = " << mCurGrid << llendl; | 1118 | llwarns << "current grid = " << mCurGrid << llendl; |
1088 | 1119 | ||