@@ -184,7 +184,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
184
184
mCallback(callback),
185
185
mCallbackData(cb_data),
186
186
mListener(new LLPanelLoginListener(this )),
187
- mFirstLoginThisInstall(gSavedSettings .getBOOL(" FirstLoginThisInstall" )),
188
187
mUsernameLength(0 ),
189
188
mPasswordLength(0 ),
190
189
mLocationLength(0 ),
@@ -203,14 +202,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
203
202
login_holder->addChild (this );
204
203
}
205
204
206
- if (mFirstLoginThisInstall )
207
- {
208
- buildFromFile ( " panel_login_first.xml" );
209
- }
210
- else
211
- {
212
- buildFromFile ( " panel_login.xml" );
213
- }
205
+ buildFromFile (" panel_login.xml" );
214
206
215
207
reshape (rect.getWidth (), rect.getHeight ());
216
208
@@ -224,38 +216,36 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
224
216
sendChildToBack (getChildView (" sign_up_text" ));
225
217
226
218
std::string current_grid = LLGridManager::getInstance ()->getGrid ();
227
- if (!mFirstLoginThisInstall )
228
- {
229
- LLComboBox* favorites_combo = getChild<LLComboBox>(" start_location_combo" );
230
- updateLocationSelectorsVisibility (); // separate so that it can be called from preferences
231
- favorites_combo->setReturnCallback (boost::bind (&LLPanelLogin::onClickConnect, false ));
232
- favorites_combo->setFocusLostCallback (boost::bind (&LLPanelLogin::onLocationSLURL, this ));
233
219
234
- LLComboBox* server_choice_combo = getChild<LLComboBox>(" server_combo" );
235
- server_choice_combo->setCommitCallback (boost::bind (&LLPanelLogin::onSelectServer, this ));
220
+ LLComboBox* favorites_combo = getChild<LLComboBox>(" start_location_combo" );
221
+ updateLocationSelectorsVisibility (); // separate so that it can be called from preferences
222
+ favorites_combo->setReturnCallback (boost::bind (&LLPanelLogin::onClickConnect, false ));
223
+ favorites_combo->setFocusLostCallback (boost::bind (&LLPanelLogin::onLocationSLURL, this ));
224
+
225
+ LLComboBox* server_choice_combo = getChild<LLComboBox>(" server_combo" );
226
+ server_choice_combo->setCommitCallback (boost::bind (&LLPanelLogin::onSelectServer, this ));
236
227
237
- // Load all of the grids, sorted, and then add a bar and the current grid at the top
238
- server_choice_combo->removeall ();
228
+ // Load all of the grids, sorted, and then add a bar and the current grid at the top
229
+ server_choice_combo->removeall ();
239
230
240
- std::map<std::string, std::string> known_grids = LLGridManager::getInstance ()->getKnownGrids ();
241
- for (std::map<std::string, std::string>::iterator grid_choice = known_grids.begin ();
242
- grid_choice != known_grids.end ();
243
- grid_choice++)
231
+ std::map<std::string, std::string> known_grids = LLGridManager::getInstance ()->getKnownGrids ();
232
+ for (std::map<std::string, std::string>::iterator grid_choice = known_grids.begin ();
233
+ grid_choice != known_grids.end ();
234
+ grid_choice++)
235
+ {
236
+ if (!grid_choice->first .empty () && current_grid != grid_choice->first )
244
237
{
245
- if (!grid_choice->first .empty () && current_grid != grid_choice->first )
246
- {
247
- LL_DEBUGS (" AppInit" ) << " adding " << grid_choice->first << LL_ENDL;
248
- server_choice_combo->add (grid_choice->second , grid_choice->first );
249
- }
238
+ LL_DEBUGS (" AppInit" ) << " adding " << grid_choice->first << LL_ENDL;
239
+ server_choice_combo->add (grid_choice->second , grid_choice->first );
250
240
}
251
- server_choice_combo->sortByName ();
252
-
253
- LL_DEBUGS (" AppInit" ) << " adding current " << current_grid << LL_ENDL;
254
- server_choice_combo->add (LLGridManager::getInstance ()->getGridLabel (),
255
- current_grid,
256
- ADD_TOP);
257
- server_choice_combo->selectFirstItem ();
258
241
}
242
+ server_choice_combo->sortByName ();
243
+
244
+ LL_DEBUGS (" AppInit" ) << " adding current " << current_grid << LL_ENDL;
245
+ server_choice_combo->add (LLGridManager::getInstance ()->getGridLabel (),
246
+ current_grid,
247
+ ADD_TOP);
248
+ server_choice_combo->selectFirstItem ();
259
249
260
250
LLSLURL start_slurl (LLStartUp::getStartSLURL ());
261
251
// The StartSLURL might have been set either by an explicit command-line
@@ -331,15 +321,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
331
321
332
322
void LLPanelLogin::addFavoritesToStartLocation ()
333
323
{
334
- if (mFirstLoginThisInstall )
335
- {
336
- // first login panel has no favorites, just update name length and buttons
337
- std::string user_defined_name = getChild<LLComboBox>(" username_combo" )->getSimple ();
338
- mUsernameLength = static_cast <unsigned int >(user_defined_name.length ());
339
- updateLoginButtons ();
340
- return ;
341
- }
342
-
343
324
// Clear the combo.
344
325
LLComboBox* combo = getChild<LLComboBox>(" start_location_combo" );
345
326
if (!combo) return ;
@@ -559,16 +540,9 @@ void LLPanelLogin::resetFields()
559
540
// function is used to reset list in case of changes by external sources
560
541
return ;
561
542
}
562
- if (sInstance ->mFirstLoginThisInstall )
563
- {
564
- // no list to populate
565
- LL_WARNS () << " Shouldn't happen, user should have no ability to modify list on first install" << LL_ENDL;
566
- }
567
- else
568
- {
569
- LLPointer<LLCredential> cred = gSecAPIHandler ->loadCredential (LLGridManager::getInstance ()->getGrid ());
570
- sInstance ->populateUserList (cred);
571
- }
543
+
544
+ LLPointer<LLCredential> cred = gSecAPIHandler ->loadCredential (LLGridManager::getInstance ()->getGrid ());
545
+ sInstance ->populateUserList (cred);
572
546
}
573
547
574
548
// static
@@ -586,7 +560,6 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential)
586
560
587
561
if (identifier.has (" type" ) && (std::string)identifier[" type" ] == " agent" )
588
562
{
589
- // not nessesary for panel_login.xml, needed for panel_login_first.xml
590
563
std::string firstname = identifier[" first_name" ].asString ();
591
564
std::string lastname = identifier[" last_name" ].asString ();
592
565
std::string login_id = firstname;
@@ -1081,8 +1054,7 @@ void LLPanelLogin::onRememberUserCheck(void*)
1081
1054
LLComboBox* user_combo (sInstance ->getChild <LLComboBox>(" username_combo" ));
1082
1055
1083
1056
bool remember = remember_name->getValue ().asBoolean ();
1084
- if (!sInstance ->mFirstLoginThisInstall
1085
- && user_combo->getCurrentIndex () != -1
1057
+ if (user_combo->getCurrentIndex () != -1
1086
1058
&& !remember)
1087
1059
{
1088
1060
remember = true ;
@@ -1197,17 +1169,14 @@ void LLPanelLogin::updateLoginButtons()
1197
1169
1198
1170
login_btn->setEnabled (mUsernameLength != 0 && mPasswordLength != 0 );
1199
1171
1200
- if (!mFirstLoginThisInstall )
1172
+ LLComboBox* user_combo = getChild<LLComboBox>(" username_combo" );
1173
+ LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>(" remember_name" );
1174
+ if (user_combo->getCurrentIndex () != -1 )
1201
1175
{
1202
- LLComboBox* user_combo = getChild<LLComboBox>(" username_combo" );
1203
- LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>(" remember_name" );
1204
- if (user_combo->getCurrentIndex () != -1 )
1205
- {
1206
- remember_name->setValue (true );
1207
- LLCheckBoxCtrl* remember_pass = getChild<LLCheckBoxCtrl>(" remember_password" );
1208
- remember_pass->setEnabled (true );
1209
- } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user
1210
- }
1176
+ remember_name->setValue (true );
1177
+ LLCheckBoxCtrl* remember_pass = getChild<LLCheckBoxCtrl>(" remember_password" );
1178
+ remember_pass->setEnabled (true );
1179
+ } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user
1211
1180
}
1212
1181
1213
1182
void LLPanelLogin::populateUserList (LLPointer<LLCredential> credential)
0 commit comments