diff options
author | Jacek Antonelli | 2009-09-25 18:39:58 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-09-25 18:42:36 -0500 |
commit | 11fafb749f86fbc33c7b32292abbe808f56792e1 (patch) | |
tree | 68cd07cae55aa9f711aaf88c6dbe61de091b2848 /linden/indra/newview/llfloaterworldmap.cpp | |
parent | Hid "Start Location" from grid manager floater. Not used anyway. (diff) | |
download | meta-impy-11fafb749f86fbc33c7b32292abbe808f56792e1.zip meta-impy-11fafb749f86fbc33c7b32292abbe808f56792e1.tar.gz meta-impy-11fafb749f86fbc33c7b32292abbe808f56792e1.tar.bz2 meta-impy-11fafb749f86fbc33c7b32292abbe808f56792e1.tar.xz |
Removed grid stuff from World Map (for now).
Diffstat (limited to 'linden/indra/newview/llfloaterworldmap.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterworldmap.cpp | 149 |
1 files changed, 0 insertions, 149 deletions
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 @@ | |||
68 | #include "llappviewer.h" | 68 | #include "llappviewer.h" |
69 | #include "llmapimagetype.h" | 69 | #include "llmapimagetype.h" |
70 | #include "llweb.h" | 70 | #include "llweb.h" |
71 | #include "floaterlogin.h" | ||
72 | #include "llstartup.h" | ||
73 | #include "hippoGridManager.h" | ||
74 | #include "floaterlogin.h" | ||
75 | #include "llpanellogin.h" | ||
76 | |||
77 | 71 | ||
78 | #include "llglheaders.h" | 72 | #include "llglheaders.h" |
79 | 73 | ||
@@ -243,10 +237,6 @@ BOOL LLFloaterWorldMap::postBuild() | |||
243 | landmark_combo->setTextEntryCallback( onComboTextEntry ); | 237 | landmark_combo->setTextEntryCallback( onComboTextEntry ); |
244 | } | 238 | } |
245 | 239 | ||
246 | childSetCommitCallback("grid_combo", onSelectServer, this); | ||
247 | |||
248 | childSetAction("Grid Manager", onGridManager, this); | ||
249 | |||
250 | childSetAction("Go Home", onGoHome, this); | 240 | childSetAction("Go Home", onGoHome, this); |
251 | 241 | ||
252 | childSetAction("Teleport", onClickTeleportBtn, this); | 242 | childSetAction("Teleport", onClickTeleportBtn, this); |
@@ -345,7 +335,6 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target) | |||
345 | // If nothing is being tracked, set flag so the user position will be found | 335 | // If nothing is being tracked, set flag so the user position will be found |
346 | gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); | 336 | gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); |
347 | 337 | ||
348 | LLFloaterWorldMap::addServer(gHippoGridManager->getDefaultGridNick()); | ||
349 | } | 338 | } |
350 | 339 | ||
351 | if (center_on_target) | 340 | if (center_on_target) |
@@ -390,48 +379,6 @@ void LLFloaterWorldMap::hide(void*) | |||
390 | } | 379 | } |
391 | 380 | ||
392 | 381 | ||
393 | // static | ||
394 | void LLFloaterWorldMap::addServer(const std::string& server) | ||
395 | { | ||
396 | const std::string &defaultGrid = gHippoGridManager->getDefaultGridNick(); | ||
397 | |||
398 | LLCtrlListInterface *grids = gFloaterWorldMap->childGetListInterface("grid_combo"); | ||
399 | if (!grids) return; | ||
400 | |||
401 | // Delete all but the "None" entry | ||
402 | S32 list_size = grids->getItemCount(); | ||
403 | while (list_size > 1) | ||
404 | { | ||
405 | grids->selectNthItem(1); | ||
406 | grids->operateOnSelection(LLCtrlListInterface::OP_DELETE); | ||
407 | --list_size; | ||
408 | } | ||
409 | |||
410 | |||
411 | //LLComboBox *grids = gFloaterWorldMap->getChild<LLComboBox>("grid_combo"); | ||
412 | S32 selectIndex = -1, i = 0; | ||
413 | //grids->removeall(); | ||
414 | if (defaultGrid != "") { | ||
415 | grids->addSimpleElement(defaultGrid); | ||
416 | selectIndex = i++; | ||
417 | } | ||
418 | HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid(); | ||
419 | for (it = gHippoGridManager->beginGrid(); it != end; ++it) { | ||
420 | const std::string &grid = it->second->getGridNick(); | ||
421 | if (grid != defaultGrid) { | ||
422 | grids->addSimpleElement(grid); | ||
423 | //if (grid == mCurGrid) selectIndex = i; | ||
424 | i++; | ||
425 | } | ||
426 | } | ||
427 | grids->selectFirstItem(); | ||
428 | //grids->setCurrentByIndex(0); | ||
429 | |||
430 | //LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); | ||
431 | //combo->add(server, LLSD(domain_name) ); | ||
432 | //combo->setCurrentByIndex(0); | ||
433 | } | ||
434 | |||
435 | // virtual | 382 | // virtual |
436 | void LLFloaterWorldMap::setVisible( BOOL visible ) | 383 | void LLFloaterWorldMap::setVisible( BOOL visible ) |
437 | { | 384 | { |
@@ -505,8 +452,6 @@ void LLFloaterWorldMap::draw() | |||
505 | 452 | ||
506 | updateLocation(); | 453 | updateLocation(); |
507 | 454 | ||
508 | LLComboBox *grid_combo = getChild<LLComboBox>("grid_combo"); | ||
509 | std::string current_grid = gHippoGridManager->getConnectedGrid()->getGridNick(); | ||
510 | 455 | ||
511 | LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); | 456 | LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); |
512 | if (LLTracker::TRACKING_AVATAR == tracking_status) | 457 | if (LLTracker::TRACKING_AVATAR == tracking_status) |
@@ -553,19 +498,6 @@ void LLFloaterWorldMap::draw() | |||
553 | centerOnTarget(TRUE); | 498 | centerOnTarget(TRUE); |
554 | } | 499 | } |
555 | 500 | ||
556 | //GRID MANAGER | ||
557 | if (grid_combo->getSelectedValue().asString() != "None") | ||
558 | { | ||
559 | childSetEnabled("Teleport", TRUE); | ||
560 | childSetColor("grid_icon", gTrackColor); | ||
561 | } | ||
562 | else | ||
563 | { | ||
564 | childSetEnabled("Teleport", (BOOL)tracking_status); | ||
565 | childSetColor("grid_icon", gDisabledTrackColor); | ||
566 | } | ||
567 | //END GRID MANAGER | ||
568 | |||
569 | // childSetEnabled("Clear", (BOOL)tracking_status); | 501 | // childSetEnabled("Clear", (BOOL)tracking_status); |
570 | childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->mIsTrackingUnknownLocation); | 502 | childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->mIsTrackingUnknownLocation); |
571 | childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); | 503 | childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); |
@@ -1048,18 +980,6 @@ void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui) | |||
1048 | } | 980 | } |
1049 | 981 | ||
1050 | 982 | ||
1051 | void LLFloaterWorldMap::clearGridSelection(BOOL clear_ui) | ||
1052 | { | ||
1053 | if (clear_ui || !childHasKeyboardFocus("grid_combo")) | ||
1054 | { | ||
1055 | LLCtrlListInterface *list = childGetListInterface("grid_combo"); | ||
1056 | if (list) | ||
1057 | { | ||
1058 | list->selectByValue( "None" ); | ||
1059 | } | ||
1060 | } | ||
1061 | } | ||
1062 | |||
1063 | void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui) | 983 | void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui) |
1064 | { | 984 | { |
1065 | if (clear_ui || !childHasKeyboardFocus("landmark combo")) | 985 | if (clear_ui || !childHasKeyboardFocus("landmark combo")) |
@@ -1157,14 +1077,6 @@ void LLFloaterWorldMap::onPanBtn( void* userdata ) | |||
1157 | } | 1077 | } |
1158 | 1078 | ||
1159 | // static | 1079 | // static |
1160 | void LLFloaterWorldMap::onGridManager(void*) | ||
1161 | { | ||
1162 | LoginFloater::newShow(std::string("Test"), false); | ||
1163 | //gAgent.teleportHome(); | ||
1164 | //gFloaterWorldMap->close(); | ||
1165 | } | ||
1166 | |||
1167 | // static | ||
1168 | void LLFloaterWorldMap::onGoHome(void*) | 1080 | void LLFloaterWorldMap::onGoHome(void*) |
1169 | { | 1081 | { |
1170 | gAgent.teleportHomeConfirm(); | 1082 | gAgent.teleportHomeConfirm(); |
@@ -1251,9 +1163,6 @@ void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata ) | |||
1251 | item_id.setNull(); | 1163 | item_id.setNull(); |
1252 | } | 1164 | } |
1253 | } | 1165 | } |
1254 | //GRID MANAGER HAX | ||
1255 | self->clearGridSelection(TRUE); | ||
1256 | //END GRID MANAGER HAX | ||
1257 | 1166 | ||
1258 | self->trackLandmark( item_id); | 1167 | self->trackLandmark( item_id); |
1259 | onShowTargetBtn(self); | 1168 | onShowTargetBtn(self); |
@@ -1305,10 +1214,6 @@ void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata ) | |||
1305 | const LLUUID& new_avatar_id = list->getCurrentID(); | 1214 | const LLUUID& new_avatar_id = list->getCurrentID(); |
1306 | if (new_avatar_id.notNull()) | 1215 | if (new_avatar_id.notNull()) |
1307 | { | 1216 | { |
1308 | //GRID MANAGER HAX | ||
1309 | self->clearGridSelection(TRUE); | ||
1310 | //END GRID MANAGER HAX | ||
1311 | |||
1312 | std::string name; | 1217 | std::string name; |
1313 | LLComboBox* combo = gFloaterWorldMap->getChild<LLComboBox>("friend combo"); | 1218 | LLComboBox* combo = gFloaterWorldMap->getChild<LLComboBox>("friend combo"); |
1314 | if (combo) name = combo->getSimple(); | 1219 | if (combo) name = combo->getSimple(); |
@@ -1390,10 +1295,6 @@ void LLFloaterWorldMap::onClearBtn(void* data) | |||
1390 | LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; | 1295 | LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; |
1391 | self->mSLURL = ""; // Clear the SLURL since it's invalid | 1296 | self->mSLURL = ""; // Clear the SLURL since it's invalid |
1392 | self->mSetToUserPosition = TRUE; // Revert back to the current user position | 1297 | self->mSetToUserPosition = TRUE; // Revert back to the current user position |
1393 | //KOW TODO clear grid combo red ring, clear grid combo. | ||
1394 | //GRID MANAGER HAX | ||
1395 | self->clearGridSelection(TRUE); | ||
1396 | //END GRID MANAGER HAX | ||
1397 | } | 1298 | } |
1398 | 1299 | ||
1399 | // static | 1300 | // static |
@@ -1503,39 +1404,6 @@ void LLFloaterWorldMap::fly() | |||
1503 | // protected | 1404 | // protected |
1504 | void LLFloaterWorldMap::teleport() | 1405 | void LLFloaterWorldMap::teleport() |
1505 | { | 1406 | { |
1506 | //BEGIN CROSS GRIP TP// | ||
1507 | LLComboBox *grid_combo = getChild<LLComboBox>("grid_combo"); | ||
1508 | std::string current_grid = gHippoGridManager->getConnectedGrid()->getGridNick(); | ||
1509 | |||
1510 | // BUG: the client crashes if fed an invalid grid through this interface, which shouldn't happen | ||
1511 | if(//grid_combo && grid_combo->getSelectedValue().asString() != current_grid || gSavedSettings.getBOOL("CmdLineLoginURI") && | ||
1512 | grid_combo->getSelectedValue().asString() != "None" && | ||
1513 | !grid_combo->getSelectedValue().asString().empty()) | ||
1514 | { | ||
1515 | HippoGridInfo *gridInfo = gHippoGridManager->getGrid(grid_combo->getSelectedValue().asString()); | ||
1516 | //DEBUG | ||
1517 | |||
1518 | llwarns << "tp button current grid = " << grid_combo->getSelectedValue().asString() << llendl; | ||
1519 | std::string firstName = gridInfo->getFirstName(); | ||
1520 | std::string lastName = gridInfo->getLastName(); | ||
1521 | std::string loginPassword = gridInfo->getAvatarPassword(); | ||
1522 | |||
1523 | if(!firstName.empty() && !lastName.empty()) | ||
1524 | { | ||
1525 | gLoginHandler.mFirstName = firstName; | ||
1526 | gLoginHandler.mLastName = lastName; | ||
1527 | gLoginHandler.mPassword = loginPassword; | ||
1528 | } | ||
1529 | |||
1530 | gHippoGridManager->setCurrentGrid(gridInfo->getGridNick()); | ||
1531 | //gHippoGridManager->setDefaultGrid(gridInfo->getGridNick()); | ||
1532 | //this doesn't work :( gSavedSettings.setBOOL("CmdLineLoginURI", FALSE); | ||
1533 | LLStartUp::setShouldAutoLogin(true); | ||
1534 | LLAppViewer::instance()->requestLogout(false); | ||
1535 | return; | ||
1536 | } | ||
1537 | //END CROSS GRID TP// | ||
1538 | |||
1539 | BOOL teleport_home = FALSE; | 1407 | BOOL teleport_home = FALSE; |
1540 | LLVector3d pos_global; | 1408 | LLVector3d pos_global; |
1541 | LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); | 1409 | LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); |
@@ -1826,20 +1694,3 @@ void LLFloaterWorldMap::onCommitSearchResult(LLUICtrl*, void* userdata) | |||
1826 | 1694 | ||
1827 | onShowTargetBtn(self); | 1695 | onShowTargetBtn(self); |
1828 | } | 1696 | } |
1829 | |||
1830 | // static | ||
1831 | void LLFloaterWorldMap::onSelectServer(LLUICtrl* ctrl, void* userdata) | ||
1832 | { | ||
1833 | //GRID MANAGER COMBO BOX CLICKED// | ||
1834 | llwarns << "onSelectServer called" << llendl; | ||
1835 | //snip from onClearBtn (bless this mess) | ||
1836 | LLFloaterWorldMap* self = (LLFloaterWorldMap*) userdata; | ||
1837 | self->mTrackedStatus = LLTracker::TRACKING_NOTHING; | ||
1838 | LLTracker::stopTracking((void *)(intptr_t)TRUE); | ||
1839 | //LLTracker::stopTracking(NULL); | ||
1840 | LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE; | ||
1841 | self->mSLURL = ""; // Clear the SLURL since it's invalid | ||
1842 | self->mSetToUserPosition = TRUE; // Revert back to the current user position | ||
1843 | |||
1844 | self->setDefaultBtn("Teleport"); | ||
1845 | } | ||