From f6be1049a5f71a97202eab28503a69a7ec5dfc04 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 25 Sep 2009 03:22:13 -0500 Subject: Disabled avatar name and password fields in grid manager. Temporary, until we implement a decent account manager. --- linden/indra/newview/floaterlogin.cpp | 108 +++++++++++---------- linden/indra/newview/hippoGridManager.cpp | 18 ++-- .../skins/default/xui/en-us/floater_login.xml | 5 +- 3 files changed, 68 insertions(+), 63 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/floaterlogin.cpp b/linden/indra/newview/floaterlogin.cpp index 6519962..17e4d0c 100644 --- a/linden/indra/newview/floaterlogin.cpp +++ b/linden/indra/newview/floaterlogin.cpp @@ -194,27 +194,28 @@ void LoginFloater::refresh_grids() sInstance->childSetText("helperuri", gridInfo->getHelperUri()); sInstance->childSetText("website", gridInfo->getWebSite()); sInstance->childSetText("support", gridInfo->getSupportUrl()); - sInstance->childSetText("register", gridInfo->getRegisterUrl()); - sInstance->childSetText("password", gridInfo->getPasswordUrl()); - sInstance->childSetText("first_name", gridInfo->getFirstName()); - sInstance->childSetText("last_name", gridInfo->getLastName()); - if(gridInfo->getAvatarPassword().length() == 32) - sInstance->childSetText("avatar_password", std::string(PASSWORD_FILLER)); - else if(gridInfo->getPasswordUrl().empty()) - sInstance->childSetText("avatar_password", std::string("")); -/* - if (gridInfo->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) { - //childSetEnabled("search", false); - //childSetText("search", LLStringExplicit("")); - childSetEnabled("render_compat", false); - childSetValue("render_compat", false); - } else { - //childSetEnabled("search", true); - //childSetText("search", gridInfo->getSearchUrl()); - childSetEnabled("render_compat", true); - childSetValue("render_compat", gridInfo->isRenderCompat()); - } - */ + sInstance->childSetText("register", gridInfo->getRegisterUrl()); + sInstance->childSetText("password", gridInfo->getPasswordUrl()); + + // sInstance->childSetText("first_name", gridInfo->getFirstName()); + // sInstance->childSetText("last_name", gridInfo->getLastName()); + // if(gridInfo->getAvatarPassword().length() == 32) + // sInstance->childSetText("avatar_password", std::string(PASSWORD_FILLER)); + // else if(gridInfo->getPasswordUrl().empty()) + // sInstance->childSetText("avatar_password", std::string("")); + + // if (gridInfo->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) { + // //childSetEnabled("search", false); + // //childSetText("search", LLStringExplicit("")); + // childSetEnabled("render_compat", false); + // childSetValue("render_compat", false); + // } else { + // //childSetEnabled("search", true); + // //childSetText("search", gridInfo->getSearchUrl()); + // childSetEnabled("render_compat", true); + // childSetValue("render_compat", gridInfo->isRenderCompat()); + // } + } else { std::string empty = ""; sInstance->childSetText("gridnick", empty); @@ -223,9 +224,9 @@ void LoginFloater::refresh_grids() sInstance->childSetText("loginpage", empty); sInstance->childSetText("helperuri", empty); sInstance->childSetText("website", empty); - sInstance->childSetText("first_name", empty); - sInstance->childSetText("last_name", empty); - sInstance->childSetText("avatar_password", empty); + // sInstance->childSetText("first_name", empty); + // sInstance->childSetText("last_name", empty); + // sInstance->childSetText("avatar_password", empty); } } else if (sInstance->mState == ADD_NEW) { llwarns << "ADD_NEW" << llendl; @@ -240,9 +241,9 @@ void LoginFloater::refresh_grids() sInstance->childSetText("support", empty); sInstance->childSetText("register", empty); sInstance->childSetText("password", empty); - sInstance->childSetText("first_name", empty); - sInstance->childSetText("last_name", empty); - sInstance->childSetText("avatar_password", empty); + // sInstance->childSetText("first_name", empty); + // sInstance->childSetText("last_name", empty); + // sInstance->childSetText("avatar_password", empty); //childSetEnabled("search", true); //childSetText("search", empty); } else if (sInstance->mState == ADD_COPY) { @@ -275,23 +276,24 @@ void LoginFloater::applyChanges() gridInfo->setHelperUri(childGetValue("helperuri")); gridInfo->setWebSite(childGetValue("website")); gridInfo->setSupportUrl(childGetValue("support")); - gridInfo->setRegisterUrl(childGetValue("register")); + gridInfo->setRegisterUrl(childGetValue("register")); gridInfo->setPasswordUrl(childGetValue("password")); - gridInfo->setFirstName(childGetValue("first_name")); - gridInfo->setLastName(childGetValue("last_name")); //gridInfo->setSearchUrl(childGetValue("search")); gridInfo->setRenderCompat(childGetValue("render_compat")); - if(childGetValue("avatar_password").asString().empty()) - gridInfo->setAvatarPassword(std::string("")); - else if(childGetValue("avatar_password").asString() != std::string(PASSWORD_FILLER)) - { - // store account authentication data - std::string auth_password = childGetValue("avatar_password"); - std::string hashed_password; - hashPassword(auth_password, hashed_password); - gridInfo->setAvatarPassword(hashed_password); - } + // gridInfo->setFirstName(childGetValue("first_name")); + // gridInfo->setLastName(childGetValue("last_name")); + // if(childGetValue("avatar_password").asString().empty()) + // gridInfo->setAvatarPassword(std::string("")); + // else if(childGetValue("avatar_password").asString() != std::string(PASSWORD_FILLER)) + // { + // // store account authentication data + // std::string auth_password = childGetValue("avatar_password"); + // std::string hashed_password; + // hashPassword(auth_password, hashed_password); + // gridInfo->setAvatarPassword(hashed_password); + // } + //this bug was a feature -Patrick Sapinski (Friday, August 21, 2009) //LLPanelLogin::setFields(gridInfo->getFirstName(), gridInfo->getLastName(), // gridInfo->getAvatarPassword(), true); @@ -339,22 +341,22 @@ bool LoginFloater::createNewGrid() grid->setHelperUri(childGetValue("helperuri")); grid->setWebSite(childGetValue("website")); grid->setSupportUrl(childGetValue("support")); - grid->setRegisterUrl(childGetValue("register")); + grid->setRegisterUrl(childGetValue("register")); grid->setPasswordUrl(childGetValue("password")); - grid->setFirstName(childGetValue("first_name")); - grid->setLastName(childGetValue("last_name")); //grid->setSearchUrl(childGetValue("search")); grid->setRenderCompat(childGetValue("render_compat")); gHippoGridManager->addGrid(grid); - if(childGetValue("avatar_password").asString().empty()) - grid->setAvatarPassword(std::string("")); - else - { - std::string hashed_password; - hashPassword(childGetValue("avatar_password"), hashed_password); - grid->setAvatarPassword(hashed_password); - } + // grid->setFirstName(childGetValue("first_name")); + // grid->setLastName(childGetValue("last_name")); + // if(childGetValue("avatar_password").asString().empty()) + // grid->setAvatarPassword(std::string("")); + // else + // { + // std::string hashed_password; + // hashPassword(childGetValue("avatar_password"), hashed_password); + // grid->setAvatarPassword(hashed_password); + // } mCurGrid = gridnick; return true; @@ -392,8 +394,8 @@ void LoginFloater::retrieveGridInfo() if (grid->getLoginPage() != "") childSetText("loginpage", grid->getLoginPage()); if (grid->getHelperUri() != "") childSetText("helperuri", grid->getHelperUri()); if (grid->getWebSite() != "") childSetText("website", grid->getWebSite()); - if (grid->getSupportUrl() != "") childSetText("support", grid->getSupportUrl()); - if (grid->getRegisterUrl() != "") childSetText("register", grid->getRegisterUrl()); + if (grid->getSupportUrl() != "") childSetText("support", grid->getSupportUrl()); + if (grid->getRegisterUrl() != "") childSetText("register", grid->getRegisterUrl()); if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl()); //if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl()); } else { diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp index 56d585c..c7693af 100644 --- a/linden/indra/newview/hippoGridManager.cpp +++ b/linden/indra/newview/hippoGridManager.cpp @@ -543,9 +543,9 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer) if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]); //if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]); if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]); - if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); - if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); - if (gridMap.has("avatarpassword")) grid->setAvatarPassword(gridMap["avatarpassword"]); + // if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); + // if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); + // if (gridMap.has("avatarpassword")) grid->setAvatarPassword(gridMap["avatarpassword"]); if (newGrid) addGrid(grid); } } @@ -573,14 +573,14 @@ void HippoGridManager::saveFile() gridInfo[i]["loginpage"] = grid->getLoginPage(); gridInfo[i]["helperuri"] = grid->getHelperUri(); gridInfo[i]["website"] = grid->getWebSite(); - gridInfo[i]["support"] = grid->getSupportUrl(); + gridInfo[i]["support"] = grid->getSupportUrl(); gridInfo[i]["register"] = grid->getRegisterUrl(); - gridInfo[i]["password"] = grid->getPasswordUrl(); - gridInfo[i]["firstname"] = grid->getFirstName(); - gridInfo[i]["lastname"] = grid->getLastName(); - gridInfo[i]["avatarpassword"] = grid->getAvatarPassword(); + gridInfo[i]["password"] = grid->getPasswordUrl(); + // gridInfo[i]["firstname"] = grid->getFirstName(); + // gridInfo[i]["lastname"] = grid->getLastName(); + // gridInfo[i]["avatarpassword"] = grid->getAvatarPassword(); - //gridInfo[i]["search"] = grid->getSearchUrl(); + //gridInfo[i]["search"] = grid->getSearchUrl(); gridInfo[i]["render_compat"] = grid->isRenderCompat(); } diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_login.xml b/linden/indra/newview/skins/default/xui/en-us/floater_login.xml index 4c2146b..57e5978 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_login.xml @@ -49,6 +49,8 @@ height="20" left_delta="90" max_length="40" mouse_opaque="true" name="gridnick" select_all_on_focus_received="true" width="200" /> + + --> - \ No newline at end of file + -- cgit v1.1