Skip to content

Commit b82f52a

Browse files
authored
Remove the first login screen (#4451)
* Remove panel_login_first.xml and it's components * Remove additional first login panel resources * Remove redundant comment * Remove *.jpg search from viewer manifest
1 parent 533390a commit b82f52a

15 files changed

+36
-727
lines changed

indra/newview/llpanellogin.cpp

Lines changed: 36 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
184184
mCallback(callback),
185185
mCallbackData(cb_data),
186186
mListener(new LLPanelLoginListener(this)),
187-
mFirstLoginThisInstall(gSavedSettings.getBOOL("FirstLoginThisInstall")),
188187
mUsernameLength(0),
189188
mPasswordLength(0),
190189
mLocationLength(0),
@@ -203,14 +202,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
203202
login_holder->addChild(this);
204203
}
205204

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");
214206

215207
reshape(rect.getWidth(), rect.getHeight());
216208

@@ -224,38 +216,36 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
224216
sendChildToBack(getChildView("sign_up_text"));
225217

226218
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));
233219

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));
236227

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();
239230

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)
244237
{
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);
250240
}
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();
258241
}
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();
259249

260250
LLSLURL start_slurl(LLStartUp::getStartSLURL());
261251
// The StartSLURL might have been set either by an explicit command-line
@@ -331,15 +321,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
331321

332322
void LLPanelLogin::addFavoritesToStartLocation()
333323
{
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-
343324
// Clear the combo.
344325
LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
345326
if (!combo) return;
@@ -559,16 +540,9 @@ void LLPanelLogin::resetFields()
559540
// function is used to reset list in case of changes by external sources
560541
return;
561542
}
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);
572546
}
573547

574548
// static
@@ -586,7 +560,6 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential)
586560

587561
if(identifier.has("type") && (std::string)identifier["type"] == "agent")
588562
{
589-
// not nessesary for panel_login.xml, needed for panel_login_first.xml
590563
std::string firstname = identifier["first_name"].asString();
591564
std::string lastname = identifier["last_name"].asString();
592565
std::string login_id = firstname;
@@ -1081,8 +1054,7 @@ void LLPanelLogin::onRememberUserCheck(void*)
10811054
LLComboBox* user_combo(sInstance->getChild<LLComboBox>("username_combo"));
10821055

10831056
bool remember = remember_name->getValue().asBoolean();
1084-
if (!sInstance->mFirstLoginThisInstall
1085-
&& user_combo->getCurrentIndex() != -1
1057+
if (user_combo->getCurrentIndex() != -1
10861058
&& !remember)
10871059
{
10881060
remember = true;
@@ -1197,17 +1169,14 @@ void LLPanelLogin::updateLoginButtons()
11971169

11981170
login_btn->setEnabled(mUsernameLength != 0 && mPasswordLength != 0);
11991171

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)
12011175
{
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
12111180
}
12121181

12131182
void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)

indra/newview/llpanellogin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ class LLPanelLogin:
119119

120120
static LLPanelLogin* sInstance;
121121
static bool sCapslockDidNotification;
122-
bool mFirstLoginThisInstall;
123122

124123
static bool sCredentialSet;
125124

Binary file not shown.

indra/newview/skins/default/xui/de/panel_login_first.xml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)