From b3c39a47e76f595fd953d9ccffc58b0dfb8359db Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 10 Sep 2009 02:38:36 -0500 Subject: Updated Grid Manager from Meerkat's SVN (as of r215). --- linden/indra/llvfs/lldir.cpp | 12 +- linden/indra/llvfs/lldir.h | 4 +- linden/indra/newview/CMakeLists.txt | 12 - .../indra/newview/app_settings/default_grids.xml | 14 - linden/indra/newview/authentication_controller.cpp | 80 ----- linden/indra/newview/authentication_controller.h | 42 --- linden/indra/newview/authentication_floater.cpp | 75 ----- linden/indra/newview/authentication_floater.h | 35 --- linden/indra/newview/authentication_model.cpp | 111 ------- linden/indra/newview/authentication_model.h | 53 ---- linden/indra/newview/controllerlogin.cpp | 142 --------- linden/indra/newview/controllerlogin.h | 55 ---- linden/indra/newview/controllerpasswords.cpp | 41 --- linden/indra/newview/controllerpasswords.h | 37 --- linden/indra/newview/floaterlogin.cpp | 348 +++++++-------------- linden/indra/newview/floaterlogin.h | 26 +- linden/indra/newview/hippoGridManager.cpp | 5 +- linden/indra/newview/hippoGridManager.h | 344 ++++++++++---------- linden/indra/newview/llfloaterworldmap.cpp | 4 +- linden/indra/newview/llpanellogin.cpp | 49 +-- linden/indra/newview/llprefsim.cpp | 4 +- linden/indra/newview/llstartup.cpp | 17 +- linden/indra/newview/prefpanelpasswords.cpp | 40 --- linden/indra/newview/prefpanelpasswords.h | 30 -- .../skins/default/xui/en-us/floater_login.xml | 208 ++++++++---- 25 files changed, 478 insertions(+), 1310 deletions(-) delete mode 100644 linden/indra/newview/authentication_controller.cpp delete mode 100644 linden/indra/newview/authentication_controller.h delete mode 100644 linden/indra/newview/authentication_floater.cpp delete mode 100644 linden/indra/newview/authentication_floater.h delete mode 100644 linden/indra/newview/authentication_model.cpp delete mode 100644 linden/indra/newview/authentication_model.h delete mode 100644 linden/indra/newview/controllerlogin.cpp delete mode 100644 linden/indra/newview/controllerlogin.h delete mode 100644 linden/indra/newview/controllerpasswords.cpp delete mode 100644 linden/indra/newview/controllerpasswords.h delete mode 100644 linden/indra/newview/prefpanelpasswords.cpp delete mode 100644 linden/indra/newview/prefpanelpasswords.h (limited to 'linden') diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index 1dc00dd..c9af311 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp @@ -520,19 +520,23 @@ std::string LLDir::getForbiddenFileChars() return "\\/:*?\"<>|"; } -void LLDir::setLindenUserDir(const std::string &first, const std::string &last) +void LLDir::setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last) { // if both first and last aren't set, assume we're grabbing the cached dir if (!first.empty() && !last.empty()) { // some platforms have case-sensitive filesystems, so be // utterly consistent with our firstname/lastname case. + std::string gridlower(grid); + LLStringUtil::toLower(gridlower); std::string firstlower(first); LLStringUtil::toLower(firstlower); std::string lastlower(last); LLStringUtil::toLower(lastlower); mLindenUserDir = getOSUserAppDir(); mLindenUserDir += mDirDelimiter; + mLindenUserDir += gridlower; + mLindenUserDir += "-"; mLindenUserDir += firstlower; mLindenUserDir += "_"; mLindenUserDir += lastlower; @@ -557,19 +561,23 @@ void LLDir::setChatLogsDir(const std::string &path) } } -void LLDir::setPerAccountChatLogsDir(const std::string &first, const std::string &last) +void LLDir::setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last) { // if both first and last aren't set, assume we're grabbing the cached dir if (!first.empty() && !last.empty()) { // some platforms have case-sensitive filesystems, so be // utterly consistent with our firstname/lastname case. + std::string gridlower(grid); + LLStringUtil::toLower(gridlower); std::string firstlower(first); LLStringUtil::toLower(firstlower); std::string lastlower(last); LLStringUtil::toLower(lastlower); mPerAccountChatLogsDir = getChatLogsDir(); mPerAccountChatLogsDir += mDirDelimiter; + mPerAccountChatLogsDir += gridlower; + mPerAccountChatLogsDir += "-"; mPerAccountChatLogsDir += firstlower; mPerAccountChatLogsDir += "_"; mPerAccountChatLogsDir += lastlower; diff --git a/linden/indra/llvfs/lldir.h b/linden/indra/llvfs/lldir.h index b041afc..4ab5d85 100644 --- a/linden/indra/llvfs/lldir.h +++ b/linden/indra/llvfs/lldir.h @@ -119,8 +119,8 @@ class LLDir static std::string getForbiddenFileChars(); virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir - virtual void setPerAccountChatLogsDir(const std::string &first, const std::string &last); // Set the per user chat log directory. - virtual void setLindenUserDir(const std::string &first, const std::string &last); // Set the linden user dir to this user's dir + virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory. + virtual void setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last); // Set the linden user dir to this user's dir virtual void setSkinFolder(const std::string &skin_folder); virtual bool setCacheDir(const std::string &path); diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index cd725d2..0a4ee82 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -61,11 +61,6 @@ include_directories( ) set(viewer_SOURCE_FILES - authentication_controller.cpp - authentication_floater.cpp - authentication_model.cpp - controllerlogin.cpp - controllerpasswords.cpp floaterlogin.cpp hippoGridManager.cpp hippoLimits.cpp @@ -442,7 +437,6 @@ set(viewer_SOURCE_FILES llxmlrpctransaction.cpp noise.cpp pipeline.cpp - prefpanelpasswords.cpp primbackup.cpp rlvhandler.cpp rlvhelper.cpp @@ -471,11 +465,6 @@ endif (LINUX) set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake - authentication_controller.h - authentication_floater.h - authentication_model.h - controllerlogin.h - controllerpasswords.h floaterlogin.h hippoGridManager.h hippoLimits.h @@ -859,7 +848,6 @@ set(viewer_HEADER_FILES macmain.h noise.h pipeline.h - prefpanelpasswords.h primbackup.h randgauss.h VertexCache.h diff --git a/linden/indra/newview/app_settings/default_grids.xml b/linden/indra/newview/app_settings/default_grids.xml index dabcb0b..05d8bed 100644 --- a/linden/indra/newview/app_settings/default_grids.xml +++ b/linden/indra/newview/app_settings/default_grids.xml @@ -10,20 +10,6 @@ default_grids_version0 - - - gridnickosgrid - gridnameOSGrid - platformOpenSim - loginurihttp://osgrid.org:8002/ - loginpagehttp://osgrid.org/loginscreen.php - helperurihttp://osgrid.org/ - websitehttp://osgrid.org/ - supporthttp://osgrid.org/ - registerhttp://osgrid.org/index.php?page=create - passwordhttp://osgrid.org/index.php?page=change - - gridnicksecondlife diff --git a/linden/indra/newview/authentication_controller.cpp b/linden/indra/newview/authentication_controller.cpp deleted file mode 100644 index a060409..0000000 --- a/linden/indra/newview/authentication_controller.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * AuthenticationController.cpp - * SecondLife - * - * Created by RMS on 7/1/08. - * - */ - -#include "llviewerprecompiledheaders.h" -#include "authentication_floater.h" -#include "llviewerobject.h" -#include "llcheckboxctrl.h" -#include "llselectmgr.h" -#include "authentication_controller.h" - -// Statics -std::string AuthenticationController::target_grid; -std::string AuthenticationController::username; -std::string AuthenticationController::password; -BOOL AuthenticationController::store_pw = FALSE; - -AuthenticationController::AuthenticationController(const std::string& tg, void (*cb)(void*)) -{ - target_grid = tg; - callback = cb; -} - -AuthenticationController::~AuthenticationController() -{ -} - -// user interface callbacks: all static -void AuthenticationController::onCommitUser(LLUICtrl* ctrl, void* userdata) -{ - AuthenticationFloater *floater = (AuthenticationFloater*)userdata; - username = floater->childGetText("User_edit"); -} - -void AuthenticationController::onCommitPassword(LLUICtrl* ctrl, void* userdata) -{ - AuthenticationFloater *floater = (AuthenticationFloater*)userdata; - password = floater->childGetText("Password_edit"); -} - -void AuthenticationController::onCommitRemember(LLUICtrl* ctrl, void* userdata) -{ - LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); - if(!object) return; - - LLCheckBoxCtrl *check = (LLCheckBoxCtrl*)ctrl; - store_pw = check->get(); -} - -void AuthenticationController::onAccept(void* userdata) -{ - -} - -void AuthenticationController::onCancel(void* userdata) -{ - AuthenticationFloater *floater = (AuthenticationFloater*)userdata; - floater->cancel(); - floater->close(); -} - -void AuthenticationController::onClickRegister(void* userdata) -{ - llinfos << "onClickRegister" << llendl; -} - -void AuthenticationController::retrieveStoredAccountData(void* userdata) -{ - -} - -// static -std::string AuthenticationController::getTargetGrid() -{ - return target_grid; -} diff --git a/linden/indra/newview/authentication_controller.h b/linden/indra/newview/authentication_controller.h deleted file mode 100644 index db875ea..0000000 --- a/linden/indra/newview/authentication_controller.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * AuthenticationController.h - * SecondLife - * - * Created by RMS on 7/1/08. - * - */ - -#ifndef PL_AuthenticationController_H -#define PL_AuthenticationController_H - -#include "llfloater.h" - -class AuthenticationController -{ -public: - AuthenticationController(const std::string& tg, void (*cb)(void*)); - virtual ~AuthenticationController(); - - // line editor callbacks - static void onCommitUser(LLUICtrl* ctrl, void* userdata); - static void onCommitPassword(LLUICtrl* ctrl, void* userdata); - static void onCommitRemember(LLUICtrl* ctrl, void* userdata); - // button callbacks - static void onAccept(void* userdata); - static void onCancel(void* userdata); - static void onClickRegister(void* userdata); - - void retrieveStoredAccountData(void* userdata); - static std::string getTargetGrid(); - -private: - static std::string target_grid; - static std::string username; - static std::string password; - static BOOL store_pw; - void (*callback)(void*); -}; - - -#endif // PL_AuthenticationController_H - diff --git a/linden/indra/newview/authentication_floater.cpp b/linden/indra/newview/authentication_floater.cpp deleted file mode 100644 index 2fc7add..0000000 --- a/linden/indra/newview/authentication_floater.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * AuthenticationFloater.cpp - * Cross-grid authentication system view. - * - * Created by RMS on 7/1/08. - * - */ - - -#include "llviewerprecompiledheaders.h" -#include "authentication_floater.h" -#include "lluictrlfactory.h" - -// Statics -AuthenticationFloater* AuthenticationFloater::sInstance = NULL; -AuthenticationController* AuthenticationFloater::sController = NULL; - -AuthenticationFloater::AuthenticationFloater() -: LLFloater("floater_authentication") -{ - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_authentication.xml"); - - childSetTextArg("Intro_text", "[TARGET_GRID]", sController->getTargetGrid()); - - childSetCommitCallback("User_edit", controller()->onCommitUser, this); - childSetCommitCallback("Password_edit", controller()->onCommitPassword, this); - childSetCommitCallback("Remember_check", controller()->onCommitRemember, this); - - childSetAction("OK", controller()->onAccept, this); - childSetAction("Cancel", controller()->onCancel, this); - childSetAction("Register", controller()->onClickRegister, this); - - setDefaultBtn("OK"); -} - -AuthenticationFloater::~AuthenticationFloater() -{ - sInstance = NULL; - delete sController; - sController = NULL; -} - -// static -void AuthenticationFloater::show(void* userdata) -{ - std::string target_grid; - void (*cb)(void*) = NULL; - - if (!userdata) - { - target_grid = "Authentication Test"; - } - - if (!sInstance) - sInstance = new AuthenticationFloater(); - if (!sController) - sController = new AuthenticationController(target_grid, cb); - - sInstance->open(); -} - -void AuthenticationFloater::accept() -{ - llinfos << "accept" << llendl; -} - -void AuthenticationFloater::cancel() -{ - llinfos << "cancel" << llendl; -} - -AuthenticationController* AuthenticationFloater::controller() -{ - return sController; -} diff --git a/linden/indra/newview/authentication_floater.h b/linden/indra/newview/authentication_floater.h deleted file mode 100644 index b24426b..0000000 --- a/linden/indra/newview/authentication_floater.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * AuthenticationFloater.h - * Cross-grid authentication system view. - * - * Created by RMS on 7/1/08. - * - */ - -#ifndef PL_AuthenticationFloater_H -#define PL_AuthenticationFloater_H - -#include "llfloater.h" -#include "authentication_controller.h" - -class AuthenticationFloater : public LLFloater -{ -public: - AuthenticationFloater(); - virtual ~AuthenticationFloater(); - - static void show(void* userdata); - static void accept(); - static void cancel(); - - // data accessors - static AuthenticationController* controller(); - -private: - // static because we only need one floater - static AuthenticationFloater* sInstance; - static AuthenticationController* sController; -}; - - -#endif // PL_AuthenticationFloater_H diff --git a/linden/indra/newview/authentication_model.cpp b/linden/indra/newview/authentication_model.cpp deleted file mode 100644 index 763ab4a..0000000 --- a/linden/indra/newview/authentication_model.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * authentication_model.cpp - * SecondLife - * - * Created by RMS on 7/17/08. - * - */ - -#include "llviewerprecompiledheaders.h" - -#include "lldir.h" -#include "llfile.h" -#include "llsdserialize.h" -#include "authentication_model.h" - -AuthenticationModel::AuthenticationModel() -{ - loadPersistentData(); -} - -AuthenticationModel::~AuthenticationModel() -{ - savePersistentData(); -} - -void AuthenticationModel::loadPersistentData() -{ - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "cross_grid_authentication.xml"); - LLSD auth_llsd; - llifstream file; - file.open(filename); - if(file.is_open()) - LLSDSerialize::fromXML(mAuthLLSD, file); -} - -void AuthenticationModel::savePersistentData() -{ - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "cross_grid_authentication.xml"); - llofstream ofile; - ofile.open(filename); - LLSDSerialize::toPrettyXML(mAuthLLSD, ofile); -} - -void AuthenticationModel::revert() -{ - loadPersistentData(); -} - -AuthenticationModel::connection_t AuthenticationModel::subscribeToModelUpdates - (event_t::slot_function_type subscriber) -{ - return mEventUpdate.connect(subscriber); -} - -void AuthenticationModel::unsubscribe(connection_t subscriber) -{ - subscriber.disconnect(); -} - -/* setters */ -void AuthenticationModel::addAccount(const std::string &grid, const std::string &accountName, - const std::string &accountPassword) -{ - mAuthLLSD[grid][accountName] = LLSD::LLSD(accountPassword); - mEventUpdate(); -} - -void AuthenticationModel::removeAccount(const std::string &grid, const std::string &accountName) -{ - mAuthLLSD[grid].erase(accountName); - mEventUpdate(); -} - -void AuthenticationModel::changePassword(const std::string &grid, const std::string &accountName, - const std::string &newPassword) -{ - mAuthLLSD[grid][accountName] = newPassword; - // no event necessary: passwords aren't displayed in any view -} - -/* getters */ - -void AuthenticationModel::getAllAccountNames(std::list &names) -{ - // TODO: implement this for account management -} - -void AuthenticationModel::getAccountNames(const std::string &grid, std::set &names) -{ - if(!mAuthLLSD.has(grid)) - return; - - for(LLSD::map_const_iterator it = mAuthLLSD[grid].beginMap(); - it != mAuthLLSD[grid].endMap(); ++it) - { - names.insert(it->first); - } -} - -void AuthenticationModel::getPassword(const std::string &grid, const std::string &accountName, - std::string &password) -{ - password = mAuthLLSD[grid][accountName].asString(); -} - -void AuthenticationModel::requestUpdate() -{ - mEventUpdate(); -} diff --git a/linden/indra/newview/authentication_model.h b/linden/indra/newview/authentication_model.h deleted file mode 100644 index 858e936..0000000 --- a/linden/indra/newview/authentication_model.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * authentication_model.h - * SecondLife - * - * Created by RMS on 7/17/08. - * - */ - -#ifndef PL_authentication_model_H -#define PL_authentication_model_H - -#include -#include -#include -#include -#include -#include "lluuid.h" -#include "llmemory.h" -#include "llsd.h" - -class AuthenticationModel : public LLSingleton -{ -public: - typedef boost::signal event_t; - typedef boost::signals::connection connection_t; - - AuthenticationModel(); - virtual ~AuthenticationModel(); - - void loadPersistentData(); - void savePersistentData(); - void revert(); - - /* generic update, pull model: */ - connection_t subscribeToModelUpdates(event_t::slot_function_type subscriber); - void unsubscribe(connection_t subscriber); - - /* setters */ - void addAccount(const std::string &grid, const std::string &accountName, const std::string &accountPassword); - void removeAccount(const std::string &grid, const std::string &accountName); - void changePassword(const std::string &grid, const std::string &accountName, const std::string &newPassword); - - /* getters */ - void getAllAccountNames(std::list &names); - void getAccountNames(const std::string &grid, std::set &names); - void getPassword(const std::string &grid, const std::string &accountName, std::string &password); - void requestUpdate(); -protected: - LLSD mAuthLLSD; -private: - event_t mEventUpdate; -}; -#endif // PL_authentication_model_H diff --git a/linden/indra/newview/controllerlogin.cpp b/linden/indra/newview/controllerlogin.cpp deleted file mode 100644 index 9dd61a6..0000000 --- a/linden/indra/newview/controllerlogin.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - * controllerlogin.cpp - * SecondLife - * - * Created by RMS on 7/16/08. - * - */ -#include "llerror.h" -#include "llmd5.h" -#include -#include "controllerlogin.h" - -LoginController::LoginController(LoginFloater *floater, AuthenticationModel *authModel, const std::string &grid) -: mFloater(floater), mModel(authModel), mGrid(grid) -{ - // set up the user interface subview pointers - name_combo = mFloater->getChild("name_combo"); - password_edit = mFloater->getChild("password_edit"); - start_location_combo= mFloater->getChild("start_location_combo"); - remember_check = mFloater->getChild("remember_check"); - connect_btn = mFloater->getChild("connect_btn"); - quit_btn = mFloater->getChild("quit_btn"); - server_combo = mFloater->getChild("server_combo"); - - // callbacks - // TODO: account creation and version information callbacks - name_combo->setCommitCallback(onCommitName); - name_combo->setCallbackUserData(this); - password_edit->setCommitCallback(onCommitPassword); - password_edit->setCallbackUserData(mFloater); - connect_btn->setClickedCallback(onAccept, this); - quit_btn->setClickedCallback(onCancel, this); - - // subscribe to the model - mModelConnection = mModel->subscribeToModelUpdates(boost::bind(&LoginController::update, this)); - // request an initial update - mModel->requestUpdate(); -} - -LoginController::~LoginController() -{ - mModel->unsubscribe(mModelConnection); -} - -void LoginController::update() -{ - // when we want to update, we need to make sure it's relevant to our - // interests and make the change as smooth as possible for the user - std::set newAccountNames; - mModel->getAccountNames(mGrid, newAccountNames); - - if(mAccountNames == newAccountNames) - return; - - name_combo->removeall(); - - for(std::set::iterator it = newAccountNames.begin(); - it != newAccountNames.end(); ++it) - { - name_combo->add(*it); - } - - name_combo->sortByName(); - mAccountNames.swap(newAccountNames); -} - -void LoginController::mungePassword(std::string &password) -{ - LLMD5 pass((unsigned char *)password.c_str()); - char munged_password[MD5HEX_STR_SIZE]; - pass.hex_digest(munged_password); - password = munged_password; -} - -// user interface callbacks - -void LoginController::onCommitName(LLUICtrl *control, void *userdata) -{ - // look at this shit it fills in the password box if it finds a stored account - // and auto checks remember password - LoginController *controller = (LoginController *)userdata; - LoginFloater *floater = controller->mFloater; - - std::string loginname = floater->childGetText("name_combo"); - std::set::iterator it = controller->mAccountNames.find(loginname); - if(it != controller->mAccountNames.end()) - { - std::string loginpassword; - - controller->mModel->getPassword(controller->mGrid, loginname, loginpassword); - LoginFloater::setFields(loginname, loginpassword, true); - } -} - -void LoginController::onCommitPassword(LLUICtrl *control, void *userdata) -{ - LoginFloater *floater = (LoginFloater *)userdata; - LLLineEditor *editor = (LLLineEditor *)control; - std::string password = editor->getText(); - - // when we have a new password we need to MD5 it and tell the floater - if(!floater->isSamePassword(password)) - { - mungePassword(password); - floater->setPassword(password); - } -} - -void LoginController::onAccept(void* userdata) -{ - // this here does the main work of telling the model we need to write - // account data - LoginController *controller = (LoginController *)userdata; - LoginFloater *floater = controller->mFloater; - - if(!floater->childGetValue("remember_check")) - { - LoginFloater::accept(); - return; - } - - std::string username = floater->childGetText("name_combo"); - std::string password = floater->getPassword(); - - if(controller->mAccountNames.find(username) != controller->mAccountNames.end()) - { - controller->mModel->changePassword(controller->mGrid, username, password); - } - - else - { - controller->mModel->addAccount(controller->mGrid, username, password); - } - controller->mModel->savePersistentData(); - LoginFloater::accept(); -} - -void LoginController::onCancel(void* userdata) -{ - // if the user backs out of the dialog we tell it to clean up and such - LoginFloater::cancel_old(); -} diff --git a/linden/indra/newview/controllerlogin.h b/linden/indra/newview/controllerlogin.h deleted file mode 100644 index a187558..0000000 --- a/linden/indra/newview/controllerlogin.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * controllerlogin.h - * SecondLife - * - * Created by RMS on 7/16/08. - * - */ -#ifndef PL_controllerlogin_H -#define PL_controllerlogin_H - -#include -#include -#include "llcombobox.h" -#include "lllineeditor.h" -#include "llcheckboxctrl.h" -#include "llbutton.h" -#include "floaterlogin.h" -#include "authentication_model.h" - -class LoginController -{ -public: - LoginController(LoginFloater *floater, AuthenticationModel *authModel, const std::string &grid); - virtual ~LoginController(); - virtual void update(); -protected: - LoginFloater *mFloater; - AuthenticationModel *mModel; - std::string mGrid; -private: - AuthenticationModel::connection_t mModelConnection; - - static void mungePassword(std::string &password); - - // UI subview pointers - LLComboBox *name_combo; - LLLineEditor *password_edit; - LLComboBox *start_location_combo; - LLCheckBoxCtrl *remember_check; - LLButton *connect_btn; - LLButton *quit_btn; - LLComboBox *server_combo; - - // state - std::set mAccountNames; - - // user interface callbacks - // TODO: find an alternative to linden callbacks - static void onCommitName(LLUICtrl *control, void *userdata); - static void onCommitPassword(LLUICtrl *control, void *userdata); - static void onAccept(void* userdata); - static void onCancel(void* userdata); -}; - -#endif // PL_controllerlogin_H diff --git a/linden/indra/newview/controllerpasswords.cpp b/linden/indra/newview/controllerpasswords.cpp deleted file mode 100644 index 6e39d9a..0000000 --- a/linden/indra/newview/controllerpasswords.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * controllerpasswords.cpp - * SecondLife - * - * Created by RMS on 8/5/08. - * - */ - -#include "authentication_model.h" -#include "prefpanelpasswords.h" -#include "controllerpasswords.h" - -PasswordsController::PasswordsController(PasswordsPrefPanel *panel) -: mPanel(panel) -{ - accounts_list = mPanel->getChild("accounts_list"); - remove_btn = mPanel->getChild("remove_btn"); - mModel = AuthenticationModel::getInstance(); - - // subscribe to the model - mModelConnection = mModel->subscribeToModelUpdates(boost::bind(&PasswordsController::update, this)); - // request an initial update - mModel->requestUpdate(); -} - -PasswordsController::~PasswordsController() -{ - mModel->unsubscribe(mModelConnection); - mModel = NULL; -} - -void PasswordsController::update() -{ - std::list newAccountData; - mModel->getAllAccountNames(newAccountData); - - if(mAccountData == newAccountData) - return; - - accounts_list->deleteAllItems(); -} diff --git a/linden/indra/newview/controllerpasswords.h b/linden/indra/newview/controllerpasswords.h deleted file mode 100644 index e656659..0000000 --- a/linden/indra/newview/controllerpasswords.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * controllerpasswords.h - * SecondLife - * - * Created by RMS on 8/5/08. - * - */ - -#include -#include -#include "llscrolllistctrl.h" -#include "llbutton.h" -#include "authentication_model.h" - -#ifndef PL_controllerpasswords_H -#define PL_controllerpasswords_H -class PasswordsPrefPanel; - -class PasswordsController -{ -public: - PasswordsController(PasswordsPrefPanel *panel); - virtual ~PasswordsController(); - virtual void update(); -protected: - LLScrollListCtrl *accounts_list; - LLButton *remove_btn; -private: - AuthenticationModel::connection_t mModelConnection; - - PasswordsPrefPanel *mPanel; - AuthenticationModel *mModel; - - std::list mAccountData; -}; - -#endif // PL_controllerpasswords_H diff --git a/linden/indra/newview/floaterlogin.cpp b/linden/indra/newview/floaterlogin.cpp index b943c4e..6519962 100644 --- a/linden/indra/newview/floaterlogin.cpp +++ b/linden/indra/newview/floaterlogin.cpp @@ -1,9 +1,7 @@ /* - * floaterlogin.cpp - * SecondLife - * - * Created by RMS on 7/15/08. - * + * floaterlogin.cpp (floatergridmanager.cpp pls) + * This is Meerkats grid manager, and I accidentally finished it with the wrong name :) + * -Patrick Sapinski (Monday, August 17, 2009) */ #include "llviewerprecompiledheaders.h" @@ -16,7 +14,6 @@ #include "llmd5.h" #include "llurlsimstring.h" #include "lluictrlfactory.h" -#include "controllerlogin.h" #include "floaterlogin.h" #include "hippoGridManager.h" #include "llviewernetwork.h" @@ -26,13 +23,11 @@ LoginFloater* LoginFloater::sInstance = NULL; LoginController* LoginFloater::sController = NULL; -AuthenticationModel* LoginFloater::sModel = NULL; bool LoginFloater::sIsInitialLogin; std::string LoginFloater::sGrid; -LoginFloater::LoginFloater(void (*callback)(S32 option, void* user_data), - void *cb_data) -: LLFloater("floater_login"), mCallback(callback), mCallbackData(cb_data) +LoginFloater::LoginFloater() +: LLFloater("floater_login") { mState = NORMAL; @@ -56,7 +51,7 @@ LoginFloater::LoginFloater(void (*callback)(S32 option, void* user_data), } center(); - LLLineEditor* edit = getChild("password_edit"); + LLLineEditor* edit = getChild("avatar_password_edit"); if (edit) edit->setDrawAsterixes(TRUE); LLComboBox* combo = getChild("start_location_combo"); combo->setAllowTextEntry(TRUE, 128, FALSE); @@ -79,34 +74,11 @@ LoginFloater::LoginFloater(void (*callback)(S32 option, void* user_data), { combo->setCurrentByIndex( 0 ); } - - LLTextBox* version_text = getChild("version_text"); - std::string version = llformat("%d.%d.%d (%d)", - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, - LL_VIEWER_BUILD ); - version_text->setText(version); - - LLTextBox* channel_text = getChild("channel_text"); - channel_text->setText(gSavedSettings.getString("VersionChannelName")); - - sendChildToBack(getChildView("channel_text")); - sendChildToBack(getChildView("version_text")); - sendChildToBack(getChildView("forgot_password_text")); - - setDefaultBtn("connect_btn"); - - - } LoginFloater::~LoginFloater() { - delete LoginFloater::sController; - - LoginFloater::sModel = NULL; LoginFloater::sController = NULL; LoginFloater::sInstance = NULL; } @@ -122,17 +94,19 @@ void LoginFloater::close() BOOL LoginFloater::postBuild() { - requires("grid_selector"); + requires("grid_selector"); requires("gridnick"); - requires("platform"); requires("gridname"); requires("loginuri"); requires("loginpage"); requires("helperuri"); requires("website"); + requires("support"); + requires("register"); + requires("password"); requires("first_name"); requires("last_name"); - requires("password"); + requires("avatar_password"); //requires("search"); requires("btn_delete"); requires("btn_add"); @@ -141,17 +115,18 @@ BOOL LoginFloater::postBuild() requires("btn_gridinfo"); requires("btn_help_render_compat"); if (!checkRequirements()) return false; - LLLineEditor* password_edit = getChild("password"); + LLLineEditor* password_edit = getChild("avatar_password"); if (password_edit) password_edit->setDrawAsterixes(TRUE); childSetAction("btn_delete", onClickDelete, this); childSetAction("btn_add", onClickAdd, this); childSetAction("btn_copy", onClickCopy, this); + childSetAction("btn_ok", onClickOk, this); childSetAction("btn_apply", onClickApply, this); childSetAction("set_default", onClickDefault, this); childSetAction("btn_cancel", onClickCancel, this); //KOW childSetAction("set_default", onClickDefault, this); -//KOW childSetAction("btn_gridinfo", onClickGridInfo, this); + childSetAction("btn_gridinfo", onClickGridInfo, this); //KOW childSetAction("btn_help_render_compat", onClickHelpRenderCompat, this); childSetCommitCallback("grid_selector", onSelectGrid, this); @@ -209,29 +184,24 @@ void LoginFloater::refresh_grids() sInstance->childSetEnabled("set_default", (sInstance->mState == NORMAL) && (selectIndex > 0)); sInstance->childSetEnabled("gridnick", (sInstance->mState == ADD_NEW) || (sInstance->mState == ADD_COPY)); - - LLComboBox *platform = sInstance->getChild("platform"); - platform->removeall(); - for (int p=HippoGridInfo::PLATFORM_OTHER; padd(HippoGridInfo::getPlatformString(static_cast(p))); - - if (sInstance->mState == NORMAL) { HippoGridInfo *gridInfo = gHippoGridManager->getGrid(sInstance->mCurGrid); if (gridInfo) { sInstance->childSetText("gridnick", gridInfo->getGridNick()); - platform->setCurrentByIndex(gridInfo->getPlatform()); //sInstance->childSetText("grid_name", gridInfo->getGridName()); sInstance->childSetText("loginuri", gridInfo->getLoginUri()); sInstance->childSetText("loginpage", gridInfo->getLoginPage()); 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("password", std::string(PASSWORD_FILLER)); + sInstance->childSetText("avatar_password", std::string(PASSWORD_FILLER)); else if(gridInfo->getPasswordUrl().empty()) - sInstance->childSetText("password", std::string("")); + sInstance->childSetText("avatar_password", std::string("")); /* if (gridInfo->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) { //childSetEnabled("search", false); @@ -248,7 +218,6 @@ void LoginFloater::refresh_grids() } else { std::string empty = ""; sInstance->childSetText("gridnick", empty); - platform->setCurrentByIndex(HippoGridInfo::PLATFORM_OTHER); sInstance->childSetText("gridname", empty); sInstance->childSetText("loginuri", empty); sInstance->childSetText("loginpage", empty); @@ -256,28 +225,26 @@ void LoginFloater::refresh_grids() sInstance->childSetText("website", empty); sInstance->childSetText("first_name", empty); sInstance->childSetText("last_name", empty); - sInstance->childSetText("password", empty); - sInstance->childSetEnabled("render_compat", true); - sInstance->childSetValue("render_compat", true); + sInstance->childSetText("avatar_password", empty); } } else if (sInstance->mState == ADD_NEW) { llwarns << "ADD_NEW" << llendl; std::string required = ""; std::string empty = ""; sInstance->childSetText("gridnick", required); - platform->setCurrentByIndex(HippoGridInfo::PLATFORM_OTHER); sInstance->childSetText("gridname", empty); sInstance->childSetText("loginuri", required); sInstance->childSetText("loginpage", empty); sInstance->childSetText("helperuri", empty); sInstance->childSetText("website", empty); + sInstance->childSetText("support", empty); + sInstance->childSetText("register", empty); + sInstance->childSetText("password", empty); sInstance->childSetText("first_name", empty); sInstance->childSetText("last_name", empty); - sInstance->childSetText("password", empty); + sInstance->childSetText("avatar_password", empty); //childSetEnabled("search", true); //childSetText("search", empty); - sInstance->childSetEnabled("render_compat", true); - sInstance->childSetValue("render_compat", true); } else if (sInstance->mState == ADD_COPY) { llwarns << "ADD_COPY" << llendl; sInstance->childSetText("gridnick", LLStringExplicit("")); @@ -302,29 +269,32 @@ void LoginFloater::applyChanges() { if (gridInfo->getGridNick() == childGetValue("gridnick").asString()) { - gridInfo->setPlatform(childGetValue("platform")); gridInfo->setGridName(childGetValue("gridname")); gridInfo->setLoginUri(childGetValue("loginuri")); gridInfo->setLoginPage(childGetValue("loginpage")); gridInfo->setHelperUri(childGetValue("helperuri")); gridInfo->setWebSite(childGetValue("website")); + gridInfo->setSupportUrl(childGetValue("support")); + 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("password").asString().empty()) - gridInfo->setPasswordUrl(std::string("")); - else if(childGetValue("password").asString() != std::string(PASSWORD_FILLER)) + 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("password"); + std::string auth_password = childGetValue("avatar_password"); std::string hashed_password; hashPassword(auth_password, hashed_password); gridInfo->setAvatarPassword(hashed_password); } - LLPanelLogin::setFields(gridInfo->getFirstName(), gridInfo->getLastName(), - gridInfo->getAvatarPassword(), true); + //this bug was a feature -Patrick Sapinski (Friday, August 21, 2009) + //LLPanelLogin::setFields(gridInfo->getFirstName(), gridInfo->getLastName(), + // gridInfo->getAvatarPassword(), true); } else { @@ -363,24 +333,26 @@ bool LoginFloater::createNewGrid() // create new grid HippoGridInfo *grid = new HippoGridInfo(gridnick); - grid->setPlatform(childGetValue("platform")); grid->setGridName(childGetValue("gridname")); grid->setLoginUri(loginuri); grid->setLoginPage(childGetValue("loginpage")); grid->setHelperUri(childGetValue("helperuri")); grid->setWebSite(childGetValue("website")); + grid->setSupportUrl(childGetValue("support")); + 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("password").asString().empty()) + if(childGetValue("avatar_password").asString().empty()) grid->setAvatarPassword(std::string("")); else { std::string hashed_password; - hashPassword(childGetValue("password"), hashed_password); + hashPassword(childGetValue("avatar_password"), hashed_password); grid->setAvatarPassword(hashed_password); } @@ -388,6 +360,49 @@ bool LoginFloater::createNewGrid() return true; } +void LoginFloater::retrieveGridInfo() +{ + std::string loginuri = childGetValue("loginuri"); + if ((loginuri == "") || (loginuri == "")) { + //KOW gViewerWindow->alertXml("GridInfoNoLoginUri"); + return; + } + + HippoGridInfo *grid = 0; + bool cleanupGrid = false; + if (mState == NORMAL) { + grid = gHippoGridManager->getGrid(mCurGrid); + } else if ((mState == ADD_NEW) || (mState == ADD_COPY)) { + grid = new HippoGridInfo(""); + cleanupGrid = true; + } else { + llerrs << "Illegal state " << mState << '.' << llendl; + return; + } + if (!grid) { + llerrs << "Internal error retrieving grid info." << llendl; + return; + } + + grid->setLoginUri(loginuri); + if (grid->retrieveGridInfo()) { + if (grid->getGridNick() != "") childSetText("gridnick", grid->getGridNick()); + if (grid->getGridName() != "") childSetText("gridname", grid->getGridName()); + if (grid->getLoginUri() != "") childSetText("loginuri", grid->getLoginUri()); + 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->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl()); + //if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl()); + } else { + //KOW gViewerWindow->alertXml("GridInfoError"); + } + + if (cleanupGrid) delete grid; +} + void LoginFloater::apply() { if (mState == NORMAL) { @@ -417,8 +432,6 @@ void LoginFloater::setDefault() } gHippoGridManager->setCurrentGrid(mCurGrid); gHippoGridManager->setDefaultGrid(mCurGrid); - llwarns << "I think me grid is " << mCurGrid << llendl; - //LLPanelLogin::refreshLoginPage(); gHippoGridManager->saveFile(); LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel()); } @@ -426,7 +439,6 @@ void LoginFloater::setDefault() void LoginFloater::cancel() { gHippoGridManager->discardAndReload(); - LoginFloater::sModel->revert(); update(); } @@ -439,14 +451,8 @@ void LoginFloater::onSelectGrid(LLUICtrl* ctrl, void *data) if (self->createNewGrid()) { self->mState = NORMAL; } else { - //LLCtrlListInterface *grids = self->childGetListInterface("search_results"); - //if (!grids) return; - - //LLSD selected_value = grids->getSelectedValue(); - //std::string sim_name = selected_value.asString(); - - LLComboBox *grids = self->getChild("grid_selector"); - grids->setCurrentByIndex(grids->getItemCount() - 1); + //LLScrollListCtrl *grids = self->getChild("grid_selector"); + //grids->setCurrentByIndex(grids->getItemCount() - 1); return; } } else { @@ -454,8 +460,6 @@ void LoginFloater::onSelectGrid(LLUICtrl* ctrl, void *data) return; } self->mCurGrid = ctrl->getValue().asString(); - llwarns << "I think me grid is " << self->mCurGrid << llendl; - self->refresh_grids(); } @@ -488,16 +492,38 @@ void LoginFloater::onClickCopy(void *data) self->refresh_grids(); } +// static +void LoginFloater::onClickOk(void* data) +{ + if(NULL==sInstance) + return; + + sInstance->apply(); + sInstance->close(); +} + //static void LoginFloater::onClickApply(void *data) { + if(NULL==sInstance) + return; + sInstance->apply(); + refresh_grids(); } //static void LoginFloater::onClickDefault(void *data) { sInstance->setDefault(); + sInstance->refresh_grids(); +} + +//static +void LoginFloater::onClickGridInfo(void *data) +{ + //HippoPanelGrids* self = (HippoPanelGrids*)data; + sInstance->retrieveGridInfo(); } //static @@ -542,64 +568,28 @@ void LoginFloater::refreshLocation( bool force_visible ) sInstance->childSetVisible("server_combo", TRUE); } -void LoginFloater::newShow(const std::string &grid, bool initialLogin, - void (*callback)(S32 option, void* user_data), - void* callback_data) +void LoginFloater::newShow(const std::string &grid, bool initialLogin) { - llwarns << "newShow called" << llendl; + llwarns << "newShow called" << llendl; if(NULL==sInstance) { LoginFloater::sGrid = grid; LoginFloater::sIsInitialLogin = initialLogin; - sInstance = new LoginFloater(callback, callback_data); + sInstance = new LoginFloater(); llwarns << "sInstance assigned. sInstance=" << sInstance << llendl; } - - // floater controller requires initialized floater and model - if(NULL==sModel) - sModel = AuthenticationModel::getInstance(); - if(NULL==sController) - //sController = new LoginController(sInstance, sModel, sGrid); - - - - llwarns << "newshow called" << llendl; - sInstance->mCurGrid = gHippoGridManager->getCurrentGridNick(); - refresh_grids(); - // we're important - sInstance->setFrontmost(TRUE); - sInstance->setFocus(TRUE); - -} + llwarns << "newshow called" << llendl; + sInstance->mCurGrid = gHippoGridManager->getCurrentGridNick(); + refresh_grids(); -void LoginFloater::testShow(void *lies) -{ - // this is if we want to call LoginFloater from a menu option - // or you know whatever - newShow(std::string("Test"), false, testCallback, NULL); -} + sInstance->open(); /*Flawfinder: ignore*/ + // we're important + //sInstance->setFrontmost(TRUE); + //sInstance->setFocus(TRUE); -void LoginFloater::testCallback(S32 option, void *user_data) -{ - // test callback, referenced by testShow() - if(LOGIN_OPTION_CONNECT == option) - { - llinfos << "this is how we connect to a METAVERSE" << llendl; - std::string first, last, password; - BOOL remember = TRUE; - getFields(first, last, password, remember); - llinfos << "first\t\tlast\t\tpassword" << llendl; - llinfos << first << "\t\t" << last << "\t\t" << password << llendl; - } - else if(LOGIN_OPTION_QUIT == option) - { - llinfos << "my login, she die" << llendl; - llinfos << ":(" << llendl; - close(); - } } void LoginFloater::show(const LLRect &rect, BOOL show_server, @@ -608,7 +598,7 @@ void LoginFloater::show(const LLRect &rect, BOOL show_server, { // we don't need a grid passed in because this is old-style login std::string grid = ""; - newShow(grid, TRUE, callback, callback_data); + newShow(grid, TRUE); } void LoginFloater::setFocus(BOOL b) @@ -628,7 +618,7 @@ void LoginFloater::setFocus(BOOL b) void LoginFloater::giveFocus() { - LLComboBox *combo = NULL; + LLScrollListCtrl *combo = NULL; if(NULL==sInstance) { @@ -638,91 +628,10 @@ void LoginFloater::giveFocus() // for our combo box approach, selecting the combo box is almost always // the right thing to do on the floater receiving focus - combo = sInstance->getChild("name_combo"); + combo = sInstance->getChild("grid_selector"); combo->setFocus(TRUE); } -void LoginFloater::getFields(std::string &firstname, std::string &lastname, std::string &password, - BOOL &remember) -{ - if (!sInstance) - { - llwarns << "Attempted getFields with no login view shown" << llendl; - return; - } - - std::string loginname = sInstance->childGetText("name_combo"); - - LLStringUtil::replaceTabsWithSpaces(loginname, 1); - LLStringUtil::trim(loginname); - std::vector loginVec; - boost::split(loginVec, loginname, boost::is_any_of(" "), boost::token_compress_on); - if(loginVec.size() == 2) - { - firstname = loginVec[0]; - lastname = loginVec[1]; - } - - password = sInstance->mMungedPassword; - remember = sInstance->childGetValue("remember_check"); -} - -void LoginFloater::getFields(std::string &loginname, std::string &password, BOOL &remember) -{ - std::string first, last, pass; - BOOL rem; - getFields(first, last, pass, rem); - loginname = first + " " + last; - password = pass; - remember = rem; -} - -void LoginFloater::setFields(const std::string& firstname, const std::string& lastname, const std::string& password, - BOOL remember) -{ - if (!sInstance) - { - llwarns << "Attempted setFields with no login view shown" << llendl; - return; - } - - std::string loginname = firstname + " " + lastname; - sInstance->childSetText("name_combo", loginname); - - // Max "actual" password length is 16 characters. - // Hex digests are always 32 characters. - if (password.length() == 32) - { - // This is a MD5 hex digest of a password. - // We don't actually use the password input field, - // fill it with MAX_PASSWORD characters so we get a - // nice row of asterixes. - const std::string filler("123456789!123456"); - sInstance->childSetText("password_edit", filler); - sInstance->mIncomingPassword = filler; - sInstance->mMungedPassword = password; - } - else - { - // this is a normal text password - sInstance->childSetText("password_edit", password); - sInstance->mIncomingPassword = password; - LLMD5 pass((unsigned char *)password.c_str()); - char munged_password[MD5HEX_STR_SIZE]; - pass.hex_digest(munged_password); - sInstance->mMungedPassword = munged_password; - } - - sInstance->childSetValue("remember_check", remember); -} - -void LoginFloater::setFields(const std::string &loginname, const std::string &password, BOOL remember) -{ - std::vector loginVec; - boost::split(loginVec, loginname, boost::is_any_of(" "), boost::token_compress_on); - setFields(loginVec[0], loginVec[1], password, remember); -} - BOOL LoginFloater::isGridComboDirty() { BOOL user_picked = FALSE; @@ -778,25 +687,6 @@ void LoginFloater::addServer(const std::string& server, S32 domain_name) combo->setCurrentByIndex(0); } -void LoginFloater::accept() -{ - if(NULL==sInstance || NULL==sInstance->mCallback) - return; - - sInstance->setFocus(FALSE); - - std::string name_combo = sInstance->childGetText("name_combo"); - if(!name_combo.empty()) - { - sInstance->mCallback(LOGIN_OPTION_CONNECT, sInstance->mCallbackData); - } - else - { - // TODO: new account call goes here - return; - } -} - void LoginFloater::cancel_old() { if(NULL==sInstance) diff --git a/linden/indra/newview/floaterlogin.h b/linden/indra/newview/floaterlogin.h index 1800897..cdb60b0 100644 --- a/linden/indra/newview/floaterlogin.h +++ b/linden/indra/newview/floaterlogin.h @@ -1,10 +1,9 @@ /* - * floaterlogin.h - * SecondLife - * - * Created by RMS on 7/15/08. - * + * floaterlogin.h (floatergridmanager.h pls) + * This is Meerkats grid manager, and I accidentally finished it with the wrong name :) + * -Patrick Sapinski (Monday, August 17, 2009) */ + #ifndef PL_floaterlogin_H #define PL_floaterlogin_H @@ -19,8 +18,7 @@ class AuthenticationModel; class LoginFloater : public LLFloater { public: - LoginFloater(void (*callback)(S32 option, void *user_data), - void *callback_data); + LoginFloater(); virtual ~LoginFloater(); virtual BOOL postBuild(); @@ -31,11 +29,7 @@ public: void cancel(); // new-style login methods - static void newShow(const std::string &grid, bool initialLogin, - void (*callback)(S32 option, void *user_data), - void *callback_data); - static void testShow(void *lies); - static void testCallback(S32 option, void *user_data); + static void newShow(const std::string &grid, bool initialLogin); virtual std::string& getPassword(); virtual void setPassword(std::string &password); virtual bool isSamePassword(std::string &password); @@ -54,14 +48,9 @@ public: static void refreshLocation(bool force_visible); virtual void setFocus(BOOL b); static void giveFocus(); - static void getFields(std::string& firstname, std::string& lastname, - std::string& password, BOOL& remember); - static void setFields(const std::string& firstname, const std::string &lastname, - const std::string& password, BOOL remember); static void getLocation(std::string &location); static BOOL isGridComboDirty(); static void addServer(const std::string& server, S32 domain_name); - static void accept(); static void cancel_old(); static void hashPassword(const std::string& password, std::string& hashedPassword); protected: @@ -78,13 +67,16 @@ private: void applyChanges(); bool createNewGrid(); void update(); + void retrieveGridInfo(); static void onSelectGrid(LLUICtrl *ctrl, void *data); static void onClickDelete(void *data); static void onClickAdd(void *data); static void onClickCopy(void *data); + static void onClickOk(void *data); static void onClickApply(void *data); static void onClickDefault(void *data); + static void onClickGridInfo(void *data); static void onClickCancel(void *data); static LoginFloater *sInstance; diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp index 19ed2c4..56d585c 100644 --- a/linden/indra/newview/hippoGridManager.cpp +++ b/linden/indra/newview/hippoGridManager.cpp @@ -447,10 +447,10 @@ void HippoGridManager::loadFromFile() parseFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml"), !mGridInfo.empty()); // merge grid info from web site, if newer. Force load, if list of grids is empty. if (gSavedSettings.getBOOL("CheckForGridUpdates")) - parseUrl("http://opensim-viewer.sourceforge.net/db/grids.php", !mGridInfo.empty()); + parseUrl("http://meerkatviewer.org/scripts/grids.php", !mGridInfo.empty()); setDefaultGrid(gSavedSettings.getString("DefaultGrid")); - setCurrentGrid(gSavedSettings.getString("CmdLineGridChoice")); + setCurrentGrid(gSavedSettings.getString("DefaultGrid")); } @@ -575,6 +575,7 @@ void HippoGridManager::saveFile() gridInfo[i]["website"] = grid->getWebSite(); 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(); diff --git a/linden/indra/newview/hippoGridManager.h b/linden/indra/newview/hippoGridManager.h index f6ee497..9925495 100644 --- a/linden/indra/newview/hippoGridManager.h +++ b/linden/indra/newview/hippoGridManager.h @@ -1,171 +1,175 @@ -#ifndef __HIPPO_GRID_MANAGER_H__ -#define __HIPPO_GRID_MANAGER_H__ - - -#include -#include - -#ifndef XML_STATIC -#define XML_STATIC -#endif -#include - - -class LLSD; - - -class HippoGridInfo -{ -public: - enum Platform { - PLATFORM_OTHER = 0, - PLATFORM_OPENSIM, - PLATFORM_SECONDLIFE, - PLATFORM_LAST - }; - enum SearchType { - SEARCH_ALL_EMPTY, - SEARCH_ALL_QUERY, - SEARCH_ALL_TEMPLATE - }; - - explicit HippoGridInfo(const std::string &gridNick); - - Platform getPlatform() const { return mPlatform; } - const std::string &getGridNick() const { return mGridNick; } - const std::string &getGridName() const { return mGridName; } - const std::string &getLoginUri() const { return mLoginUri; } - const std::string &getLoginPage() const { return mLoginPage; } - const std::string &getHelperUri() const { return mHelperUri; } - const std::string &getWebSite() const { return mWebSite; } - const std::string &getSupportUrl() const { return mSupportUrl; } - const std::string &getRegisterUrl() const { return mRegisterUrl; } - const std::string &getPasswordUrl() const { return mPasswordUrl; } - const std::string &getSearchUrl() const { return mSearchUrl; } - const std::string &getFirstName() const { return mFirstName; } - const std::string &getLastName() const { return mLastName; } - const std::string &getAvatarPassword() const { return mAvatarPassword; } - std::string getSearchUrl(SearchType ty) const; - bool isRenderCompat() const { return mRenderCompat; } - - const std::string &getCurrencySymbol() const { return mCurrencySymbol; } - const std::string &getRealCurrencySymbol() const { return mRealCurrencySymbol; } - std::string getUploadFee() const; - std::string getGroupCreationFee() const; - std::string getDirectoryFee() const; - - bool isOpenSimulator() const { return (mPlatform == PLATFORM_OPENSIM ); } - bool isSecondLife() const { return (mPlatform == PLATFORM_SECONDLIFE); } - - void setPlatform (const std::string &platform); - void setPlatform (Platform platform); - void setGridName (const std::string &gridName) { mGridName = gridName; } - void setLoginUri (const std::string &loginUri) { mLoginUri = loginUri; cleanUpUri(mLoginUri); } - void setLoginPage(const std::string &loginPage) { mLoginPage = loginPage; } - void setHelperUri(const std::string &helperUri) { mHelperUri = helperUri; cleanUpUri(mHelperUri); } - void setWebSite (const std::string &website) { mWebSite = website; } - void setSupportUrl(const std::string &url) { mSupportUrl = url; } - void setRegisterUrl(const std::string &url) { mRegisterUrl = url; } - void setPasswordUrl(const std::string &url) { mPasswordUrl = url; } - void setSearchUrl(const std::string &url) { mSearchUrl = url; } - void setRenderCompat(bool compat) { mRenderCompat = compat; } - void setFirstName(const std::string &firstName) { mFirstName = firstName; } //aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - void setLastName(const std::string &lastName) { mLastName = lastName; } - void setAvatarPassword(const std::string &avatarPassword) { mAvatarPassword = avatarPassword; } - - void setCurrencySymbol(const std::string &sym) { mCurrencySymbol = sym.substr(0, 3); } - void setRealCurrencySymbol(const std::string &sym) { mRealCurrencySymbol = sym.substr(0, 3); } - void setDirectoryFee(int fee) { mDirectoryFee = fee; } - - bool retrieveGridInfo(); - - static const char *getPlatformString(Platform platform); - static void cleanUpGridNick(std::string &gridnick); - - static HippoGridInfo FALLBACK_GRIDINFO; - static void initFallback(); - -private: - Platform mPlatform; - std::string mGridNick; - std::string mGridName; - std::string mLoginUri; - std::string mLoginPage; - std::string mHelperUri; - std::string mWebSite; - std::string mSupportUrl; - std::string mRegisterUrl; - std::string mPasswordUrl; - std::string mSearchUrl; - std::string mFirstName; - std::string mLastName; - std::string mAvatarPassword; - bool mRenderCompat; - - std::string mCurrencySymbol; - std::string mRealCurrencySymbol; - int mDirectoryFee; - - // for parsing grid info XML - enum XmlState { - XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME, - XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI, - XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH - }; - XmlState mXmlState; - - static void cleanUpUri(std::string &uri); - void formatFee(std::string &fee, int cost, bool showFree) const; - - static void onXmlElementStart(void *userData, const XML_Char *name, const XML_Char **atts); - static void onXmlElementEnd(void *userData, const XML_Char *name); - static void onXmlCharacterData(void *userData, const XML_Char *s, int len); -}; - - -class HippoGridManager -{ -public: - HippoGridManager(); - ~HippoGridManager(); - - void init(); - void saveFile(); - void discardAndReload(); - - HippoGridInfo *getGrid(const std::string &grid) const; - HippoGridInfo *getConnectedGrid() const { return (mConnectedGrid)? mConnectedGrid: getCurrentGrid(); } - HippoGridInfo *getCurrentGrid() const; - const std::string &getDefaultGridNick() const { return mDefaultGrid; } - const std::string &getCurrentGridNick() const { return mCurrentGrid; } - - void setDefaultGrid(const std::string &grid); - void setCurrentGrid(const std::string &grid); - void setCurrentGridAsConnected() { mConnectedGrid = getCurrentGrid(); } - - void addGrid(HippoGridInfo *grid); - void deleteGrid(const std::string &grid); - - typedef std::map::iterator GridIterator; - GridIterator beginGrid() { return mGridInfo.begin(); } - GridIterator endGrid() { return mGridInfo.end(); } - -private: - std::map mGridInfo; - std::string mDefaultGrid; - std::string mCurrentGrid; - HippoGridInfo *mConnectedGrid; - int mDefaultGridsVersion; - - void cleanup(); - void loadFromFile(); - void parseFile(const std::string &fileName, bool mergeIfNewer); - void parseUrl(const char *url, bool mergeIfNewer); - void parseData(LLSD &gridInfo, bool mergeIfNewer); -}; - - -extern HippoGridManager *gHippoGridManager; - - +#ifndef __HIPPO_GRID_MANAGER_H__ +#define __HIPPO_GRID_MANAGER_H__ + + +#include +#include + +#ifndef XML_STATIC +#define XML_STATIC #endif + +#ifdef LL_STANDALONE +#include +#else +#include "expat/expat.h" +#endif + +class LLSD; + + +class HippoGridInfo +{ +public: + enum Platform { + PLATFORM_OTHER = 0, + PLATFORM_OPENSIM, + PLATFORM_SECONDLIFE, + PLATFORM_LAST + }; + enum SearchType { + SEARCH_ALL_EMPTY, + SEARCH_ALL_QUERY, + SEARCH_ALL_TEMPLATE + }; + + explicit HippoGridInfo(const std::string &gridNick); + + Platform getPlatform() const { return mPlatform; } + const std::string &getGridNick() const { return mGridNick; } + const std::string &getGridName() const { return mGridName; } + const std::string &getLoginUri() const { return mLoginUri; } + const std::string &getLoginPage() const { return mLoginPage; } + const std::string &getHelperUri() const { return mHelperUri; } + const std::string &getWebSite() const { return mWebSite; } + const std::string &getSupportUrl() const { return mSupportUrl; } + const std::string &getRegisterUrl() const { return mRegisterUrl; } + const std::string &getPasswordUrl() const { return mPasswordUrl; } + const std::string &getSearchUrl() const { return mSearchUrl; } + const std::string &getFirstName() const { return mFirstName; } + const std::string &getLastName() const { return mLastName; } + const std::string &getAvatarPassword() const { return mAvatarPassword; } + std::string getSearchUrl(SearchType ty) const; + bool isRenderCompat() const { return mRenderCompat; } + + const std::string &getCurrencySymbol() const { return mCurrencySymbol; } + const std::string &getRealCurrencySymbol() const { return mRealCurrencySymbol; } + std::string getUploadFee() const; + std::string getGroupCreationFee() const; + std::string getDirectoryFee() const; + + bool isOpenSimulator() const { return (mPlatform == PLATFORM_OPENSIM ); } + bool isSecondLife() const { return (mPlatform == PLATFORM_SECONDLIFE); } + + void setPlatform (const std::string &platform); + void setPlatform (Platform platform); + void setGridName (const std::string &gridName) { mGridName = gridName; } + void setLoginUri (const std::string &loginUri) { mLoginUri = loginUri; cleanUpUri(mLoginUri); } + void setLoginPage(const std::string &loginPage) { mLoginPage = loginPage; } + void setHelperUri(const std::string &helperUri) { mHelperUri = helperUri; cleanUpUri(mHelperUri); } + void setWebSite (const std::string &website) { mWebSite = website; } + void setSupportUrl(const std::string &url) { mSupportUrl = url; } + void setRegisterUrl(const std::string &url) { mRegisterUrl = url; } + void setPasswordUrl(const std::string &url) { mPasswordUrl = url; } + void setSearchUrl(const std::string &url) { mSearchUrl = url; } + void setRenderCompat(bool compat) { mRenderCompat = compat; } + void setFirstName(const std::string &firstName) { mFirstName = firstName; } //aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + void setLastName(const std::string &lastName) { mLastName = lastName; } + void setAvatarPassword(const std::string &avatarPassword) { mAvatarPassword = avatarPassword; } + + void setCurrencySymbol(const std::string &sym) { mCurrencySymbol = sym.substr(0, 3); } + void setRealCurrencySymbol(const std::string &sym) { mRealCurrencySymbol = sym.substr(0, 3); } + void setDirectoryFee(int fee) { mDirectoryFee = fee; } + + bool retrieveGridInfo(); + + static const char *getPlatformString(Platform platform); + static void cleanUpGridNick(std::string &gridnick); + + static HippoGridInfo FALLBACK_GRIDINFO; + static void initFallback(); + +private: + Platform mPlatform; + std::string mGridNick; + std::string mGridName; + std::string mLoginUri; + std::string mLoginPage; + std::string mHelperUri; + std::string mWebSite; + std::string mSupportUrl; + std::string mRegisterUrl; + std::string mPasswordUrl; + std::string mSearchUrl; + std::string mFirstName; + std::string mLastName; + std::string mAvatarPassword; + bool mRenderCompat; + + std::string mCurrencySymbol; + std::string mRealCurrencySymbol; + int mDirectoryFee; + + // for parsing grid info XML + enum XmlState { + XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME, + XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI, + XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH + }; + XmlState mXmlState; + + static void cleanUpUri(std::string &uri); + void formatFee(std::string &fee, int cost, bool showFree) const; + + static void onXmlElementStart(void *userData, const XML_Char *name, const XML_Char **atts); + static void onXmlElementEnd(void *userData, const XML_Char *name); + static void onXmlCharacterData(void *userData, const XML_Char *s, int len); +}; + + +class HippoGridManager +{ +public: + HippoGridManager(); + ~HippoGridManager(); + + void init(); + void saveFile(); + void discardAndReload(); + + HippoGridInfo *getGrid(const std::string &grid) const; + HippoGridInfo *getConnectedGrid() const { return (mConnectedGrid)? mConnectedGrid: getCurrentGrid(); } + HippoGridInfo *getCurrentGrid() const; + const std::string &getDefaultGridNick() const { return mDefaultGrid; } + const std::string &getCurrentGridNick() const { return mCurrentGrid; } + + void setDefaultGrid(const std::string &grid); + void setCurrentGrid(const std::string &grid); + void setCurrentGridAsConnected() { mConnectedGrid = getCurrentGrid(); } + + void addGrid(HippoGridInfo *grid); + void deleteGrid(const std::string &grid); + + typedef std::map::iterator GridIterator; + GridIterator beginGrid() { return mGridInfo.begin(); } + GridIterator endGrid() { return mGridInfo.end(); } + +private: + std::map mGridInfo; + std::string mDefaultGrid; + std::string mCurrentGrid; + HippoGridInfo *mConnectedGrid; + int mDefaultGridsVersion; + + void cleanup(); + void loadFromFile(); + void parseFile(const std::string &fileName, bool mergeIfNewer); + void parseUrl(const char *url, bool mergeIfNewer); + void parseData(LLSD &gridInfo, bool mergeIfNewer); +}; + + +extern HippoGridManager *gHippoGridManager; + + +#endif diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index 2f6dc99..5399867 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp @@ -1159,7 +1159,7 @@ void LLFloaterWorldMap::onPanBtn( void* userdata ) // static void LLFloaterWorldMap::onGridManager(void*) { - LoginFloater::newShow(std::string("Test"), false, LoginFloater::testCallback, NULL); + LoginFloater::newShow(std::string("Test"), false); //gAgent.teleportHome(); //gFloaterWorldMap->close(); } @@ -1528,7 +1528,7 @@ void LLFloaterWorldMap::teleport() } gHippoGridManager->setCurrentGrid(gridInfo->getGridNick()); - gHippoGridManager->setDefaultGrid(gridInfo->getGridNick()); + //gHippoGridManager->setDefaultGrid(gridInfo->getGridNick()); //this doesn't work :( gSavedSettings.setBOOL("CmdLineLoginURI", FALSE); LLStartUp::setShouldAutoLogin(true); LLAppViewer::instance()->requestLogout(false); diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 2ecdcb5..026b0b2 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -1078,10 +1078,9 @@ void LLPanelLogin::onClickGrid(void *) { if (sInstance && sInstance->mCallback) { - LoginFloater::newShow(std::string("Test"), false, LoginFloater::testCallback, NULL); + LoginFloater::newShow(std::string("Test"), false); } } - // static void LLPanelLogin::newAccountAlertCallback(S32 option, void*) @@ -1164,8 +1163,6 @@ void LLPanelLogin::onSelectServer(LLUICtrl* ctrl, void*) std::string mCurGrid = ctrl->getValue().asString(); //KOW gHippoGridManager->setCurrentGrid(mCurGrid); - //gHippoGridManager->setDefaultGrid(mCurGrid); - //gHippoGridManager->saveFile(); HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid); if (gridInfo) { //childSetText("gridnick", gridInfo->getGridNick()); @@ -1177,54 +1174,14 @@ void LLPanelLogin::onSelectServer(LLUICtrl* ctrl, void*) - llwarns << "current grid = " << mCurGrid << llendl; - /* - if (LLSD::TypeInteger == combo_val.type()) - { - grid_index = combo->getValue().asInteger(); - - if ((S32)GRID_INFO_OTHER == grid_index) - { - // This happens if the user specifies a custom grid - // via command line. - grid_label = combo->getSimple(); - } - } - else - { - // no valid selection, return other - grid_index = (S32)GRID_INFO_OTHER; - grid_label = combo_val.asString(); - } - - // This new seelction will override preset uris - // from the command line. - LLViewerLogin* vl = LLViewerLogin::getInstance(); - vl->resetURIs(); - if(grid_index != GRID_INFO_OTHER) - { - vl->setGridChoice(grid_index); - } - else - { - vl->setGridChoice(grid_label); - } + + llwarns << "current grid = " << mCurGrid << llendl; - // clear the password if we are switching grids so we don't send - // the wrong pass to the wrong grid. - if (sInstance) - { - // no method to clear a text box? - const std::string nothing(""); - sInstance->childSetText("password_edit", nothing); - } - */ // grid changed so show new splash screen (possibly) loadLoginPage(); } - /* void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) { diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 5cb14fc..3d71202 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -46,6 +46,8 @@ #include "lldirpicker.h" +#include "hippoGridManager.h" + class LLPrefsIMImpl : public LLPanel { public: @@ -181,7 +183,7 @@ void LLPrefsIMImpl::apply() gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); - gDirUtilp->setPerAccountChatLogsDir(gSavedSettings.getString("FirstName"), + gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), gSavedSettings.getString("FirstName"), gSavedSettings.getString("LastName") ); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index ffd7f3d..cdcd539 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -705,10 +705,13 @@ bool idle_startup() else { // if not automatically logging in, display login dialog - // a valid grid is selected - firstname = gSavedSettings.getString("FirstName"); - lastname = gSavedSettings.getString("LastName"); - password = load_password_from_disk(); + // a valid grid is selected (in llpanellogin, for some reason?) + // This should get the right values from the grid manager now -Patrick Sapinski (Monday, August 17, 2009) + HippoGridInfo *gridInfo = gHippoGridManager->getCurrentGrid(); + firstname = gridInfo->getFirstName(); + lastname = gridInfo->getLastName(); + password = gridInfo->getAvatarPassword(); + remember_password = gSavedSettings.getBOOL("RememberPassword"); show_connect_box = true; } @@ -870,14 +873,14 @@ bool idle_startup() } gSavedSettings.setBOOL("RememberPassword", remember_password); - LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL; + //LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL; gDebugInfo["LoginName"] = firstname + " " + lastname; } gHippoGridManager->setCurrentGridAsConnected(); // create necessary directories // *FIX: these mkdir's should error check - gDirUtilp->setLindenUserDir(firstname, lastname); + gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); LLFile::mkdir(gDirUtilp->getLindenUserDir()); // Set PerAccountSettingsFile to the default value. @@ -908,7 +911,7 @@ bool idle_startup() gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); } - gDirUtilp->setPerAccountChatLogsDir(firstname, lastname); + gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); diff --git a/linden/indra/newview/prefpanelpasswords.cpp b/linden/indra/newview/prefpanelpasswords.cpp deleted file mode 100644 index 17b9b1a..0000000 --- a/linden/indra/newview/prefpanelpasswords.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * prefpanelpasswords.cpp - * SecondLife - * - * Created by RMS on 8/5/08. - * - */ - -#include "lluictrlfactory.h" - -#include "controllerpasswords.h" -#include "prefpanelpasswords.h" - -PasswordsPrefPanel::PasswordsPrefPanel() -: LLPanel(std::string("panel_preferences_passwords")) -{ - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_passwords.xml"); -} - -PasswordsPrefPanel::~PasswordsPrefPanel() -{ - delete mController; - mController = NULL; -} - -BOOL PasswordsPrefPanel::postBuild() -{ - mController = new PasswordsController(this); - return TRUE; -} - -void PasswordsPrefPanel::apply() -{ - -} - -void PasswordsPrefPanel::cancel() -{ - -} diff --git a/linden/indra/newview/prefpanelpasswords.h b/linden/indra/newview/prefpanelpasswords.h deleted file mode 100644 index d7bbf39..0000000 --- a/linden/indra/newview/prefpanelpasswords.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * prefpanelpasswords.h - * SecondLife - * - * Created by RMS on 8/5/08. - * - */ - -#include "llpanel.h" - -#ifndef PL_prefpanelpasswords_H -#define PL_prefpanelpasswords_H - -class PasswordsController; - -class PasswordsPrefPanel : public LLPanel -{ -public: - PasswordsPrefPanel(); - virtual ~PasswordsPrefPanel(); - - BOOL postBuild(); - - void apply(); - void cancel(); -protected: - PasswordsController *mController; -}; - -#endif // PL_prefpanelpasswords_H 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 4ad07b5..4c2146b 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 @@ -1,13 +1,7 @@ - - http://secondlife.com/app/login/ - - - http://secondlife.com/account/request.php - + name="floater_login" title="plasticwuzhere" width="600"> + First Name: + + + + + Last Name: + + + + + Password: + + + + + + Start Location: + + + + My Home + + + My Last Location + + + <Type region name> + + + + - Grid URI: + left_delta="-90" mouse_opaque="true" name="loginuri_text" v_pad="0" width="120"> + Login URI: +