From 71d9084a95928a9858a29c7a309d8921dfeb2cd7 Mon Sep 17 00:00:00 2001 From: Drake Arconis Date: Sat, 1 Mar 2014 17:34:22 -0500 Subject: [PATCH 1/3] Clean out old OGPX stuff --- indra/llcommon/CMakeLists.txt | 2 - indra/llcommon/llindraconfigfile.cpp | 119 ------- indra/llcommon/llindraconfigfile.h | 61 ---- indra/llmessage/aihttptimeoutpolicy.cpp | 1 - indra/newview/CMakeLists.txt | 2 - indra/newview/app_settings/settings.xml | 16 - indra/newview/llfloaterabout.cpp | 3 +- indra/newview/llfloaterpermissionsmgr.cpp | 154 -------- indra/newview/llfloaterpermissionsmgr.h | 82 ----- indra/newview/llfloaterteleport.cpp | 332 ------------------ indra/newview/llfloaterteleport.h | 65 ---- indra/newview/llinventorymodel.cpp | 19 - indra/newview/llinventorymodel.h | 8 - indra/newview/llpanellogin.cpp | 3 +- indra/newview/llurlhistory.cpp | 33 -- indra/newview/llurlhistory.h | 3 - indra/newview/lluserauth.cpp | 1 - indra/newview/llviewerbuild.h | 37 -- .../default/xui/en-us/floater_teleport.xml | 55 --- .../skins/default/xui/es/floater_teleport.xml | 8 - 20 files changed, 2 insertions(+), 1002 deletions(-) delete mode 100644 indra/llcommon/llindraconfigfile.cpp delete mode 100644 indra/llcommon/llindraconfigfile.h delete mode 100644 indra/newview/llfloaterpermissionsmgr.cpp delete mode 100644 indra/newview/llfloaterpermissionsmgr.h delete mode 100644 indra/newview/llfloaterteleport.cpp delete mode 100644 indra/newview/llfloaterteleport.h delete mode 100644 indra/newview/llviewerbuild.h delete mode 100644 indra/newview/skins/default/xui/en-us/floater_teleport.xml delete mode 100644 indra/newview/skins/default/xui/es/floater_teleport.xml diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index be045f100..7c1f724d0 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -59,7 +59,6 @@ set(llcommon_SOURCE_FILES llformat.cpp llframetimer.cpp llheartbeat.cpp - llindraconfigfile.cpp llinitparam.cpp llinstancetracker.cpp llliveappconfig.cpp @@ -183,7 +182,6 @@ set(llcommon_HEADER_FILES llheartbeat.h llhttpstatuscodes.h llindexedqueue.h - llindraconfigfile.h llinitparam.h llinstancetracker.h llkeythrottle.h diff --git a/indra/llcommon/llindraconfigfile.cpp b/indra/llcommon/llindraconfigfile.cpp deleted file mode 100644 index f0873450f..000000000 --- a/indra/llcommon/llindraconfigfile.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @file llindraconfigfile.cpp - * - * - * This class is an LLLiveFile that has config info for indra - * Currently only whether it's blacklisted - * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2009, 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 "llindraconfigfile.h" - -#include "llfile.h" -#include "llsd.h" -#include "llsdserialize.h" -#include "llframetimer.h" - -static std::string sConfigDir = ""; -static const char indraConfigFileName[] = "indra.xml"; - - -LLIndraConfigFile::LLIndraConfigFile() - : LLLiveFile(filename()), - mConfig(LLSD()) -{ -} - -//static -void LLIndraConfigFile::initClass(const std::string& config_dir) -{ - sConfigDir = config_dir; - llinfos << "LLIndraConfigFile::initClass config dir " - << config_dir << "/" << indraConfigFileName << llendl; -} - -LLSD LLIndraConfigFile::getConfig(const std::string& config_name) -{ - if (sConfigDir.empty()) - { - llerrs << "LLIndraConfigFile::initClass() not called" << llendl; - } - - LLFrameTimer::updateFrameTime(); - - static LLIndraConfigFile the_file; - the_file.checkAndReload(); - - return the_file.mConfig[config_name]; -} - -std::string LLIndraConfigFile::filename() -{ - std::ostringstream ostr; - - ostr << sConfigDir - << "/" << indraConfigFileName; - - return ostr.str(); -} - -/* virtual */ -bool LLIndraConfigFile::loadFile() -{ - llinfos << "LLIndraConfigFile::loadFile: reading from " - << filename() << llendl; - - LLSD config; - - { - llifstream file(filename()); - if (file.is_open()) - { - LLSDSerialize::fromXML(config, file); - } - - if (config.isUndefined()) - { - llinfos << "LLIndraConfigFile::loadFile: file missing, ill-formed," - " or simply undefined; not changing the blacklist" << llendl; - return false; - } - } - - if (config.isMap()) - { - mConfig = config; - return true; - } - else - { - llwarns << "LLIndraConfigFile: " << indraConfigFileName << " expects a map; wrong format" << llendl; - return false; - } -} diff --git a/indra/llcommon/llindraconfigfile.h b/indra/llcommon/llindraconfigfile.h deleted file mode 100644 index 17eda906e..000000000 --- a/indra/llcommon/llindraconfigfile.h +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file llindraconfigfile.h - * @brief manages configuration file for indra.xml - * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2009, 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_LLINDRACONFIGFILE_H -#define LL_LLINDRACONFIGFILE_H - -#include "linden_common.h" -#include - -#include "lllivefile.h" -#include "llsd.h" - - -// To use, call LLIndraConfigFile::initClass(config_dir); -// Then whenever getConfig is called, it will check and reload automatically - -class LLIndraConfigFile : public LLLiveFile -{ -public: - LLIndraConfigFile(); - static void initClass(const std::string& config_dir); - static LLSD getConfig(const std::string& config_name); - -private: - static std::string filename(); - -protected: - /* virtual */ bool loadFile(); - LLSD mConfig; -}; - -#endif //LL_LLINDRACONFIGFILE_H diff --git a/indra/llmessage/aihttptimeoutpolicy.cpp b/indra/llmessage/aihttptimeoutpolicy.cpp index 019750efc..b9052f12f 100644 --- a/indra/llmessage/aihttptimeoutpolicy.cpp +++ b/indra/llmessage/aihttptimeoutpolicy.cpp @@ -965,7 +965,6 @@ P(newAgentInventoryVariablePriceResponder); P(objectCostResponder); P(objectLinksetsResponder); P(physicsFlagsResponder); -P(placeAvatarTeleportResponder); P(productInfoRequestResponder); P(regionResponder); P(remoteParcelRequestResponder); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index fbcc7c4d4..e6e49e4e1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -244,7 +244,6 @@ set(viewer_SOURCE_FILES llfloaterpathfindingcharacters.cpp llfloaterpathfindinglinksets.cpp llfloaterpathfindingobjects.cpp - llfloaterpermissionsmgr.cpp llfloaterperms.cpp llfloaterpostcard.cpp llfloaterpostprocess.cpp @@ -764,7 +763,6 @@ set(viewer_HEADER_FILES llfloaterpathfindingcharacters.h llfloaterpathfindinglinksets.h llfloaterpathfindingobjects.h - llfloaterpermissionsmgr.h llfloaterperms.h llfloaterpostcard.h llfloaterpostprocess.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5680b9b5a..ece509daa 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11101,22 +11101,6 @@ This should be as low as possible, but too low may break functionality Value 0 - PermissionsManagerRect - - Comment - Rectangle for permissions manager window - Persist - 1 - Type - Rect - Value - - 0 - 85 - 300 - 0 - - PickerContextOpacity Comment diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index d47f5fb43..5d205fd60 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -50,7 +50,6 @@ #include "llviewerstats.h" #include "llviewerregion.h" #include "sgversion.h" -#include "llviewerbuild.h" #include "lluictrlfactory.h" #include "lluri.h" #include "llweb.h" @@ -140,7 +139,7 @@ LLFloaterAbout::LLFloaterAbout() + " (64 bit)" #endif + llformat(" %d.%d.%d (%d) %s %s (%s)\n", - gVersionMajor, gVersionMinor, gVersionPatch, LL_VIEWER_BUILD, + gVersionMajor, gVersionMinor, gVersionPatch, gVersionBuild, __DATE__, __TIME__, gVersionChannel)); support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); diff --git a/indra/newview/llfloaterpermissionsmgr.cpp b/indra/newview/llfloaterpermissionsmgr.cpp deleted file mode 100644 index 750cd8bfd..000000000 --- a/indra/newview/llfloaterpermissionsmgr.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/** - * @file llfloaterpermissionsmgr.cpp - * @brief for user control of script permissions - * - * $LicenseInfo:firstyear=2003&license=viewergpl$ - * - * Copyright (c) 2003-2009, 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 "llfloaterpermissionsmgr.h" - -#include "llscrollcontainer.h" -#include "lltextbox.h" -#include "llbutton.h" -#include "llagent.h" -#include "llviewerobjectlist.h" -#include "llviewerregion.h" -#include "llstl.h" - -// constants -const S32 MIN_PERM_MGR_WIDTH = 100; -const S32 MIN_PERM_MGR_HEIGHT = 100; -const S32 VPAD = 8; -const S32 HPAD = 8; -const S32 LINE = 16; - -// statics -LLFloaterPermissionsMgr* LLFloaterPermissionsMgr::sInstance = NULL; - -LLFloaterPermissionsMgr* LLFloaterPermissionsMgr::show() -{ - if (!sInstance) - { - sInstance = new LLFloaterPermissionsMgr(); - - sInstance->open(); /* Flawfinder: ignore */ - gFloaterView->adjustToFitScreen(sInstance, TRUE); - } - else - { - sInstance->open(); /* Flawfinder: ignore */ - } - - return sInstance; -} - -void LLFloaterPermissionsMgr::processPermissionsList(LLMessageSystem* msg, void**) -{ -} - -LLFloaterPermissionsMgr::LLFloaterPermissionsMgr() : - LLFloater(std::string("floater_perm_mgr"), std::string("PermissionsManagerRect"), std::string("Permissions Manager"), - TRUE, MIN_PERM_MGR_WIDTH, MIN_PERM_MGR_HEIGHT) -{ - S32 y = getRect().getHeight() - VPAD - LINE; - LLRect scrollable_container_rect(0, y, getRect().getWidth(), 0); - LLRect permissions_rect(0, 0, getRect().getWidth() - HPAD - HPAD, 0); - mPermissions = new LLPermissionsView(permissions_rect); - mScroller = new LLScrollContainer( - std::string("permissions container"), - scrollable_container_rect, - mPermissions - ); - mScroller->setFollowsAll(); - mScroller->setReserveScrollCorner(TRUE); - addChild(mScroller); -} - -LLFloaterPermissionsMgr::~LLFloaterPermissionsMgr() -{ -} - - -// -// LLPermissionsView -// - -LLPermissionsView::LLPermissionsView(const LLRect &rect) : LLView(std::string("permissions_view"), rect, TRUE, FOLLOWS_NONE) -{ -} - -void LLPermissionsView::clearPermissionsData() -{ - deleteAllChildren(); -} - -void LLPermissionsView::addPermissionsData(const std::string& object_name, const LLUUID& object_id, U32 permissions_flags) -{ - // grow to make room for new element - reshape(getRect().getWidth(), getRect().getHeight() + LINE + VPAD + BTN_HEIGHT + VPAD); - S32 y = getRect().getHeight() - LINE - VPAD; - LLRect label_rect(HPAD, y + LINE, getRect().getWidth(), y); - LLTextBox* text = new LLTextBox(std::string("perm_label"), label_rect, object_name); - text->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM); - addChild(text); - - y -= LINE + VPAD; - - LLRect btn_rect(HPAD, y + BTN_HEIGHT, 120, y); - LLButton* button = new LLButton(std::string("Revoke permissions"), btn_rect, LLStringUtil::null, boost::bind(&LLPermissionsView::revokePermissions, object_id, permissions_flags)); - button->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM); - addChild(button); - - /*btn_rect.set(HPAD + 120 + HPAD, y + BTN_HEIGHT, HPAD + 120 + HPAD + 120, y); - button = new LLButton(std::string("Find in world"), btn_rect, LLStringUtil::null, boost::bind(&LLPermissionsView::findObject, object_id, permissions_flags)); - button->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM); - addChild(button);*/ -} - -void LLPermissionsView::revokePermissions(const LLUUID& object_id, U32 permission_flags) -{ - LLViewerObject* objectp = gObjectList.findObject(object_id); - if (objectp) - { - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_RevokePermissions); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_Data); - msg->addUUIDFast(_PREHASH_ObjectID, object_id); - msg->addU32Fast(_PREHASH_ObjectPermissions, permission_flags); - msg->sendReliable(objectp->getRegion()->getHost()); - } -} - -/*void LLPermissionsView::findObject(const LLUUID& object_id, U32 permission_flags) -{ -}*/ diff --git a/indra/newview/llfloaterpermissionsmgr.h b/indra/newview/llfloaterpermissionsmgr.h deleted file mode 100644 index ac933e3f1..000000000 --- a/indra/newview/llfloaterpermissionsmgr.h +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @file llfloaterpermissionsmgr.h - * @brief for user control of script permissions - * - * $LicenseInfo:firstyear=2003&license=viewergpl$ - * - * Copyright (c) 2003-2009, 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_LLFLOATERPERMISSIONSMGR_H -#define LL_LLFLOATERPERMISSIONSMGR_H - -#include "llfloater.h" -#include - -class LLScrollContainer; -class LLPermissionsView; - -class LLFloaterPermissionsMgr -: public LLFloater -{ -public: - static LLFloaterPermissionsMgr* show(); - - // Message system callbacks - static void processPermissionsList(LLMessageSystem* msg, void**); - - virtual void onClose(bool app_quitting) { setVisible(FALSE); } - -private: - // Must construct by calling show(). - LLFloaterPermissionsMgr(); - virtual ~LLFloaterPermissionsMgr(); - -public: - LLPermissionsView* mPermissions; - -protected: - LLScrollContainer* mScroller; - - static LLFloaterPermissionsMgr* sInstance; -}; - -class LLPermissionsView : public LLView -{ -public: - LLPermissionsView(const LLRect& rect); - virtual ~LLPermissionsView() {}; - -public: - void clearPermissionsData(); - void addPermissionsData(const std::string& object_name, const LLUUID& object_id, U32 permissions_flags); - - static void revokePermissions(const LLUUID& object_id, U32 permission_flags); - //static void findObject(const LLUUID& object_id, U32 permission_flags); -}; - - -#endif diff --git a/indra/newview/llfloaterteleport.cpp b/indra/newview/llfloaterteleport.cpp deleted file mode 100644 index dd546c5b0..000000000 --- a/indra/newview/llfloaterteleport.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/** - * @file llfloaterteleport.cpp - * @brief floater code for agentd teleports. - * - * $LicenseInfo:firstyear=2008&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$ - */ -//Teleport floater used for agent domain TP. URI text floater. -//Copyright International Business Machines Corporation 2008-9 -//Contributed to Linden Research, Inc. under the Second Life Viewer Contribution -//Agreement and licensed as above. -#include "llviewerprecompiledheaders.h" // must be first include - -#include "llfloaterteleport.h" - -#include "llagent.h" //for hack in teleport start -#include "llchat.h" -#include "llcombobox.h" -#include "llfloaterchat.h" -#include "llsdserialize.h" -#include "llsdutil.h" -#include "llsdutil_math.h" -#include "lluictrlfactory.h" // builds floaters from XML -#include "llurlhistory.h" -#include "lluserauth.h" // for saving placeavatarresponder result -#include "llviewercontrol.h" // for gSavedSettings -#include "llviewerdisplay.h" // for gTeleportDisplay -#include "llviewermessage.h" // for send_agent_movement_complete attempt -#include "llviewerregion.h" -#include "llviewerwindow.h" // for hack in teleport start -#include "llvoavatar.h" -#include "llworld.h" -#include "pipeline.h" // for gPipeline - -class AIHTTPTimeoutPolicy; -extern AIHTTPTimeoutPolicy placeAvatarTeleportResponder_timeout; - -// OGPX HTTP responder for PlaceAvatar cap used for Teleport -// very similar to the responder in Login, but not as many fields are returned in the TP version -// OGPX TODO: should this be combined with the Login responder for rez_avatar/place? -// OGPX TODO: mResult should not get replaced in result(), instead -// should replace individual LLSD fields in mResult. -class LLPlaceAvatarTeleportResponder : public LLHTTPClient::ResponderWithResult -{ -public: - LLPlaceAvatarTeleportResponder() - { - } - - ~LLPlaceAvatarTeleportResponder() - { - } - - /*virtual*/ void error(U32 statusNum, const std::string& reason) - { - LL_INFOS("OGPX") << "LLPlaceAvatarTeleportResponder error in TP " - << statusNum << " " << reason << LL_ENDL; - - LLSD args; - args["REASON"] = reason; - - - LLNotificationsUtil::add("CouldNotTeleportReason", args); - - gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); - - } - - /*virtual*/ void result(const LLSD& content) - { - - LLSD result; - result["agent_id"] = content["agent_id"]; // need this for send_complete_agent_movement - result["region_x"] = content["region_x"]; // need these for making the first region - result["region_y"] = content["region_y"]; - result["login"] = "true"; // this gets checked in idle_startup() - result["session_id"] = content["session_id"]; - result["secure_session_id"] = content["secure_session_id"]; - result["circuit_code"] = content["circuit_code"]; - result["sim_port"] = content["sim_port"]; - result["sim_host"] = content["sim_host"]; - result["look_at"] = content["look_at"]; - // maintaining result seed_capability name for compatibility with legacy login - result["seed_capability"] = content["region_seed_capability"]; - result["position"] = content["position"]; // save this for agentmovementcomplete type processing - - // Even though we have the pretty print of the complete content returned, we still find it handy - // when scanning SecondLife.log to have these laid out in this way. So they are still here. - LL_DEBUGS("OGPX") << " Teleport placeAvatar responder " << LL_ENDL; - LL_DEBUGS("OGPX") << "agent_id: " << content["agent_id"] << LL_ENDL; - LL_DEBUGS("OGPX") << "region_x: " << content["region_x"] << LL_ENDL; - LL_DEBUGS("OGPX") << "session_id: " << content["session_id"] << LL_ENDL; - LL_DEBUGS("OGPX") << "sim_port: " << content["sim_port"] << LL_ENDL; - LL_DEBUGS("OGPX") << "sim_host: " << content["sim_host"] << LL_ENDL; - LL_DEBUGS("OGPX") << "look_at: " << content["look_at"] << LL_ENDL; - LL_DEBUGS("OGPX") << "position: " << content["position"] << LL_ENDL; - LL_DEBUGS("OGPX") << "seed_capability: " << content["region_seed_capability"] << LL_ENDL; - - LL_INFOS("OGPX") << " All the LLSD PlaceAvatarTeleportResponder content: \n " << ll_pretty_print_sd(content) << LL_ENDL; // OGPX - - - // check "connect" to make sure place_avatar fully successful - if (!content["connect"].asBoolean()) - { - // place_avatar failed somewhere - LL_INFOS("OGPX") << "TP failed, connect false in TP PlaceAvatarResponder " << LL_ENDL; - - LLSD args; - args["REASON"] = "Place Avatar Failed"; - - //gViewerWindow->alertXml("CouldNotTeleportReason", args); - LLNotificationsUtil::add("CouldNotTeleportReason",args); - - gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); - - return; - } - - - U64 region_handle; - region_handle = to_region_handle_global(content["region_x"].asInteger(), content["region_y"].asInteger()); - - LLHost sim_host; - U32 sim_port = strtoul(result["sim_port"].asString().c_str(), NULL, 10); - sim_host.setHostByName(result["sim_host"].asString().c_str()); - sim_host.setPort(sim_port); - - if (sim_host.isOk()) - { - LLMessageSystem* msg = gMessageSystem; - gMessageSystem->enableCircuit(sim_host, TRUE); - msg->newMessageFast(_PREHASH_UseCircuitCode); - msg->nextBlockFast(_PREHASH_CircuitCode); - msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); - msg->sendReliable(sim_host); - } - else - { - LL_INFOS("OGPX") << "TP failed, could not resolve hostname for UDP messages." << LL_ENDL; - LLSD args; - args["REASON"] = "Failed to resolve host."; - //gViewerWindow->alertXml("CouldNotTeleportReason", args); - LLNotificationsUtil::add("CouldNotTeleportReason", args); - gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); - return; - } - - - - - // Viewer trusts the simulator. - LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host); - regionp->setSeedCapability(content["seed_capability"].asString().c_str()); - // process_agent_movement_complete needs the region to still be the old region gAgent.setRegion(regionp); - - // placing these in result so they can be set properly in LLUserAuth result - // ...they are only passed in on login, and not on TP - result["session_id"] = gAgent.getSessionID(); - result["agent_id"] = gAgent.getID(); - result["circuit_code"].asString() = gMessageSystem->mOurCircuitCode; // this is what startup sets, is this proper to do? - - // grab the skeleton and root. - result["inventory-skeleton"] = LLUserAuth::getInstance()->mResult["inventory-skeleton"]; - result["inventory-root"] = LLUserAuth::getInstance()->mResult["inventory-root"]; - - LL_DEBUGS("OGPX") << "session_id: " << result["session_id"] << LL_ENDL; - - - - // results need to be stored so process_agent_movement_complete() can pull them - LLUserAuth::getInstance()->mAuthResponse = LLUserAuth::E_OK; - - // OGPX TODO: This just reeks of causing problems, because we are using - // ... mResult to store things that we get from other caps....So slamming a - // ... completely new result in on teleport is going to cause issues. - // ... It makes changing the things we save in mResult error prone. - // ... Question is, how should we really be storing the seemingly random things - // ... that we get back from (now) various different caps that used to all come back - // ... in the result of XMLRPC authenticate? - LLUserAuth::getInstance()->mResult = result; - - - - // ... new sim not sending me much without sending it CompleteAgentMovement msg. - //gAgent.setTeleportState( LLAgent::TELEPORT_MOVING ); // process_agent_mv_complete looks for TELEPORT_MOVING - LLVector3 position = ll_vector3_from_sd(result["position"]); - gAgent.setHomePosRegion(region_handle, position); // taken from teleport_finish (not sure regular code path gets this) - - send_complete_agent_movement(sim_host); - - // Turn off progress msg (also need to do this in all the possible failure places) - // I think we leave this, as the scene is still changing during the - // processing of agentmovementcomeplete message. TELEPORT_NONE resets it anyway - // gViewerWindow->setShowProgress(FALSE); - - } - - /*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return placeAvatarTeleportResponder_timeout; } - /*virtual*/ char const* getName(void) const { return "LLPlaceAvatarTeleportResponder"; } -}; - -// Statics -LLFloaterTeleport* LLFloaterTeleport::sInstance = NULL; - -LLFloaterTeleport::LLFloaterTeleport() -: LLFloater("floater_teleport") -{ - if(!sInstance) - { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_teleport.xml"); - - LLComboBox* regioncombo = getChild("teleport_edit"); - regioncombo->setAllowTextEntry(TRUE, 256, FALSE); // URL bar needs to allow user text input - - // iterate on uri list adding to combobox (couldn't figure out how to add them all in one call) - LLSD regionuri_history = LLURLHistory::getURLHistory("regionuri"); - LLSD::array_iterator iter_history = regionuri_history.beginArray(); - LLSD::array_iterator iter_end = regionuri_history.endArray(); - for(; iter_history != iter_end; ++iter_history) - { - regioncombo->addSimpleElement((*iter_history).asString()); - } - - // select which is displayed if we have a current URL. - regioncombo->setSelectedByValue(LLSD(gSavedSettings.getString("CmdLineRegionURI")),TRUE); - - // TODO : decide if 'enter' when selecting something from the combox box should *not* be sent - // to the floater (p.s. and figure out how to change it) - - childSetAction("teleport_btn", onClickTeleport, this); - childSetAction("cancel_btn", onClickCancel, this); - - setDefaultBtn("teleport_btn"); - } - else - { - sInstance->show(NULL); - } -} - -// static -void LLFloaterTeleport::show(void*) -{ - if (!sInstance) - { - sInstance = new LLFloaterTeleport(); - } - - sInstance->open(); -} - -LLFloaterTeleport::~LLFloaterTeleport() -{ - sInstance=NULL; -} - - - -// static -void LLFloaterTeleport::onClickTeleport(void* userdata) -{ - std::string placeAvatarCap = LLAppViewer::instance()->getPlaceAvatarCap(); - LLSD args; - - LLFloaterTeleport* self = (LLFloaterTeleport*)userdata; - std::string text = self->childGetText("teleport_edit"); - if (text.find("://",0) == std::string::npos) - { - // if there is no uri, prepend it with http:// - text = "http://"+text; - LL_DEBUGS("OGPX") << "Teleport URI was prepended, now " << text << LL_ENDL; - } - - LL_DEBUGS("OGPX") << "onClickTeleport! from using place_avatar cap "<< placeAvatarCap << " contains "<< text << LL_ENDL; - LLStringUtil::trim(text); // trim extra spacing - gAgent.setTeleportSourceURL(gSavedSettings.getString("CmdLineRegionURI")); // grab src region name - gSavedSettings.setString("CmdLineRegionURI",text); // save the dst region - args["public_region_seed_capability"] = text; - args["position"] = ll_sd_from_vector3(LLVector3(128, 128, 50)); // default to middle of region above base terrain - LL_INFOS("OGPX") << " args to placeavatar cap " << placeAvatarCap << " on teleport: " << LLSDOStreamer(args) << LL_ENDL; - LLHTTPClient::post(placeAvatarCap, args, new LLPlaceAvatarTeleportResponder()); - gAgent.setTeleportMessage( - LLAgent::sTeleportProgressMessages["requesting"]); - gViewerWindow->setShowProgress(TRUE); - gAgent.teleportCore(); - gAgent.setTeleportState( LLAgent::TELEPORT_PLACE_AVATAR ); // teleportcore() sets tp state to legacy path, so reset. ick! - gTeleportDisplayTimer.reset(); - - - - self->setVisible(FALSE); - if ( LLURLHistory::appendToURLCollection("regionuri",text)) - { - // since URL history only populated on create of sInstance, add to combo list directly - LLComboBox* regioncombo = self->getChild("teleport_edit"); - // BUG : this should add the new item to the combo box, but doesn't - regioncombo->addSimpleElement(text); - } - -} - -void LLFloaterTeleport::onClickCancel(void *userdata) -{ - LLFloaterTeleport* self = (LLFloaterTeleport*)userdata; - LL_INFOS("OGPX") << "Teleport Cancel " << self->getName() << LL_ENDL; - self->setVisible(FALSE); -} diff --git a/indra/newview/llfloaterteleport.h b/indra/newview/llfloaterteleport.h deleted file mode 100644 index 58e907a68..000000000 --- a/indra/newview/llfloaterteleport.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @file llfloaterteleport.h - * @brief floater header for agentd teleports. - * - * $LicenseInfo:firstyear=2008&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$ - */ -// Teleport floater for agent domain TPs using URIs. -//Copyright International Business Machines Corporation 2008-9 -//Contributed to Linden Research, Inc. under the Second Life Viewer Contribution -//Agreement and licensed as above. -#ifndef LL_FLOATER_TELEPORT_H -#define LL_FLOATER_TELEPORT_H -#include "llfloater.h" - -class LLFloaterTeleport : public LLFloater -{ -public: - LLFloaterTeleport(); - - virtual ~LLFloaterTeleport(); - - // by convention, this shows the floater and does instance management - static void show(void*); - -private: - // when a line editor loses keyboard focus, it is committed. - // commit callbacks are named onCommitWidgetName by convention. - static void onCommitTeleport(LLUICtrl* ctrl, void *userdata); - - // by convention, button callbacks are named onClickButtonLabel - static void onClickTeleport(void* userdata); - static void onClickCancel(void *userdata); - - // no pointers to widgets here - they are referenced by name - - // assuming we just need one, which is typical - static LLFloaterTeleport* sInstance; - -}; -#endif - diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 4d4e7ce8f..4b2466f89 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2112,25 +2112,6 @@ bool LLInventoryModel::loadSkeleton( return rv; } -//OGPX crap. Since this function is actually functionally the same as its LLSD variant.. -// just convert options_t to LLSD and route to the LLSD version. Yuck. -bool LLInventoryModel::loadSkeleton( - const LLInventoryModel::options_t& options, - const LLUUID& owner_id) -{ - LLSD options_list; - for(options_t::const_iterator it = options.begin(); it < options.end(); ++it) - { - LLSD entry; - for(response_t::const_iterator it2 = it->begin(); it2 != it->end(); ++it2) - { - entry[it2->first]=it2->second; - } - options_list.append(entry); - } - return loadSkeleton(options_list,owner_id); -} - // This is a brute force method to rebuild the entire parent-child // relations. The overall operation has O(NlogN) performance, which // should be sufficient for our needs. diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 09a85ba5d..259b08f87 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -409,14 +409,6 @@ public: void addCategory(LLViewerInventoryCategory* category); void addItem(LLViewerInventoryItem* item); - // methods to load up inventory skeleton & meat. These are used - // during authentication. return true if everything parsed. - typedef std::map response_t; - typedef std::vector options_t; - - - //OGPX really screwed with the login process. This is needed until it's all sorted out. - bool loadSkeleton(const options_t& options, const LLUUID& owner_id); /** Mutators ** ** *******************************************************************************/ diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 6f0cdf10c..10b563484 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -62,7 +62,6 @@ #include "llui.h" #include "lluiconstants.h" #include "llurlhistory.h" // OGPX : regionuri text box has a history of region uris (if FN/LN are loaded at startup) -#include "llviewerbuild.h" #include "llviewertexturelist.h" #include "llviewermenu.h" // for handle_preferences() #include "llviewernetwork.h" @@ -254,7 +253,7 @@ LLPanelLogin::LLPanelLogin(const LLRect& rect) gVersionMajor, gVersionMinor, gVersionPatch, - LL_VIEWER_BUILD ); + gVersionBuild ); LLTextBox* channel_text = getChild("channel_text"); channel_text->setTextArg("[CHANNEL]", channel); // though not displayed channel_text->setTextArg("[VERSION]", version); diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp index 876ce02d4..57fc7e3f8 100644 --- a/indra/newview/llurlhistory.cpp +++ b/indra/newview/llurlhistory.cpp @@ -106,39 +106,6 @@ LLSD LLURLHistory::getURLHistory(const std::string& collection) return LLSD(); } -// OGPX : static function that appends unique values to existing collection. -// returns true if appended, else false. -BOOL LLURLHistory::appendToURLCollection(const std::string& collection, const std::string& url) -{ - if (!url.empty()) - { - BOOL found_current_url = FALSE; - // make room for the new url if needed - // always append to the end and remove from the front so you have the most recent. - if (sHistorySD[collection].size() >= MAX_URL_COUNT) - { - sHistorySD[collection].erase(0); - } - - LLSD::array_iterator iter_history = sHistorySD[collection].beginArray(); - LLSD::array_iterator iter_end = sHistorySD[collection].endArray(); - for (; iter_history != iter_end; ++iter_history) - { - if ((*iter_history).asString() == url) - { - found_current_url = TRUE; - } - } - if (!found_current_url ) - { - sHistorySD[collection].append(LLSD(url)); - LLURLHistory::limitSize(collection); - //llinfos << " appending XX" << url << "XX urlcollection: " << LLSDOStreamer(sHistorySD) << llendl; - return TRUE; // value was unique, needed to be inserted - } - } - return FALSE; // value was empty or already in the collection -} // static void LLURLHistory::addURL(const std::string& collection, const std::string& url) { diff --git a/indra/newview/llurlhistory.h b/indra/newview/llurlhistory.h index 1c7e6637c..2b9d41429 100644 --- a/indra/newview/llurlhistory.h +++ b/indra/newview/llurlhistory.h @@ -49,9 +49,6 @@ public: static LLSD getURLHistory(const std::string& collection); static void addURL(const std::string& collection, const std::string& url); - // OGPX appends url to a collection if it doesn't already exist in the collection. - // this is used in the collection of region URIs that are saved per region - static BOOL appendToURLCollection(const std::string& collection, const std::string& url); static void removeURL(const std::string& collection, const std::string& url); static void clear(const std::string& collection); diff --git a/indra/newview/lluserauth.cpp b/indra/newview/lluserauth.cpp index c2f00bb68..21e9835ea 100644 --- a/indra/newview/lluserauth.cpp +++ b/indra/newview/lluserauth.cpp @@ -40,7 +40,6 @@ #include "lldir.h" #include "sgversion.h" #include "llappviewer.h" -#include "llviewerbuild.h" #include "llviewercontrol.h" #include "llxmlrpcresponder.h" #include "llsdutil.h" diff --git a/indra/newview/llviewerbuild.h b/indra/newview/llviewerbuild.h deleted file mode 100644 index b02bdece5..000000000 --- a/indra/newview/llviewerbuild.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file llviewerbuild.h - * @brief Sets viewer build number - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, 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 "sgversion.h" - -// Set the build number in indra/llcommon/llversionviewer.h! - -const S32 LL_VIEWER_BUILD = gVersionBuild; diff --git a/indra/newview/skins/default/xui/en-us/floater_teleport.xml b/indra/newview/skins/default/xui/en-us/floater_teleport.xml deleted file mode 100644 index 9460de5f6..000000000 --- a/indra/newview/skins/default/xui/en-us/floater_teleport.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - Public Region Seed: - - -