From 43cd306e901c444b997614c8e3d16ef79c3aa044 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 7 Sep 2010 00:46:37 -0700 Subject: Applied #472: teleport history from Emerald, patch by Ansariel Hiler, feature originally by Zi Ree --- linden/indra/newview/CMakeLists.txt | 2 + linden/indra/newview/app_settings/settings.xml | 18 +- linden/indra/newview/llagent.cpp | 29 ++ linden/indra/newview/llagent.h | 9 +- linden/indra/newview/llfloaterteleporthistory.cpp | 348 +++++++++++++++++++++ linden/indra/newview/llfloaterteleporthistory.h | 93 ++++++ linden/indra/newview/llstartup.cpp | 10 + linden/indra/newview/llviewermenu.cpp | 7 + linden/indra/newview/llviewermessage.cpp | 11 + linden/indra/newview/llviewerwindow.cpp | 8 + .../default/xui/en-us/floater_teleport_history.xml | 46 +++ .../skins/default/xui/en-us/menu_viewer.xml | 4 + 12 files changed, 583 insertions(+), 2 deletions(-) create mode 100644 linden/indra/newview/llfloaterteleporthistory.cpp create mode 100644 linden/indra/newview/llfloaterteleporthistory.h create mode 100644 linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml (limited to 'linden/indra') diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index cd4acdc..995ef7e 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -220,6 +220,7 @@ set(viewer_SOURCE_FILES llfloatersnapshot.cpp llfloaterstats.cpp llfloatertelehub.cpp + llfloaterteleporthistory.cpp llfloatertest.cpp llfloatertools.cpp llfloatertopobjects.cpp @@ -663,6 +664,7 @@ set(viewer_HEADER_FILES llfloatersnapshot.h llfloaterstats.h llfloatertelehub.h + llfloaterteleporthistory.h llfloatertest.h llfloatertools.h llfloatertopobjects.h diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 41ec05d..db44efd 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -5823,7 +5823,23 @@ 0 - FloaterViewBottom + FloaterTeleportHistoryRect + + Comment + Rectangle for teleport history window + Persist + 1 + Type + Rect + Value + + 20 + 20 + 470 + 200 + + + FloaterViewBottom Comment [DO NOT MODIFY] Controls layout of floating windows within SL window diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 38e1c0f..03d5c65 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -6102,6 +6102,10 @@ void LLAgent::teleportRequest( const LLVector3& pos_local) { LLViewerRegion* regionp = getRegion(); + + // Set last region data for teleport history + gAgent.setLastRegionData(regionp->getName(),gAgent.getPositionAgent()); + if(regionp && teleportCore()) { llinfos << "TeleportRequest: '" << region_handle << "':" << pos_local @@ -6133,6 +6137,10 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) // [/RLVa:KB] LLViewerRegion *regionp = getRegion(); + + // Set last region data for teleport history + gAgent.setLastRegionData(regionp->getName(),gAgent.getPositionAgent()); + if(regionp && teleportCore()) { LLMessageSystem* msg = gMessageSystem; @@ -6148,6 +6156,10 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) void LLAgent::teleportViaLure(const LLUUID& lure_id, BOOL godlike) { LLViewerRegion* regionp = getRegion(); + + // Set last region data for teleport history + gAgent.setLastRegionData(regionp->getName(),gAgent.getPositionAgent()); + if(regionp && teleportCore()) { U32 teleport_flags = 0x0; @@ -8082,4 +8094,21 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename) }//end for (all message sets in xml file) } +void LLAgent::setLastRegionData(std::string regionName, LLVector3 agentCoords) +{ + mLastRegion = regionName; + mLastCoordinates = agentCoords; +} + +std::string LLAgent::getLastRegion() +{ + return mLastRegion; +} + +LLVector3 LLAgent::getLastCoords() +{ + return mLastCoordinates; +} + + // EOF diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index 798de8c..3a39448 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h @@ -177,6 +177,11 @@ public: void clearRenderState(U8 clearstate); U8 getRenderState(); + // get/set last region data + std::string getLastRegion(); + LLVector3 getLastCoords(); + void setLastRegionData(std::string regionName,LLVector3 agentCoords); + // Set the home data void setRegion(LLViewerRegion *regionp); LLViewerRegion *getRegion() const; @@ -915,7 +920,9 @@ private: BOOL mFirstLogin; BOOL mGenderChosen; - + std::string mLastRegion; + LLVector3 mLastCoordinates; + //-------------------------------------------------------------------- // Wearables //-------------------------------------------------------------------- diff --git a/linden/indra/newview/llfloaterteleporthistory.cpp b/linden/indra/newview/llfloaterteleporthistory.cpp new file mode 100644 index 0000000..70a2d71 --- /dev/null +++ b/linden/indra/newview/llfloaterteleporthistory.cpp @@ -0,0 +1,348 @@ +/** + * @file llfloaterteleporthistory.cpp + * @author Zi Ree + * @brief LLFloaterTeleportHistory class implementation + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2008, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "linden_common.h" + +#include "llfloaterteleporthistory.h" +#include "llfloaterworldmap.h" +#include "lltimer.h" +#include "lluictrlfactory.h" +#include "llurldispatcher.h" +#include "llurlsimstring.h" +#include "llviewercontrol.h" // gSavedSettings +#include "llviewerwindow.h" +#include "llweb.h" + +#include "apr_time.h" + +// [RLVa:KB] - Emerald specific +#include "rlvhandler.h" +#include "llsdserialize.h" +// [/RLVa:KB] + +// globals +LLFloaterTeleportHistory* gFloaterTeleportHistory; + +LLFloaterTeleportHistory::LLFloaterTeleportHistory() +: LLFloater(std::string("teleporthistory")), + mPlacesInList(NULL), + mPlacesOutList(NULL), + pItem(NULL), + id(0) +{ + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_teleport_history.xml", NULL); +} + +// virtual +LLFloaterTeleportHistory::~LLFloaterTeleportHistory() +{ +} + +// virtual +void LLFloaterTeleportHistory::onFocusReceived() +{ + // take care to enable or disable buttons depending on the selection in the places list + if(pItem) + { + setButtonsEnabled(TRUE); + } + else + { + setButtonsEnabled(FALSE); + } + LLFloater::onFocusReceived(); +} + +BOOL LLFloaterTeleportHistory::postBuild() +{ + // make sure the cached pointer to the scroll list is valid + mPlacesInList=getChild("places_list_in"); + if(!mPlacesInList) + { + llwarns << "coud not get pointer to places list in" << llendl; + return FALSE; + } + mPlacesOutList=getChild("places_list_out"); + if(!mPlacesOutList) + { + llwarns << "coud not get pointer to places list out" << llendl; + return FALSE; + } + + // setup callbacks for the scroll list + mPlacesInList->setDoubleClickCallback(onTeleport); + mPlacesOutList->setDoubleClickCallback(onTeleport); + childSetCommitCallback("places_list_in", onInPlacesSelected, this); + childSetCommitCallback("places_list_out", onOutPlacesSelected, this); + childSetAction("teleport", onTeleport, this); + childSetAction("show_on_map", onShowOnMap, this); + childSetAction("copy_slurl", onCopySLURL, this); + loadEntrys(); + + return TRUE; +} +void LLFloaterTeleportHistory::saveEntry(LLSD toSave) +{ + tpList.append(toSave); + std::string filename=getFileName(); + llofstream file; + file.open(filename.c_str()); + LLSDSerialize::toPrettyXML(tpList, file); + file.close(); +} + +std::string LLFloaterTeleportHistory::getFileName() +{ + std::string path=gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, ""); + + if (!path.empty()) + { + path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "teleport_history.xml"); + } + return path; +} +void LLFloaterTeleportHistory::loadEntrys() +{ + std::string filename=getFileName(); + if (filename.empty()) + { + llinfos << "no valid user directory." << llendl; + return; + } + llifstream file; + file.open(filename.c_str()); + if (file.is_open()) + LLSDSerialize::fromXML(tpList, file); + file.close(); + + for(int i = 0;i<(int)tpList.size();i++) + { + LLSD data = tpList[i]; + LLScrollListCtrl* pItemPointer; + if(data["out"].asBoolean()) + pItemPointer=mPlacesOutList; + else + pItemPointer=mPlacesInList; + + pItemPointer->addElement(data, ADD_TOP); + pItemPointer->deselectAllItems(TRUE); + setButtonsEnabled(FALSE); + id++; + } +} +void LLFloaterTeleportHistory::addEntry(std::string regionName, S16 x, S16 y, S16 z,bool outList) +{ + LLScrollListCtrl* pItemPointer; + if(outList) + pItemPointer=mPlacesOutList; + else + pItemPointer=mPlacesInList; + // only if the cached scroll list pointer is valid + if(pItemPointer) + { + // prepare display of position + std::string position=llformat("%d, %d, %d", x, y, z); + // prepare simstring for later parsing + std::string simString = regionName + llformat("/%d/%d/%d", x, y, z); + simString = LLWeb::escapeURL(simString); + + // check if we are in daylight savings time + std::string timeZone = "PST"; + if(is_daylight_savings()) timeZone = "PDT"; + + // do all time related stuff as closely together as possible, because every other operation + // might change the internal tm* buffer + struct tm* internal_time; + internal_time = utc_to_pacific_time(time_corrected(), is_daylight_savings()); + std::string timeString=llformat("%02d/%02d/%04d - %02d:%02d:%02d ",internal_time->tm_mon+1,internal_time->tm_mday,internal_time->tm_year+1900,internal_time->tm_hour, internal_time->tm_min, internal_time->tm_sec)+timeZone; + + // build the list entry + LLSD value; + value["id"] = id; + value["columns"][0]["column"] = "region"; + value["columns"][0]["value"] = regionName; + value["columns"][1]["column"] = "position"; + value["columns"][1]["value"] = position; + value["columns"][2]["column"] = "visited"; + value["columns"][2]["value"] = timeString; + + // these columns are hidden and serve as data storage for simstring and SLURL + value["columns"][3]["column"] = "slurl"; + value["columns"][3]["value"] = LLURLDispatcher::buildSLURL(regionName, x, y, z); + value["columns"][4]["column"] = "simstring"; + value["columns"][4]["value"] = simString; + value["out"]=outList; + +// [RLVa:KB] - Alternate: Emerald-370 + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) + { + // TODO: This is the original code from Emerald. It + // uses the class RlvStrings, defined in rlvcommon.cpp + // to load localized strings. For Imprudence we use the + // old fashioned way via RlvHandler with English + // strings only! + // value["columns"][0]["value"] = RlvStrings::getString(RLV_STRING_HIDDEN_REGION); + // value["columns"][1]["value"] = RlvStrings::getString(RLV_STRING_HIDDEN); + // value["columns"][3]["value"] = RlvStrings::getString(RLV_STRING_HIDDEN); + // value["columns"][4]["value"] = RlvStrings::getString(RLV_STRING_HIDDEN); + + value["columns"][0]["value"] = RlvHandler::cstrHiddenRegion; + value["columns"][1]["value"] = RlvHandler::cstrHidden; + value["columns"][3]["value"] = RlvHandler::cstrHidden; + value["columns"][4]["value"] = RlvHandler::cstrHidden; + } +// [/RLVa:KB] + saveEntry(value); + // add the new list entry on top of the list, deselect all and disable the buttons + pItemPointer->addElement(value, ADD_TOP); + pItemPointer->deselectAllItems(TRUE); + setButtonsEnabled(FALSE); + id++; + } + else + { + llwarns << "pointer to places list is NULL" << llendl; + } +} + +void LLFloaterTeleportHistory::setButtonsEnabled(BOOL on) +{ +// [RLVa:KB] - Alternate: Emerald-370 + if (rlv_handler_t::isEnabled()) + { + // TODO: This is the original code from Emerald. It + // uses the class RlvStrings, defined in rlvcommon.cpp + // to load localized strings. For Imprudence we use the + // old fashioned way via RlvHandler with English + // strings only! + //if ( (pItem) && (pItem->getColumn(4)) && (RlvStrings::getString(RLV_STRING_HIDDEN) == pItem->getColumn(4)->getValue().asString()) ) + if ( (pItem) && (pItem->getColumn(4)) && (RlvHandler::cstrHidden == pItem->getColumn(4)->getValue().asString()) ) + { + on = FALSE; + } + } +// [/RLVa:K] + + // enable or disable buttons + childSetEnabled("teleport", on); + childSetEnabled("show_on_map", on); + childSetEnabled("copy_slurl", on); +} + +// virtual +void LLFloaterTeleportHistory::onClose(bool app_quitting) +{ + LLFloater::setVisible(FALSE); +} + +// virtual +BOOL LLFloaterTeleportHistory::canClose() +{ + return !LLApp::isExiting(); +} + +// callbacks + +// static +void LLFloaterTeleportHistory::onInPlacesSelected(LLUICtrl* /* ctrl */, void* data) +{ + LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; + self->mPlacesOutList->deselectAllItems(); + self->pItem = self->mPlacesInList->getFirstSelected(); + // on selection change check if we need to enable or disable buttons + if(self->pItem) + { + self->setButtonsEnabled(TRUE); + } + else + { + self->setButtonsEnabled(FALSE); + } +} + +// static +void LLFloaterTeleportHistory::onOutPlacesSelected(LLUICtrl* /* ctrl */, void* data) +{ + LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; + self->mPlacesInList->deselectAllItems(); + self->pItem = self->mPlacesOutList->getFirstSelected(); + // on selection change check if we need to enable or disable buttons + if(self->pItem) + { + self->setButtonsEnabled(TRUE); + } + else + { + self->setButtonsEnabled(FALSE); + } +} + +// static +void LLFloaterTeleportHistory::onTeleport(void* data) +{ + LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; + + // build secondlife::/app link from simstring for instant teleport to destination + std::string slapp="secondlife:///app/teleport/" + self->pItem->getColumn(4)->getValue().asString(); + LLURLDispatcher::dispatch(slapp, NULL, true); +} + +// static +void LLFloaterTeleportHistory::onShowOnMap(void* data) +{ + LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; + + // get simstring from selected entry and parse it for its components + std::string simString = self->pItem->getColumn(4)->getValue().asString(); + std::string region = ""; + S32 x = 128; + S32 y = 128; + S32 z = 20; + + LLURLSimString::parse(simString, ®ion, &x, &y, &z); + + // point world map at position + gFloaterWorldMap->trackURL(region, x, y, z); + LLFloaterWorldMap::show(NULL, TRUE); +} + +// static +void LLFloaterTeleportHistory::onCopySLURL(void* data) +{ + LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; + + // get SLURL of the selected entry and copy it to the clipboard + std::string SLURL=self->pItem->getColumn(3)->getValue().asString(); + gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(SLURL)); +} diff --git a/linden/indra/newview/llfloaterteleporthistory.h b/linden/indra/newview/llfloaterteleporthistory.h new file mode 100644 index 0000000..e458259 --- /dev/null +++ b/linden/indra/newview/llfloaterteleporthistory.h @@ -0,0 +1,93 @@ +/** + * @file llfloaterteleporthistory.h + * @author Zi Ree + * @brief LLFloaterTeleportHistory class definition + * + * This class implements a floater where all visited teleport locations are + * stored, so the resident can quickly see where they have been and go back + * by selecting the location from the list. + * + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2008, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERTELEPORTHISTORY_H +#define LL_LLFLOATERTELEPORTHISTORY_H + +#include "linden_common.h" + +#include "lldefs.h" +#include "llfloater.h" +#include "llscrolllistctrl.h" + +class LLFloaterTeleportHistory : public LLFloater +{ + public: + LLFloaterTeleportHistory(); + virtual ~LLFloaterTeleportHistory(); + + /// @brief: reimplemented to check for selection changes in the places list scrolllist + virtual void onFocusReceived(); + + /// @brief: reimplemented to make the menu toggle work + virtual void onClose(bool app_quitting); + + /// @brief: reimplemented to prevent this floater from closing while the viewer is shutting down + virtual BOOL canClose(); + + BOOL postBuild(); + + /// @brief: adds a teleport destination to the list of visited places + void addEntry(std::string regionName, S16 x, S16 y, S16 z,bool outList); + + protected: + static void onInPlacesSelected(LLUICtrl* ctrl, void* data); + static void onOutPlacesSelected(LLUICtrl* ctrl, void* data); + static void onTeleport(void* data); + static void onShowOnMap(void* data); + static void onCopySLURL(void* data); + + /// @brief: enables or disables the "Teleport", "Show On Map" and "Copy To SLURL" buttons **/ + void setButtonsEnabled(BOOL on); + + void loadEntrys(); + void saveEntry(LLSD toSave); + std::string getFileName(); + + LLScrollListCtrl* mPlacesInList; + LLScrollListCtrl* mPlacesOutList; + LLScrollListItem* pItem; + S32 id; + + /// @brief: to see if this was the first time setVisible() was called (at program startup) + BOOL firstRun; + LLSD tpList; +}; + +// globals +extern LLFloaterTeleportHistory* gFloaterTeleportHistory; + +#endif diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index b76c5be..6622740 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -191,6 +191,8 @@ #include "jcfloater_animation_list.h" #include "jcfloaterareasearch.h" +#include "llfloaterteleporthistory.h" + #if LL_LIBXUL_ENABLED #include "llmozlib.h" #endif // LL_LIBXUL_ENABLED @@ -2730,6 +2732,14 @@ bool idle_startup() LLFirstUse::ClientTags(); + // Add login location to teleport history 'teleported-into' + LLVector3 agent_pos=gAgent.getPositionAgent(); + LLViewerRegion* regionp = gAgent.getRegion(); + if (gFloaterTeleportHistory) + { + gFloaterTeleportHistory->addEntry(regionp->getName(),(S16)agent_pos.mV[0],(S16)agent_pos.mV[1],(S16)agent_pos.mV[2],false); + } + // Let the map know about the inventory. if(gFloaterWorldMap) { diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 13d7209..e37f33e 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -229,6 +229,8 @@ #include "hippoGridManager.h" #include "hippoLimits.h" +#include "llfloaterteleporthistory.h" + using namespace LLVOAvatarDefines; void init_client_menu(LLMenuGL* menu); void init_server_menu(LLMenuGL* menu); @@ -5912,6 +5914,11 @@ class LLShowFloater : public view_listener_t { LLFloaterChat::toggleInstance(LLSD()); } + else if (floater_name == "teleport history") + { + gFloaterTeleportHistory->setVisible(!gFloaterTeleportHistory->getVisible()); + gFloaterTeleportHistory->setFocus(TRUE); + } else if (floater_name == "im") { LLFloaterChatterBox::toggleInstance(LLSD()); diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 4cf9c87..56aed12 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -88,6 +88,7 @@ #include "llfloatermute.h" #include "llfloaterpostcard.h" #include "llfloaterpreference.h" +#include "llfloaterteleporthistory.h" #include "llfollowcam.h" #include "llgroupnotify.h" #include "llhudeffect.h" @@ -3561,6 +3562,16 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) avatarp->clearChat(); avatarp->slamPosition(); } + + // add teleport destination to the list of visited places + gFloaterTeleportHistory->addEntry(regionp->getName(),(S16)agent_pos.mV[0],(S16)agent_pos.mV[1],(S16)agent_pos.mV[2],false); + std::string lastRegion = gAgent.getLastRegion(); + if(lastRegion != regionp->getName()) + { + LLVector3 lastCoords = gAgent.getLastCoords(); + gFloaterTeleportHistory->addEntry(lastRegion,(S16)lastCoords.mV[0],(S16)lastCoords.mV[1],(S16)lastCoords.mV[2],true); + } + } else { diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index c89e0c5..eb8977c 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -103,6 +103,7 @@ #include "llfloaternamedesc.h" #include "llfloaterpreference.h" #include "llfloatersnapshot.h" +#include "llfloaterteleporthistory.h" #include "llfloatertools.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" @@ -1688,6 +1689,13 @@ void LLViewerWindow::initWorldUI() gFloaterWorldMap->setVisible(FALSE); } + if (!gFloaterTeleportHistory) + { + // open teleport history floater and hide it initially + gFloaterTeleportHistory = new LLFloaterTeleportHistory(); + gFloaterTeleportHistory->setVisible(FALSE); + } + // // Tools for building // diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml new file mode 100644 index 0000000..db36df5 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + +