From 11fafb749f86fbc33c7b32292abbe808f56792e1 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 25 Sep 2009 18:39:58 -0500 Subject: Removed grid stuff from World Map (for now). --- ChangeLog.txt | 6 + linden/indra/newview/llfloaterworldmap.cpp | 149 --------------------- .../skins/default/xui/en-us/floater_world_map.xml | 98 +++++--------- 3 files changed, 39 insertions(+), 214 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 8b9ea68..d054835 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,11 @@ 2009-09-25 Jacek Antonelli + * Removed grid stuff from World Map (for now). + + modified: linden/indra/newview/llfloaterworldmap.cpp + modified: linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml + + * Hid "Start Location" from grid manager floater. Not used anyway. modified: linden/indra/newview/skins/default/xui/en-us/floater_login.xml diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index 5399867..70223c9 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp @@ -68,12 +68,6 @@ #include "llappviewer.h" #include "llmapimagetype.h" #include "llweb.h" -#include "floaterlogin.h" -#include "llstartup.h" -#include "hippoGridManager.h" -#include "floaterlogin.h" -#include "llpanellogin.h" - #include "llglheaders.h" @@ -243,10 +237,6 @@ BOOL LLFloaterWorldMap::postBuild() landmark_combo->setTextEntryCallback( onComboTextEntry ); } - childSetCommitCallback("grid_combo", onSelectServer, this); - - childSetAction("Grid Manager", onGridManager, this); - childSetAction("Go Home", onGoHome, this); childSetAction("Teleport", onClickTeleportBtn, this); @@ -345,7 +335,6 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target) // If nothing is being tracked, set flag so the user position will be found gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); - LLFloaterWorldMap::addServer(gHippoGridManager->getDefaultGridNick()); } if (center_on_target) @@ -390,48 +379,6 @@ void LLFloaterWorldMap::hide(void*) } -// static -void LLFloaterWorldMap::addServer(const std::string& server) -{ - const std::string &defaultGrid = gHippoGridManager->getDefaultGridNick(); - - LLCtrlListInterface *grids = gFloaterWorldMap->childGetListInterface("grid_combo"); - if (!grids) return; - - // Delete all but the "None" entry - S32 list_size = grids->getItemCount(); - while (list_size > 1) - { - grids->selectNthItem(1); - grids->operateOnSelection(LLCtrlListInterface::OP_DELETE); - --list_size; - } - - - //LLComboBox *grids = gFloaterWorldMap->getChild("grid_combo"); - S32 selectIndex = -1, i = 0; - //grids->removeall(); - if (defaultGrid != "") { - grids->addSimpleElement(defaultGrid); - selectIndex = i++; - } - HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid(); - for (it = gHippoGridManager->beginGrid(); it != end; ++it) { - const std::string &grid = it->second->getGridNick(); - if (grid != defaultGrid) { - grids->addSimpleElement(grid); - //if (grid == mCurGrid) selectIndex = i; - i++; - } - } - grids->selectFirstItem(); - //grids->setCurrentByIndex(0); - - //LLComboBox* combo = sInstance->getChild("server_combo"); - //combo->add(server, LLSD(domain_name) ); - //combo->setCurrentByIndex(0); -} - // virtual void LLFloaterWorldMap::setVisible( BOOL visible ) { @@ -505,8 +452,6 @@ void LLFloaterWorldMap::draw() updateLocation(); - LLComboBox *grid_combo = getChild("grid_combo"); - std::string current_grid = gHippoGridManager->getConnectedGrid()->getGridNick(); LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); if (LLTracker::TRACKING_AVATAR == tracking_status) @@ -553,19 +498,6 @@ void LLFloaterWorldMap::draw() centerOnTarget(TRUE); } - //GRID MANAGER - if (grid_combo->getSelectedValue().asString() != "None") - { - childSetEnabled("Teleport", TRUE); - childSetColor("grid_icon", gTrackColor); - } - else - { - childSetEnabled("Teleport", (BOOL)tracking_status); - childSetColor("grid_icon", gDisabledTrackColor); - } - //END GRID MANAGER - // childSetEnabled("Clear", (BOOL)tracking_status); childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->mIsTrackingUnknownLocation); childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); @@ -1048,18 +980,6 @@ void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui) } -void LLFloaterWorldMap::clearGridSelection(BOOL clear_ui) -{ - if (clear_ui || !childHasKeyboardFocus("grid_combo")) - { - LLCtrlListInterface *list = childGetListInterface("grid_combo"); - if (list) - { - list->selectByValue( "None" ); - } - } -} - void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui) { if (clear_ui || !childHasKeyboardFocus("landmark combo")) @@ -1157,14 +1077,6 @@ void LLFloaterWorldMap::onPanBtn( void* userdata ) } // static -void LLFloaterWorldMap::onGridManager(void*) -{ - LoginFloater::newShow(std::string("Test"), false); - //gAgent.teleportHome(); - //gFloaterWorldMap->close(); -} - -// static void LLFloaterWorldMap::onGoHome(void*) { gAgent.teleportHomeConfirm(); @@ -1251,9 +1163,6 @@ void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata ) item_id.setNull(); } } - //GRID MANAGER HAX - self->clearGridSelection(TRUE); - //END GRID MANAGER HAX self->trackLandmark( item_id); onShowTargetBtn(self); @@ -1305,10 +1214,6 @@ void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata ) const LLUUID& new_avatar_id = list->getCurrentID(); if (new_avatar_id.notNull()) { - //GRID MANAGER HAX - self->clearGridSelection(TRUE); - //END GRID MANAGER HAX - std::string name; LLComboBox* combo = gFloaterWorldMap->getChild("friend combo"); if (combo) name = combo->getSimple(); @@ -1390,10 +1295,6 @@ void LLFloaterWorldMap::onClearBtn(void* data) LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; self->mSLURL = ""; // Clear the SLURL since it's invalid self->mSetToUserPosition = TRUE; // Revert back to the current user position - //KOW TODO clear grid combo red ring, clear grid combo. - //GRID MANAGER HAX - self->clearGridSelection(TRUE); - //END GRID MANAGER HAX } // static @@ -1503,39 +1404,6 @@ void LLFloaterWorldMap::fly() // protected void LLFloaterWorldMap::teleport() { - //BEGIN CROSS GRIP TP// - LLComboBox *grid_combo = getChild("grid_combo"); - std::string current_grid = gHippoGridManager->getConnectedGrid()->getGridNick(); - - // BUG: the client crashes if fed an invalid grid through this interface, which shouldn't happen - if(//grid_combo && grid_combo->getSelectedValue().asString() != current_grid || gSavedSettings.getBOOL("CmdLineLoginURI") && - grid_combo->getSelectedValue().asString() != "None" && - !grid_combo->getSelectedValue().asString().empty()) - { - HippoGridInfo *gridInfo = gHippoGridManager->getGrid(grid_combo->getSelectedValue().asString()); - //DEBUG - - llwarns << "tp button current grid = " << grid_combo->getSelectedValue().asString() << llendl; - std::string firstName = gridInfo->getFirstName(); - std::string lastName = gridInfo->getLastName(); - std::string loginPassword = gridInfo->getAvatarPassword(); - - if(!firstName.empty() && !lastName.empty()) - { - gLoginHandler.mFirstName = firstName; - gLoginHandler.mLastName = lastName; - gLoginHandler.mPassword = loginPassword; - } - - gHippoGridManager->setCurrentGrid(gridInfo->getGridNick()); - //gHippoGridManager->setDefaultGrid(gridInfo->getGridNick()); - //this doesn't work :( gSavedSettings.setBOOL("CmdLineLoginURI", FALSE); - LLStartUp::setShouldAutoLogin(true); - LLAppViewer::instance()->requestLogout(false); - return; - } - //END CROSS GRID TP// - BOOL teleport_home = FALSE; LLVector3d pos_global; LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); @@ -1826,20 +1694,3 @@ void LLFloaterWorldMap::onCommitSearchResult(LLUICtrl*, void* userdata) onShowTargetBtn(self); } - -// static -void LLFloaterWorldMap::onSelectServer(LLUICtrl* ctrl, void* userdata) -{ - //GRID MANAGER COMBO BOX CLICKED// - llwarns << "onSelectServer called" << llendl; - //snip from onClearBtn (bless this mess) - LLFloaterWorldMap* self = (LLFloaterWorldMap*) userdata; - self->mTrackedStatus = LLTracker::TRACKING_NOTHING; - LLTracker::stopTracking((void *)(intptr_t)TRUE); - //LLTracker::stopTracking(NULL); - LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; - self->mSLURL = ""; // Clear the SLURL since it's invalid - self->mSetToUserPosition = TRUE; // Revert back to the current user position - - self->setDefaultBtn("Teleport"); -} diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml b/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml index d2ebbe6..059e8fb 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_world_map.xml @@ -9,150 +9,121 @@ - - - - - Grids - - - -