diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llui/lluictrlfactory.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llagent.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/llagent.h | 9 | ||||
| -rw-r--r-- | indra/newview/llfloaternamedesc.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llfloaterreporter.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llgesturemgr.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llpanellogin.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llpreviewgesture.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llurldispatcher.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llurldispatcher.h | 2 | ||||
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llviewermenufile.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llviewermessage.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llviewerstats.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/llviewerstats.h | 2 | 
16 files changed, 85 insertions, 60 deletions
| diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 4b4c4636d5..88e4e89a2b 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -282,8 +282,11 @@ bool LLUICtrlFactory::getLayeredXMLNode(const LLString &filename, LLXMLNodePtr&  	if (!LLXMLNode::parseFile(mXUIPaths.front() + filename, root, NULL))  	{	 -		llwarns << "Problem reading UI description file: " << mXUIPaths.front() + filename << llendl; -		return FALSE; +		if (!LLXMLNode::parseFile(filename, root, NULL)) +		{ +			llwarns << "Problem reading UI description file: " << mXUIPaths.front() + filename << llendl; +			return FALSE; +		}  	}  	LLXMLNodePtr updateRoot; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 39d4a3fc15..5aaf9d0097 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -102,6 +102,7 @@  #include "lltoolpie.h"  #include "lltoolview.h"  #include "llui.h"			// for make_ui_sound +#include "llurldispatcher.h"  #include "llviewercamera.h"  #include "llviewerinventory.h"  #include "llviewermenu.h" @@ -904,6 +905,24 @@ const LLHost& LLAgent::getRegionHost() const  	}  } +//----------------------------------------------------------------------------- +// getSLURL() +// returns empty() if getRegion() == NULL +//----------------------------------------------------------------------------- +std::string LLAgent::getSLURL() const +{ +	std::string slurl; +	LLViewerRegion *regionp = getRegion(); +	if (regionp) +	{ +		LLVector3d agentPos = getPositionGlobal(); +		S32 x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) ); +		S32 y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) ); +		S32 z = llround( (F32)agentPos.mdV[VZ] ); +		slurl = LLURLDispatcher::buildSLURL(regionp->getName(), x, y, z); +	} +	return slurl; +}  //-----------------------------------------------------------------------------  // inPrelude() @@ -1021,7 +1040,7 @@ void LLAgent::slamLookAt(const LLVector3 &look_at)  //-----------------------------------------------------------------------------  // getPositionGlobal()  //----------------------------------------------------------------------------- -const LLVector3d &LLAgent::getPositionGlobal()  +const LLVector3d &LLAgent::getPositionGlobal() const  {  	if (!mAvatarObject.isNull() && !mAvatarObject->mDrawable.isNull())  	{ @@ -5783,6 +5802,11 @@ void LLAgent::setTeleportState(ETeleportState state)  	{  		LLFloaterSnapshot::hide(0);  	} +	if (mTeleportState == TELEPORT_MOVING) +	{ +		// We're outa here. Save "back" slurl. +		mTeleportSourceSLURL = getSLURL(); +	}  }  void LLAgent::fidget() diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index c6de97fede..4e9b882250 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -169,7 +169,8 @@ public:  	void			setRegion(LLViewerRegion *regionp);  	LLViewerRegion	*getRegion() const;  	const LLHost&	getRegionHost() const; - +	std::string		getSLURL() const; +	  	void			updateAgentPosition(const F32 dt, const F32 yaw, const S32 mouse_x, const S32 mouse_y);		// call once per frame to update position, angles radians  	void			updateLookAt(const S32 mouse_x, const S32 mouse_y); @@ -306,7 +307,7 @@ public:  	LLVector3			getVelocity()	const;  	F32					getVelocityZ()	const	{ return getVelocity().mV[VZ]; }	// a hack -	const LLVector3d	&getPositionGlobal(); +	const LLVector3d	&getPositionGlobal() const;  	const LLVector3		&getPositionAgent();  	S32					getRegionsVisited() const;  	F64					getDistanceTraveled() const; @@ -463,6 +464,8 @@ public:  	void 			setTargetVelocity(const LLVector3 &vel);  	const LLVector3	&getTargetVelocity() const; +	const std::string getTeleportSourceSLURL() const { return mTeleportSourceSLURL; } +  	// Setting the ability for this avatar to proxy for another avatar.  	//static void processAddModifyAbility(LLMessageSystem* msg, void**); @@ -717,6 +720,8 @@ private:  	LLVector3d		mAgentOriginGlobal;				// Origin of agent coords from global coords  	mutable LLVector3d mPositionGlobal; +	std::string		mTeleportSourceSLURL;			// SLURL where last TP began. +  	std::set<U64>	mRegionsVisited;				// stat - what distinct regions has the avatar been to?  	F64				mDistanceTraveled;				// stat - how far has the avatar moved?  	LLVector3d		mLastPositionGlobal;			// Used to calculate travel distance diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 392696dc9c..d4c9478fdf 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -140,13 +140,6 @@ BOOL LLFloaterNameDesc::postBuild()  	y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f); -	if (mIsAudio) -	{ -		LLSD bitrate = gSavedSettings.getS32("AudioDefaultBitrate"); -		 -		childSetValue("bitrate", bitrate); -	} -  	// Cancel button  	childSetAction("cancel_btn", onBtnCancel, this); @@ -206,16 +199,10 @@ void LLFloaterNameDesc::onBtnOK( void* userdata )  	fp->childDisable("ok_btn"); // don't allow inadvertent extra uploads -	S32 bitrate = 0; - -	if (fp->mIsAudio) -	{ -		bitrate = fp->childGetValue("bitrate").asInteger(); -	}  	upload_new_resource(fp->mFilenameAndPath, // file  		fp->childGetValue("name_form").asString(),   		fp->childGetValue("description_form").asString(),  -		bitrate, LLAssetType::AT_NONE, LLInventoryType::IT_NONE); +		0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE);  	fp->close(false);  } diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index bd5438e10f..9170e70ccd 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -131,12 +131,7 @@ LLFloaterReporter::LLFloaterReporter(  		gUICtrlFactory->buildFloater(this, "floater_report_abuse.xml");  	} -	LLViewerRegion *regionp = gAgent.getRegion(); -	if (regionp) -	{ -		childSetText("sim_field", regionp->getName() ); -		childSetText("abuse_location_edit", regionp->getName() ); -	} +	childSetText("abuse_location_edit", gAgent.getSLURL() );  	LLButton* pick_btn = LLUICtrlFactory::getButtonByName(this, "pick_btn");  	if (pick_btn) @@ -163,6 +158,7 @@ LLFloaterReporter::LLFloaterReporter(  	// convert the position to a string  	LLVector3d pos = gAgent.getPositionGlobal(); +	LLViewerRegion *regionp = gAgent.getRegion();  	if (regionp)  	{  		pos -= regionp->getOriginGlobal(); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 53b43effec..353020d9c4 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -76,6 +76,7 @@  #include "lltracker.h"  #include "llui.h"  #include "lluiconstants.h" +#include "llurldispatcher.h"  #include "llviewercamera.h"  #include "llviewermenu.h"  #include "llviewerregion.h" @@ -712,8 +713,7 @@ void LLFloaterWorldMap::updateLocation()  				childSetValue("spin z", LLSD(agent_z) );  				// Set the current SLURL -				mSLURL = LLWeb::escapeURL( llformat("http://slurl.com/secondlife/%s/%d/%d/%d",  -								agent_sim_name.c_str(), agent_x, agent_y, agent_z) ); +				mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z);  			}  		} @@ -750,8 +750,7 @@ void LLFloaterWorldMap::updateLocation()  		// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL  		if ( gotSimName )  		{ -			mSLURL = LLWeb::escapeURL(llformat("http://slurl.com/secondlife/%s/%d/%d/%d",  -										sim_name.c_str(), llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]))); +			mSLURL = LLURLDispatcher::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]));  		}  		else  		{	// Empty SLURL will disable the "Copy SLURL to clipboard" button diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 537cadf1d1..32c712d926 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -1006,14 +1006,20 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,  			gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );  		} +		// Get missing gesture's name. Use UUID if name can't be found. +		LLStringBase<char>::format_map_t args; +		LLInventoryItem *item = gInventory.getItem( item_id ); +		args["[NAME]"] = item ? item->getName() : LLString( item_id.asString() ); + +  		if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||  			LL_ERR_FILE_EMPTY == status)  		{ -			LLNotifyBox::showXml("GestureMissing"); +			LLNotifyBox::showXml("GestureMissing", args);  		}  		else  		{ -			LLNotifyBox::showXml("UnableToLoadGesture"); +			LLNotifyBox::showXml("UnableToLoadGesture", args);  		}  		llwarns << "Problem loading gesture: " << status << llendl; diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 8ebdb14e15..7f846c2791 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -71,7 +71,7 @@  #include "llweb.h"  #include "llwebbrowserctrl.h" -#include "llfloaterhtmlhelp.h" +#include "llfloaterhtml.h"  #include "llfloatertos.h"  #include "llglheaders.h" diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 051e328a6b..9fa364a339 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -955,6 +955,11 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,  		}  		else  		{ +			// Get missing gesture's name. Use UUID if name can't be found. +			LLStringBase<char>::format_map_t args; +			LLInventoryItem *item = gInventory.getItem( *item_idp ); +			args["[NAME]"] = item ? item->getName() : LLString( item_idp->asString() ); +  			if( gViewerStats )  			{  				gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); @@ -963,11 +968,11 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,  			if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||  				LL_ERR_FILE_EMPTY == status)  			{ -				LLNotifyBox::showXml("GestureMissing"); +				LLNotifyBox::showXml("GestureMissing", args);  			}  			else  			{ -				LLNotifyBox::showXml("UnableToLoadGesture"); +				LLNotifyBox::showXml("UnableToLoadGesture", args);  			}  			llwarns << "Problem loading gesture: " << status << llendl; diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 51b9505980..f8ebced8b9 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -37,12 +37,12 @@  #include "llcommandhandler.h"  #include "llfloaterurldisplay.h"  #include "llfloaterdirectory.h" -#include "llfloaterhtmlhelp.h" -//#include "llfloaterworldmap.h" +#include "llfloaterhtml.h"  #include "llpanellogin.h"  #include "llstartup.h"			// gStartupState  #include "llurlsimstring.h"  #include "llviewerwindow.h"		// alertXml() +#include "llweb.h"  #include "llworldmap.h"  // library includes @@ -340,3 +340,11 @@ bool LLURLDispatcher::dispatchRightClick(const std::string& url)  {  	return LLURLDispatcherImpl::dispatchRightClick(url);  } + +// static +std::string LLURLDispatcher::buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z) +{ +	std::string slurl = SLURL_SLURL_PREFIX + regionname + llformat("/%d/%d/%d",x,y,z);  +	slurl = LLWeb::escapeURL( slurl ); +	return slurl; +} diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h index 74b7f875b2..bcd19ee691 100644 --- a/indra/newview/llurldispatcher.h +++ b/indra/newview/llurldispatcher.h @@ -50,6 +50,8 @@ public:  		// Returns true if someone handled the URL.  	static bool dispatchRightClick(const std::string& url); +		//   builds: http://slurl.com/secondlife/RegionName/x/y/z/ +	static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z);  };  #endif diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a6fb7fa0b7..b5f53e5d88 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -105,7 +105,6 @@  #include "llfloatergroupinvite.h"  #include "llfloatergroups.h"  #include "llfloaterhtml.h" -#include "llfloaterhtmlhelp.h"  #include "llfloaterinspect.h"  #include "llfloaterlagmeter.h"  #include "llfloaterland.h" diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 13ff55ce1c..291e3da13d 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -596,15 +596,9 @@ void upload_new_resource(const LLString& src_filename, std::string name,  		asset_type = LLAssetType::AT_SOUND;  // tag it as audio  		S32 encode_result = 0; -		S32 bitrate = 128; +		llinfos << "Attempting to encode wav as an ogg file" << llendl; -		if (compression_info) -		{ -			bitrate = compression_info; -		} -		llinfos << "Attempting to encode wav as an ogg file at " << bitrate << "kbps" << llendl; - -		encode_result = encode_vorbis_file_at(src_filename.c_str(), filename.c_str(), bitrate*1000); +		encode_result = encode_vorbis_file(src_filename.c_str(), filename.c_str());  		if (LLVORBISENC_NOERR != encode_result)  		{ diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7f349fe65b..f109ea417b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2732,9 +2732,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)  	gViewerThrottle.sendToSim();  	gViewerWindow->sendShapeToSim(); -	bool is_teleport = false; +	bool is_teleport = gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING; -	if( gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING ) +	if( is_teleport )  	{  		// Force the camera back onto the agent, don't animate. JC  		gAgent.setFocusOnAvatar(TRUE, FALSE); @@ -2749,15 +2749,20 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)  		if (avatarp)  		{ +			// Chat the "back" SLURL. (DEV-4907) +			LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); +			chat.mSourceType = CHAT_SOURCE_SYSTEM; + 			LLFloaterChat::addChatHistory(chat); + +			// Set the new position  			avatarp->setPositionAgent(agent_pos);  			avatarp->clearChat();  			avatarp->slamPosition();  		} - -		is_teleport = true;  	}  	else  	{ +		// This is likely just the initial logging in phase.  		gAgent.setTeleportState( LLAgent::TELEPORT_NONE );  	} diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 81c10d161c..9d5b301d26 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -51,7 +51,7 @@  #include "lldebugview.h"  #include "llfasttimerview.h"  #include "llviewerregion.h" -#include "llfloaterhtmlhelp.h" +#include "llfloaterhtml.h"  #include "llworld.h"  #include "llfeaturemanager.h"  #if LL_WINDOWS && LL_LCD_COMPILE @@ -186,7 +186,7 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =  	// ST_CROSSING_MAX  	StatAttributes("CROSSING_MAX", FALSE, FALSE),  	// ST_LIBXUL_WIDGET_USED -	StatAttributes("LibXUL Widget used", FALSE, FALSE), +	StatAttributes("LibXUL Widget used", FALSE, FALSE), // Unused  	// ST_WINDOW_WIDTH  	StatAttributes("Window width", FALSE, FALSE),  	// ST_WINDOW_HEIGHT @@ -574,14 +574,6 @@ void update_statistics(U32 frame_count)  	gViewerStats->mTexturePacketsStat.addValue(LLViewerImageList::sTexturePackets); -	// log when the LibXUL (aka Mozilla) widget is used and opened so we can monitor framerate changes -	#if LL_LIBXUL_ENABLED -	{ -		BOOL result = gViewerHtmlHelp.getFloaterOpened(); -		gViewerStats->setStat(LLViewerStats::ST_LIBXUL_WIDGET_USED, (F64)result); -	} -	#endif -  	{  		static F32 visible_avatar_frames = 0.f;  		static F32 avg_visible_avatars = 0; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 735da59150..4c2a741244 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -154,7 +154,7 @@ public:  		ST_RENDER_SECS = 50,  		ST_CROSSING_AVG = 51,  		ST_CROSSING_MAX = 52, -		ST_LIBXUL_WIDGET_USED = 53, +		ST_LIBXUL_WIDGET_USED = 53, // Unused  		ST_WINDOW_WIDTH = 54,  		ST_WINDOW_HEIGHT = 55,  		ST_TEX_BAKES = 56, | 
