// static void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus) { if (!sInstance) { llwarns << "Attempted setFields with no login view shown" << llendl; return; } LLCheckBoxCtrl* remember_pass_check = sInstance->getChild<LLCheckBoxCtrl>("remember_check"); std::string fullname = nameJoin(entry.getFirstName(), entry.getLastName()); LLComboBox* login_combo = sInstance->getChild<LLComboBox>("name_combo"); login_combo->setTextEntry(fullname); //sInstance->childSetText("name_combo", fullname); std::string grid = entry.getGrid(); if(!grid.empty() && gHippoGridManager->getGrid(grid) && grid != gHippoGridManager->getCurrentGridNick()) { gHippoGridManager->setCurrentGrid(grid); LLPanelLogin::refreshLoginPage(); } if (entry.getPassword().empty()) { sInstance->childSetText("password_edit", std::string("")); remember_pass_check->setValue(LLSD(false)); } else { const std::string filler("123456789!123456"); sInstance->childSetText("password_edit", filler); sInstance->mIncomingPassword = filler; sInstance->mMungedPassword = entry.getPassword(); remember_pass_check->setValue(LLSD(true)); } if (takeFocus) { giveFocus(); } }
static std::string getDisplayString(const LLSavedLoginEntry& entry) { return getDisplayString(entry.getFirstName(), entry.getLastName(), entry.getGrid()); }
// static void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus) { if (!sInstance) { llwarns << "Attempted setFields with no login view shown" << llendl; return; } LLCheckBoxCtrl* remember_pass_check = sInstance->getChild<LLCheckBoxCtrl>("remember_check"); LLComboBox* login_combo = sInstance->getChild<LLComboBox>("first_name_combo"); login_combo->setLabel(entry.getFirstName()); login_combo->resetDirty(); login_combo->resetTextDirty(); LLLineEditor* last_name = sInstance->getChild<LLLineEditor>("last_name_edit"); last_name->setText(entry.getLastName()); last_name->resetDirty(); if (entry.getPassword().empty()) { sInstance->childSetText("password_edit", std::string("")); remember_pass_check->setValue(LLSD(false)); } else { const std::string filler("123456789!123456"); sInstance->childSetText("password_edit", filler); sInstance->mIncomingPassword = filler; sInstance->mMungedPassword = entry.getPassword(); remember_pass_check->setValue(LLSD(true)); } LLComboBox* server_combo = sInstance->getChild<LLComboBox>("server_combo"); if (server_combo->getSimple() != entry.getGridName()) // Avoid loops. { server_combo->setSimple(entry.getGridName()); // Same string as used in login_show(). } LLViewerLogin* vl = LLViewerLogin::getInstance(); if (entry.getGrid() == GRID_INFO_OTHER) { vl->setGridURI(entry.getGridURI().asString()); vl->setHelperURI(entry.getHelperURI().asString()); vl->setLoginPageURI(entry.getLoginPageURI().asString()); } EGridInfo entry_grid = entry.getGrid(); if (entry_grid == GRID_INFO_OTHER || entry_grid != vl->getGridChoice()) { vl->setGridChoice(entry_grid); // grid changed so show new splash screen (possibly) loadLoginPage(); } if (takeFocus) { giveFocus(); } }