diff options
author | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
commit | 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch) | |
tree | 95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/llpanellogin.cpp | |
parent | Second Life viewer sources 1.20.6 (diff) | |
download | meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2 meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz |
Second Life viewer sources 1.20.7
Diffstat (limited to 'linden/indra/newview/llpanellogin.cpp')
-rw-r--r-- | linden/indra/newview/llpanellogin.cpp | 94 |
1 files changed, 44 insertions, 50 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 9fcd73d..334e9f4 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -133,83 +133,77 @@ void LLLoginHandler::parse(const LLSD& queryMap) | |||
133 | mFirstName = queryMap["first_name"].asString(); | 133 | mFirstName = queryMap["first_name"].asString(); |
134 | mLastName = queryMap["last_name"].asString(); | 134 | mLastName = queryMap["last_name"].asString(); |
135 | 135 | ||
136 | EGridInfo grid_choice = GRID_INFO_NONE; | ||
136 | if (queryMap["grid"].asString() == "aditi") | 137 | if (queryMap["grid"].asString() == "aditi") |
137 | { | 138 | { |
138 | gGridChoice = GRID_INFO_ADITI; | 139 | grid_choice = GRID_INFO_ADITI; |
139 | } | 140 | } |
140 | else if (queryMap["grid"].asString() == "agni") | 141 | else if (queryMap["grid"].asString() == "agni") |
141 | { | 142 | { |
142 | gGridChoice = GRID_INFO_AGNI; | 143 | grid_choice = GRID_INFO_AGNI; |
143 | } | 144 | } |
144 | else if (queryMap["grid"].asString() == "siva") | 145 | else if (queryMap["grid"].asString() == "siva") |
145 | { | 146 | { |
146 | gGridChoice = GRID_INFO_SIVA; | 147 | grid_choice = GRID_INFO_SIVA; |
147 | } | 148 | } |
148 | else if (queryMap["grid"].asString() == "durga") | 149 | else if (queryMap["grid"].asString() == "durga") |
149 | { | 150 | { |
150 | gGridChoice = GRID_INFO_DURGA; | 151 | grid_choice = GRID_INFO_DURGA; |
151 | } | 152 | } |
152 | else if (queryMap["grid"].asString() == "shakti") | 153 | else if (queryMap["grid"].asString() == "shakti") |
153 | { | 154 | { |
154 | gGridChoice = GRID_INFO_SHAKTI; | 155 | grid_choice = GRID_INFO_SHAKTI; |
155 | } | 156 | } |
156 | else if (queryMap["grid"].asString() == "soma") | 157 | else if (queryMap["grid"].asString() == "soma") |
157 | { | 158 | { |
158 | gGridChoice = GRID_INFO_SOMA; | 159 | grid_choice = GRID_INFO_SOMA; |
159 | } | 160 | } |
160 | else if (queryMap["grid"].asString() == "ganga") | 161 | else if (queryMap["grid"].asString() == "ganga") |
161 | { | 162 | { |
162 | gGridChoice = GRID_INFO_GANGA; | 163 | grid_choice = GRID_INFO_GANGA; |
163 | } | 164 | } |
164 | else if (queryMap["grid"].asString() == "vaak") | 165 | else if (queryMap["grid"].asString() == "vaak") |
165 | { | 166 | { |
166 | gGridChoice = GRID_INFO_VAAK; | 167 | grid_choice = GRID_INFO_VAAK; |
167 | } | 168 | } |
168 | else if (queryMap["grid"].asString() == "uma") | 169 | else if (queryMap["grid"].asString() == "uma") |
169 | { | 170 | { |
170 | gGridChoice = GRID_INFO_UMA; | 171 | grid_choice = GRID_INFO_UMA; |
171 | } | 172 | } |
172 | else if (queryMap["grid"].asString() == "mohini") | 173 | else if (queryMap["grid"].asString() == "mohini") |
173 | { | 174 | { |
174 | gGridChoice = GRID_INFO_MOHINI; | 175 | grid_choice = GRID_INFO_MOHINI; |
175 | } | 176 | } |
176 | else if (queryMap["grid"].asString() == "yami") | 177 | else if (queryMap["grid"].asString() == "yami") |
177 | { | 178 | { |
178 | gGridChoice = GRID_INFO_YAMI; | 179 | grid_choice = GRID_INFO_YAMI; |
179 | } | 180 | } |
180 | else if (queryMap["grid"].asString() == "nandi") | 181 | else if (queryMap["grid"].asString() == "nandi") |
181 | { | 182 | { |
182 | gGridChoice = GRID_INFO_NANDI; | 183 | grid_choice = GRID_INFO_NANDI; |
183 | } | 184 | } |
184 | else if (queryMap["grid"].asString() == "mitra") | 185 | else if (queryMap["grid"].asString() == "mitra") |
185 | { | 186 | { |
186 | gGridChoice = GRID_INFO_MITRA; | 187 | grid_choice = GRID_INFO_MITRA; |
187 | } | 188 | } |
188 | else if (queryMap["grid"].asString() == "radha") | 189 | else if (queryMap["grid"].asString() == "radha") |
189 | { | 190 | { |
190 | gGridChoice = GRID_INFO_RADHA; | 191 | grid_choice = GRID_INFO_RADHA; |
191 | } | 192 | } |
192 | else if (queryMap["grid"].asString() == "ravi") | 193 | else if (queryMap["grid"].asString() == "ravi") |
193 | { | 194 | { |
194 | gGridChoice = GRID_INFO_RAVI; | 195 | grid_choice = GRID_INFO_RAVI; |
195 | } | 196 | } |
196 | else if (queryMap["grid"].asString() == "aruna") | 197 | else if (queryMap["grid"].asString() == "aruna") |
197 | { | 198 | { |
198 | gGridChoice = GRID_INFO_ARUNA; | 199 | grid_choice = GRID_INFO_ARUNA; |
199 | } | 200 | } |
200 | #if !LL_RELEASE_FOR_DOWNLOAD | 201 | |
201 | if (gGridChoice > GRID_INFO_NONE && gGridChoice < GRID_INFO_LOCAL) | 202 | if(grid_choice != GRID_INFO_NONE) |
202 | { | 203 | { |
203 | gSavedSettings.setS32("ServerChoice", gGridChoice); | 204 | LLViewerLogin::getInstance()->setGridChoice(grid_choice); |
204 | } | 205 | } |
205 | #endif | 206 | |
206 | |||
207 | if (LLAppViewer::instance()->getLoginURIs().size() == 0) | ||
208 | { | ||
209 | gGridName = gGridInfo[gGridChoice].mName; /* Flawfinder: ignore */ | ||
210 | LLAppViewer::instance()->resetURIs(); | ||
211 | } | ||
212 | |||
213 | LLString startLocation = queryMap["location"].asString(); | 207 | LLString startLocation = queryMap["location"].asString(); |
214 | 208 | ||
215 | if (startLocation == "specify") | 209 | if (startLocation == "specify") |
@@ -794,7 +788,7 @@ BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name) | |||
794 | 788 | ||
795 | if ((S32)GRID_INFO_OTHER == domain_name) | 789 | if ((S32)GRID_INFO_OTHER == domain_name) |
796 | { | 790 | { |
797 | server = gGridName; | 791 | server = LLViewerLogin::getInstance()->getGridLabel(); |
798 | } | 792 | } |
799 | } | 793 | } |
800 | else | 794 | else |
@@ -942,20 +936,9 @@ void LLPanelLogin::loadLoginPage() | |||
942 | LLString grid; | 936 | LLString grid; |
943 | S32 grid_index; | 937 | S32 grid_index; |
944 | getServer( grid, grid_index ); | 938 | getServer( grid, grid_index ); |
945 | if( grid_index != (S32)GRID_INFO_OTHER ) | ||
946 | { | ||
947 | grid = gGridInfo[grid_index].mLabel; | ||
948 | } | ||
949 | 939 | ||
950 | if(gGridChoice != (EGridInfo)grid_index) | 940 | gViewerWindow->setMenuBackgroundColor(false, !LLViewerLogin::getInstance()->isInProductionGrid()); |
951 | { | 941 | gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); |
952 | LLAppViewer::instance()->resetURIs(); | ||
953 | gGridChoice = (EGridInfo)grid_index; | ||
954 | gSavedSettings.setString("GridChoice", gGridInfo[gGridChoice].mLabel); | ||
955 | gViewerWindow->setMenuBackgroundColor(false, | ||
956 | !LLAppViewer::instance()->isInProductionGrid()); | ||
957 | gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); | ||
958 | } | ||
959 | 942 | ||
960 | char* curl_grid = curl_escape(grid.c_str(), 0); | 943 | char* curl_grid = curl_escape(grid.c_str(), 0); |
961 | oStr << "&grid=" << curl_grid; | 944 | oStr << "&grid=" << curl_grid; |
@@ -1087,15 +1070,6 @@ void LLPanelLogin::onClickConnect(void *) | |||
1087 | if (!first.empty() && !last.empty()) | 1070 | if (!first.empty() && !last.empty()) |
1088 | { | 1071 | { |
1089 | // has both first and last name typed | 1072 | // has both first and last name typed |
1090 | |||
1091 | // store off custom server entry, if currently selected | ||
1092 | LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); | ||
1093 | S32 selected_server = combo->getValue(); | ||
1094 | if (selected_server == GRID_INFO_NONE) | ||
1095 | { | ||
1096 | LLString custom_server = combo->getValue().asString(); | ||
1097 | gSavedSettings.setString("CustomServer", custom_server); | ||
1098 | } | ||
1099 | sInstance->mCallback(0, sInstance->mCallbackData); | 1073 | sInstance->mCallback(0, sInstance->mCallbackData); |
1100 | } | 1074 | } |
1101 | else | 1075 | else |
@@ -1180,6 +1154,26 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) | |||
1180 | // static | 1154 | // static |
1181 | void LLPanelLogin::onSelectServer(LLUICtrl*, void*) | 1155 | void LLPanelLogin::onSelectServer(LLUICtrl*, void*) |
1182 | { | 1156 | { |
1157 | // The user twiddled with the grid choice ui. | ||
1158 | // apply the selection to the grid setting. | ||
1159 | LLString grid; | ||
1160 | S32 grid_index; | ||
1161 | getServer( grid, grid_index ); | ||
1162 | |||
1163 | // This new seelction will override preset uris | ||
1164 | // from the command line. | ||
1165 | LLViewerLogin* vl = LLViewerLogin::getInstance(); | ||
1166 | vl->resetURIs(); | ||
1167 | if(grid_index != GRID_INFO_OTHER) | ||
1168 | { | ||
1169 | vl->setGridChoice((EGridInfo)grid_index); | ||
1170 | grid = vl->getGridLabel(); | ||
1171 | } | ||
1172 | else | ||
1173 | { | ||
1174 | vl->setGridChoice(grid); | ||
1175 | } | ||
1176 | |||
1183 | // grid changed so show new splash screen (possibly) | 1177 | // grid changed so show new splash screen (possibly) |
1184 | loadLoginPage(); | 1178 | loadLoginPage(); |
1185 | } | 1179 | } |