// 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(), entry.isSecondLife()); LLComboBox* login_combo = sInstance->getChild<LLComboBox>("username_combo"); login_combo->setTextEntry(fullname); login_combo->resetTextDirty(); //sInstance->childSetText("username_combo", fullname); std::string grid = entry.getGrid(); //grid comes via LLSavedLoginEntry, which uses full grid names, not nicks if(!grid.empty() && gHippoGridManager->getGrid(grid) && grid != gHippoGridManager->getCurrentGridName()) { gHippoGridManager->setCurrentGrid(grid); } 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(), entry.isSecondLife()); }