// static void LLPanelLogin::onClickConnect(void *) { if (sInstance && sInstance->mCallback) { // tell the responder we're not here anymore if ( gResponsePtr ) gResponsePtr->setParent( 0 ); // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); std::string first, last, password; if (nameSplit(sInstance->getChild<LLComboBox>("name_combo")->getTextEntry(), first, last)) { // has both first and last name typed sInstance->mCallback(0, sInstance->mCallbackData); } else { if (gHippoGridManager->getConnectedGrid()->getRegisterUrl().empty()) { LLNotifications::instance().add("MustHaveAccountToLogInNoLinks"); } else { LLNotifications::instance().add("MustHaveAccountToLogIn", LLSD(), LLSD(), LLPanelLogin::newAccountAlertCallback); } } } }
// static void LLPanelLogin::onClickConnect(void *) { if (sInstance && sInstance->mCallback) { // JC - Make sure the fields all get committed. gFocusMgr.setKeyboardFocus(NULL); std::string first, last, password; if (nameSplit(sInstance->getChild<LLComboBox>("username_combo")->getTextEntry(), first, last)) { // has both first and last name typed sInstance->mCallback(0, sInstance->mCallbackData); } else { if (gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty()) { LLNotificationsUtil::add("MustHaveAccountToLogInNoLinks"); } else { LLNotificationsUtil::add("MustHaveAccountToLogIn", LLSD(), LLSD(), LLPanelLogin::newAccountAlertCallback); } } } }
// static void LLPanelLogin::getFields(std::string *firstname, std::string *lastname, std::string *password) { if (!sInstance) { llwarns << "Attempted getFields with no login view shown" << llendl; return; } nameSplit(sInstance->getChild<LLComboBox>("name_combo")->getTextEntry(), *firstname, *lastname); LLStringUtil::trim(*firstname); LLStringUtil::trim(*lastname); *password = sInstance->mMungedPassword; }
bool TreeView::add(const std::string& name, const osg::ref_ptr<osg::Node> node, const bool& enableNode, const bool& showNode, const bool& replace, d3DisplayItem* myParent) { static const std::string splitIndicator("::"); // get the name split point size_t nameSplit( name.find(splitIndicator) ); // see if we have children if ( std::string::npos != nameSplit ) { // the first part is the parent's name std::string pre( name.substr(0, nameSplit) ); // the second part is the children std::string post( name.substr(nameSplit + splitIndicator.size(), name.size()) ); // call the add parent return addParent(pre, post, node, enableNode, showNode, replace, myParent); } // this must be a leaf node... do we already have this child? d3DisplayItem* entry(findChild(myParent, name)); // see if we need to create a new entry if ( nullptr == entry ) { return createNewEntry(name, node, enableNode, showNode, myParent); } else { return addToEntry(entry, node, enableNode, replace, myParent); } return false; };
// static void LLPanelLogin::onClickConnect(void *) { if (sInstance && sInstance->mCallback) { // save identity settings for login bool specify_mac = sInstance->getChild<LLCheckBoxCtrl>("mac_check")->getValue(); bool specify_id0 = sInstance->getChild<LLCheckBoxCtrl>("id0_check")->getValue(); gSavedSettings.setBOOL("SpecifyMAC", specify_mac); gSavedSettings.setBOOL("SpecifyID0", specify_id0); if(specify_mac) { std::string specified_mac = sInstance->getChild<LLLineEditor>("mac_edit")->getText(); gSavedSettings.setString("SpecifiedMAC", specified_mac); } if(specify_id0) { std::string specified_id0 = sInstance->getChild<LLLineEditor>("id0_edit")->getText(); gSavedSettings.setString("SpecifiedID0", specified_id0); } std::string specified_channel = sInstance->getChild<LLLineEditor>("channel_edit")->getText(); //make sure they aren't using one of using Emerald's channels (or one that they think is) std::string test_channel = specified_channel; std::transform(test_channel.begin(), test_channel.end(), test_channel.begin(), toupper); if(test_channel.find( "EMERALD", 0 ) != std::string::npos || test_channel.find( "GREENLIFE", 0 ) != std::string::npos) { LLSD args; args["MESSAGE"] = std::string("Normally one changes the channel to avoid detection.\n\n") + std::string("A lot of the people working on client detection also work on Emerald in some capacity\n\n") + std::string("They can detect people spoofing Emerald. Choose another channel name."); LLNotifications::instance().add("GenericAlert", args); return; } gSavedSettings.setString("SpecifiedChannel", specified_channel); U32 specified_ver_maj = (U32)sInstance->getChild<LLSpinCtrl>("vermaj_spin")->getValue().asInteger(); gSavedSettings.setU32("SpecifiedVersionMaj", specified_ver_maj); U32 specified_ver_min = (U32)sInstance->getChild<LLSpinCtrl>("vermin_spin")->getValue().asInteger(); gSavedSettings.setU32("SpecifiedVersionMin", specified_ver_min); U32 specified_ver_patch = (U32)sInstance->getChild<LLSpinCtrl>("verpatch_spin")->getValue().asInteger(); gSavedSettings.setU32("SpecifiedVersionPatch", specified_ver_patch); U32 specified_ver_build = (U32)sInstance->getChild<LLSpinCtrl>("verbuild_spin")->getValue().asInteger(); gSavedSettings.setU32("SpecifiedVersionBuild", specified_ver_build); // </edit> // tell the responder we're not here anymore if ( gResponsePtr ) gResponsePtr->setParent( 0 ); // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); std::string first, last, password; if (nameSplit(sInstance->getChild<LLComboBox>("name_combo")->getTextEntry(), first, last)) { // has both first and last name typed sInstance->mCallback(0, sInstance->mCallbackData); } else { if (gHippoGridManager->getConnectedGrid()->getRegisterUrl().empty()) { LLNotifications::instance().add("MustHaveAccountToLogInNoLinks"); } else { LLNotifications::instance().add("MustHaveAccountToLogIn", LLSD(), LLSD(), LLPanelLogin::newAccountAlertCallback); } } } }