diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanellogin.cpp | 64 |
1 files changed, 40 insertions, 24 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index a95272a..460c67f 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -52,6 +52,7 @@ | |||
52 | #include "llcombobox.h" | 52 | #include "llcombobox.h" |
53 | #include "llcurl.h" | 53 | #include "llcurl.h" |
54 | #include "llviewercontrol.h" | 54 | #include "llviewercontrol.h" |
55 | #include "llfirstuse.h" | ||
55 | #include "llfloaterabout.h" | 56 | #include "llfloaterabout.h" |
56 | #include "llfloatertest.h" | 57 | #include "llfloatertest.h" |
57 | #include "llfloaterpreference.h" | 58 | #include "llfloaterpreference.h" |
@@ -329,6 +330,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
329 | refreshLocation( false ); | 330 | refreshLocation( false ); |
330 | #endif | 331 | #endif |
331 | 332 | ||
333 | LLFirstUse::useLoginScreen(); | ||
332 | } | 334 | } |
333 | 335 | ||
334 | void LLPanelLogin::setSiteIsAlive( bool alive ) | 336 | void LLPanelLogin::setSiteIsAlive( bool alive ) |
@@ -801,9 +803,12 @@ void LLPanelLogin::refreshLoginPage() | |||
801 | // kick off a request to grab the url manually | 803 | // kick off a request to grab the url manually |
802 | gResponsePtr = LLIamHereLogin::build(sInstance); | 804 | gResponsePtr = LLIamHereLogin::build(sInstance); |
803 | std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); | 805 | std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); |
804 | if (!login_page.empty()) { | 806 | if (!login_page.empty()) |
807 | { | ||
805 | LLHTTPClient::head(login_page, gResponsePtr); | 808 | LLHTTPClient::head(login_page, gResponsePtr); |
806 | } else { | 809 | } |
810 | else | ||
811 | { | ||
807 | sInstance->setSiteIsAlive(false); | 812 | sInstance->setSiteIsAlive(false); |
808 | } | 813 | } |
809 | } | 814 | } |
@@ -815,7 +820,8 @@ void LLPanelLogin::loadLoginPage() | |||
815 | 820 | ||
816 | 821 | ||
817 | std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); | 822 | std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); |
818 | if (login_page.empty()) { | 823 | if (login_page.empty()) |
824 | { | ||
819 | sInstance->setSiteIsAlive(false); | 825 | sInstance->setSiteIsAlive(false); |
820 | return; | 826 | return; |
821 | } | 827 | } |
@@ -1092,35 +1098,45 @@ void LLPanelLogin::onSelectServer(LLUICtrl* ctrl, void*) | |||
1092 | // *NOTE: The paramters for this method are ignored. | 1098 | // *NOTE: The paramters for this method are ignored. |
1093 | // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) | 1099 | // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) |
1094 | // calls this method. | 1100 | // calls this method. |
1101 | updateGridCombo(LLStringUtil::null); | ||
1102 | } | ||
1095 | 1103 | ||
1096 | // The user twiddled with the grid choice ui. | 1104 | // static |
1097 | // apply the selection to the grid setting. | 1105 | void LLPanelLogin::updateGridCombo(std::string grid_nick) |
1098 | std::string grid_label; | 1106 | { |
1099 | //S32 grid_index; | ||
1100 | |||
1101 | LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); | 1107 | LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); |
1102 | LLSD combo_val = combo->getValue(); | 1108 | |
1103 | 1109 | if (grid_nick.empty()) | |
1104 | std::string mCurGrid = ctrl->getValue().asString(); | 1110 | { |
1105 | //KOW | 1111 | // The user twiddled with the grid choice ui. |
1106 | gHippoGridManager->setCurrentGrid(mCurGrid); | 1112 | // apply the selection to the grid setting. |
1107 | // HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid); | 1113 | //std::string grid_label; |
1108 | // if (gridInfo) { | 1114 | //S32 grid_index; |
1109 | // //childSetText("gridnick", gridInfo->getGridNick()); | 1115 | |
1110 | // //platform->setCurrentByIndex(gridInfo->getPlatform()); | 1116 | grid_nick = combo->getValue().asString(); |
1111 | // //childSetText("gridname", gridInfo->getGridName()); | 1117 | |
1112 | // LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 ); | 1118 | // HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid); |
1113 | // } | 1119 | // if (gridInfo) { |
1114 | if (mCurGrid == gHippoGridManager->getConnectedGrid()->getGridNick()) | 1120 | // //childSetText("gridnick", gridInfo->getGridNick()); |
1115 | gHippoLimits->setLimits(); | 1121 | // //platform->setCurrentByIndex(gridInfo->getPlatform()); |
1122 | // //childSetText("gridname", gridInfo->getGridName()); | ||
1123 | // LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 ); | ||
1124 | // } | ||
1125 | } | ||
1126 | else | ||
1127 | { | ||
1128 | combo->setSimple(grid_nick); | ||
1129 | } | ||
1116 | 1130 | ||
1117 | llwarns << "current grid = " << mCurGrid << llendl; | 1131 | gHippoGridManager->setCurrentGrid(grid_nick); |
1132 | |||
1133 | llinfos << "current grid set to " << grid_nick << llendl; | ||
1118 | 1134 | ||
1119 | // grid changed so show new splash screen (possibly) | 1135 | // grid changed so show new splash screen (possibly) |
1120 | loadLoginPage(); | 1136 | loadLoginPage(); |
1121 | 1137 | ||
1122 | // save grid choice to settings | 1138 | // save grid choice to settings |
1123 | gSavedSettings.setString("LastSelectedGrid", mCurGrid); | 1139 | gSavedSettings.setString("LastSelectedGrid", grid_nick); |
1124 | } | 1140 | } |
1125 | /* | 1141 | /* |
1126 | void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) | 1142 | void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) |