summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationhistory.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2009-07-09 22:30:15 +0000
committerLeyla Farazha <leyla@lindenlab.com>2009-07-09 22:30:15 +0000
commit8016e73cc0a2a27062fae27e609535e002eef362 (patch)
tree2275ae830416ccc606e0c0c576445c50b310222f /indra/newview/lllocationhistory.cpp
parent4cbf65be95dfb2320642c018b15a904075283339 (diff)
svn merge -r126726:126727 svn+ssh://svn.lindenlab.com/linden/branches/skinning/skinning-15/
DEV-35109 Nav bar does not record teleports taken by any method other than typing into nav bar DEV-35117 Hard to open local chat, needs bottom bar widget for now hiding test IM floaters
Diffstat (limited to 'indra/newview/lllocationhistory.cpp')
-rw-r--r--indra/newview/lllocationhistory.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
index 179eca2532..43512372b1 100644
--- a/indra/newview/lllocationhistory.cpp
+++ b/indra/newview/lllocationhistory.cpp
@@ -37,11 +37,28 @@
#include <iomanip> // for std::setw()
#include "llui.h"
+#include "llagent.h"
+#include "llslurl.h"
+#include "llviewerregion.h"
+#include "llviewerparcelmgr.h"
+
+
+void addLocationHistory()
+{
+ LLVector3 position = gAgent.getPositionAgent();
+ std::string region_name = gAgent.getRegion()->getName();
+ std::string location = LLSLURL::buildSLURL(region_name, position.mV[VX],
+ position.mV[VY], position.mV[VZ]);
+ LLLocationHistory* lh = LLLocationHistory::getInstance();
+ lh->addItem(location);
+ lh->save();
+}
LLLocationHistory::LLLocationHistory() :
mFilename("typed_locations.txt"),
mLoadedCallback(NULL)
{
+ LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(addLocationHistory);
}
void LLLocationHistory::addItem(std::string item)