diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llrender/llgl.cpp | 37 | ||||
| -rw-r--r-- | indra/llrender/llglstates.h | 2 | ||||
| -rw-r--r-- | indra/llrender/llrender.cpp | 2 | ||||
| -rw-r--r-- | indra/llui/llmenugl.cpp | 2 | ||||
| -rw-r--r-- | indra/llui/llurlentry.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llinspectavatar.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llpanelavatar.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 17 | ||||
| -rw-r--r-- | indra/newview/llspatialpartition.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 75 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.h | 6 | ||||
| -rw-r--r-- | indra/newview/llviewerparcelmedia.cpp | 40 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_whitelist_entry.xml | 3 | 
14 files changed, 155 insertions, 53 deletions
| diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 3400a72385..187a9a984e 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1919,6 +1919,16 @@ LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, G  : mPrevDepthEnabled(sDepthEnabled), mPrevDepthFunc(sDepthFunc), mPrevWriteEnabled(sWriteEnabled)  {  	stop_glerror(); +	 +	checkState(); + +	if (!depth_enabled) +	{ // always disable depth writes if depth testing is disabled +	  // GL spec defines this as a requirement, but some implementations allow depth writes with testing disabled +	  // The proper way to write to depth buffer with testing disabled is to enable testing and use a depth_func of GL_ALWAYS +		write_enabled = FALSE; +	} +  	if (depth_enabled != sDepthEnabled)  	{  		gGL.flush(); @@ -1942,6 +1952,7 @@ LLGLDepthTest::LLGLDepthTest(GLboolean depth_enabled, GLboolean write_enabled, G  LLGLDepthTest::~LLGLDepthTest()  { +	checkState();  	if (sDepthEnabled != mPrevDepthEnabled )  	{  		gGL.flush(); @@ -1963,6 +1974,32 @@ LLGLDepthTest::~LLGLDepthTest()  	}  } +void LLGLDepthTest::checkState() +{ +	if (gDebugGL) +	{ +		GLint func = 0; +		GLboolean mask = FALSE; + +		glGetIntegerv(GL_DEPTH_FUNC, &func); +		glGetBooleanv(GL_DEPTH_WRITEMASK, &mask); + +		if (glIsEnabled(GL_DEPTH_TEST) != sDepthEnabled || +			sWriteEnabled != mask || +			sDepthFunc != func) +		{ +			if (gDebugSession) +			{ +				gFailLog << "Unexpected depth testing state." << std::endl; +			} +			else +			{ +				LL_GL_ERRS << "Unexpected depth testing state." << LL_ENDL; +			} +		} +	} +} +  LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P)  {  	for (U32 i = 0; i < 4; i++) diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h index 4a51cac438..968a37cab0 100644 --- a/indra/llrender/llglstates.h +++ b/indra/llrender/llglstates.h @@ -46,6 +46,8 @@ public:  	~LLGLDepthTest(); +	void checkState(); +  	GLboolean mPrevDepthEnabled;  	GLenum mPrevDepthFunc;  	GLboolean mPrevWriteEnabled; diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index fc45df8153..f97d81126e 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -162,6 +162,8 @@ void LLTexUnit::enable(eTextureType type)  			disable(); // Force a disable of a previous texture type if it's enabled.  		}  		mCurrTexType = type; + +		gGL.flush();  		glEnable(sGLTextureType[type]);  	}  } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 527c0a1b87..bd67949c2a 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -46,6 +46,7 @@  #include "llmenugl.h" +#include "llgl.h"  #include "llmath.h"  #include "llrender.h"  #include "llfocusmgr.h" @@ -477,6 +478,7 @@ void LLMenuItemGL::draw( void )  		if (dynamic_cast<LLMenuItemCallGL*>(this))  			debug_count++;  		gGL.color4fv( mHighlightBackground.get().mV ); +  		gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0 );  	} diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index f7528bc62a..1b6dd1b264 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -101,7 +101,7 @@ std::string LLUrlEntryBase::getLabelFromWikiLink(const std::string &url)  	{  		start++;  	} -	return url.substr(start, url.size()-start-1); +	return unescapeUrl(url.substr(start, url.size()-start-1));  }  std::string LLUrlEntryBase::getUrlFromWikiLink(const std::string &string) diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 72994a4371..a2b3a54f51 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -278,7 +278,7 @@ void LLInspectAvatar::onOpen(const LLSD& data)  	getChild<LLUICtrl>("gear_self_btn")->setVisible(self);  	getChild<LLUICtrl>("gear_btn")->setVisible(!self); -	 +  	// Position the inspector relative to the mouse cursor  	// Similar to how tooltips are positioned  	// See LLToolTipMgr::createToolTip @@ -518,13 +518,17 @@ void LLInspectAvatar::updateVolumeSlider()  	bool is_muted = LLMuteList::getInstance()->  						isMuted(mAvatarID, LLMute::flagVoiceChat);  	bool voice_enabled = gVoiceClient->getVoiceEnabled(mAvatarID); +	bool is_self = (mAvatarID == gAgent.getID());  	LLUICtrl* mute_btn = getChild<LLUICtrl>("mute_btn");  	mute_btn->setEnabled( voice_enabled );  	mute_btn->setValue( is_muted ); +	mute_btn->setVisible( voice_enabled && !is_self );  	LLUICtrl* volume_slider = getChild<LLUICtrl>("volume_slider");  	volume_slider->setEnabled( voice_enabled && !is_muted ); +	volume_slider->setVisible( voice_enabled && !is_self ); +  	const F32 DEFAULT_VOLUME = 0.5f;  	F32 volume;  	if (is_muted) diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index f3d6dbbb46..fb898f7cdf 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -594,8 +594,8 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g  		if (it != mGroups.begin())  			groups += ", "; -		 -		std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + it->first + "]"; +		std::string group_name = LLURI::escape(it->first); +		std::string group_url="[secondlife:///app/group/" + it->second.asString() + "/about " + group_name + "]";  		groups += group_url;  	} diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index a1c12412b5..550fee71bf 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -181,6 +181,10 @@ void LLPanelOutfitsInventory::onNew()  {  	const std::string& outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);  	LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); +	if (mAppearanceTabs) +	{ +		mAppearanceTabs->selectTabByName("outfitslist_tab"); +	}  }  void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) @@ -412,8 +416,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)  		return (getCorrectListenerForAction() != NULL) && hasItemsSelected();  	} -	if (command_name == "wear" || -		command_name == "make_outfit") +	if (command_name == "wear")  	{  		const BOOL is_my_outfits = (mActivePanel->getName() == "outfitslist_tab");  		if (!is_my_outfits) @@ -421,6 +424,10 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)  			return FALSE;  		}  	} +	if (command_name == "make_outfit") +	{ +		return TRUE; +	}  	if (command_name == "edit" ||   		command_name == "add" diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 0ae62843ac..77a370cc3f 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -62,6 +62,7 @@ public:  	{  		mPanel->inventoryFetched();  		gInventory.removeObserver(this); +		delete this;  	}  private:  	LLSidepanelAppearance *mPanel; @@ -94,14 +95,12 @@ LLSidepanelAppearance::LLSidepanelAppearance() :  	mLookInfo(NULL),  	mCurrOutfitPanel(NULL)  { -	//LLUICtrlFactory::getInstance()->buildPanel(this, "panel_appearance.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() -	mFetchWorn = new LLCurrentlyWornFetchObserver(this); -	 -	mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);  }  LLSidepanelAppearance::~LLSidepanelAppearance()  { +	gInventory.removeObserver(mOutfitRenameWatcher); +	delete mOutfitRenameWatcher;  }  // virtual @@ -156,6 +155,7 @@ BOOL LLSidepanelAppearance::postBuild()  	mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook"); +	mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);  	gInventory.addObserver(mOutfitRenameWatcher);  	return TRUE; @@ -389,16 +389,17 @@ void LLSidepanelAppearance::fetchInventory()  		}  	} -	mFetchWorn->fetchItems(ids); +	LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(this); +	fetch_worn->fetchItems(ids);  	// If no items to be fetched, done will never be triggered.  	// TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition. -	if (mFetchWorn->isEverythingComplete()) +	if (fetch_worn->isEverythingComplete())  	{ -		mFetchWorn->done(); +		fetch_worn->done();  	}  	else  	{ -		gInventory.addObserver(mFetchWorn); +		gInventory.addObserver(fetch_worn);  	}  } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 6ca6734598..514d8facb4 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2460,7 +2460,6 @@ void renderOctree(LLSpatialGroup* group)  	gGL.color4fv(col.mV);  	drawBox(group->mObjectBounds[0], group->mObjectBounds[1]*1.01f+LLVector3(0.001f, 0.001f, 0.001f)); -	glDepthMask(GL_TRUE);  	gGL.setSceneBlendType(LLRender::BT_ALPHA);  	if (group->mBuilt <= 0.f) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 7e8c8eb92e..9671b9e5dc 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -48,12 +48,15 @@  #include "llviewerwindow.h"  #include "llfocusmgr.h"  #include "llcallbacklist.h" +#include "llparcel.h" +#include "llaudioengine.h"  // for gAudiop  #include "llevent.h"		// LLSimpleListener  #include "llnotificationsutil.h"  #include "lluuid.h"  #include "llkeyboard.h"  #include "llmutelist.h" +#include "llfirstuse.h"  #include <boost/bind.hpp>	// for SkinFolder listener  #include <boost/signals2.hpp> @@ -708,6 +711,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg)  	std::vector<LLViewerMediaImpl*> proximity_order; +	bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); +	bool needs_first_run = LLViewerMedia::needsMediaFirstRun();  	U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal");  	U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal");  	U32 max_low = gSavedSettings.getU32("PluginInstancesLow"); @@ -822,6 +827,21 @@ void LLViewerMedia::updateMedia(void *dummy_arg)  			new_priority = LLPluginClassMedia::PRIORITY_LOW;  		} +		if(!inworld_media_enabled) +		{ +			// If inworld media is locked out, force all inworld media to stay unloaded. +			if(!pimpl->getUsedInUI()) +			{ +				new_priority = LLPluginClassMedia::PRIORITY_UNLOADED; +				if(needs_first_run) +				{ +					// Don't do this more than once in this loop. +					needs_first_run = false; +					LLViewerMedia::displayMediaFirstRun(); +				} +			} +		} +		  		pimpl->setPriority(new_priority);  		if(pimpl->getUsedInUI()) @@ -888,6 +908,61 @@ void LLViewerMedia::cleanupClass()  	gIdleCallbacks.deleteFunction(LLViewerMedia::updateMedia, NULL);  } + +////////////////////////////////////////////////////////////////////////////////////////// +// static +bool LLViewerMedia::needsMediaFirstRun() +{ +	return gWarningSettings.getBOOL("FirstStreamingMedia"); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::displayMediaFirstRun() +{ +	gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); + +	LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(), +		boost::bind(firstRunCallback, _1, _2)); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// static +bool LLViewerMedia::firstRunCallback(const LLSD& notification, const LLSD& response) +{ +	S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +	if (option == 0) +	{ +		// user has elected to automatically play media. +		gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE); +		gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); +		gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); +		gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); + +		LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); +				 +		if (parcel) +		{ +			// play media right now, if available +			LLViewerParcelMedia::play(parcel); +		 +			// play music right now, if available +			std::string music_url = parcel->getMusicURL(); +			if (gAudiop && !music_url.empty()) +				gAudiop->startInternetStream(music_url); +		} +	} +	else +	{ +		gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, FALSE); +		gSavedSettings.setBOOL("AudioStreamingMedia", FALSE); +		gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); +		gSavedSettings.setBOOL("AudioStreamingMusic", FALSE); +	} +	return false; +} + +  //////////////////////////////////////////////////////////////////////////////////////////  // LLViewerMediaImpl  ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b103c48bd8..3ce9f1887c 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -115,6 +115,12 @@ class LLViewerMedia  		// This is the comparitor used to sort the list.  		static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); +		 +		// For displaying the media first-run dialog. +		static bool needsMediaFirstRun(); +		static void displayMediaFirstRun(); +		static bool firstRunCallback(const LLSD& notification, const LLSD& response); +  };  // Implementation functions not exported into header file diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 0f7903a7a5..56dee6b34c 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -56,10 +56,6 @@ LLUUID LLViewerParcelMedia::sMediaRegionID;  viewer_media_t LLViewerParcelMedia::sMediaImpl; -// Local functions -bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel); - -  // static  void LLViewerParcelMedia::initClass()  { @@ -112,12 +108,10 @@ void LLViewerParcelMedia::update(LLParcel* parcel)  			// First use warning  			if( (!mediaUrl.empty() ||  			     !parcel->getMusicURL().empty()) -			    && gWarningSettings.getBOOL("FirstStreamingMedia") ) +			    && LLViewerMedia::needsMediaFirstRun())  			{ -				LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(), -					boost::bind(callback_play_media, _1, _2, parcel)); +				LLViewerMedia::displayMediaFirstRun();  				return; -  			}  			// if we have a current (link sharing) url, use it instead @@ -591,36 +585,6 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent  	};  } -bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel) -{ -	S32 option = LLNotificationsUtil::getSelectedOption(notification, response); -	if (option == 0) -	{ -		// user has elected to automatically play media. -		gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE); -		gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); -		gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); -		if(!gSavedSettings.getBOOL("AudioStreamingMedia"))  -			gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); -		// play media right now, if available -		LLViewerParcelMedia::play(parcel); -		// play music right now, if available -		if (parcel) -		{ -			std::string music_url = parcel->getMusicURL(); -			if (gAudiop && !music_url.empty()) -				gAudiop->startInternetStream(music_url); -		} -	} -	else -	{ -		gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); -		gSavedSettings.setBOOL("AudioStreamingMusic", FALSE); -	} -	gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); -	return false; -} -  // TODO: observer  /*  void LLViewerParcelMediaNavigationObserver::onNavigateComplete( const EventType& event_in ) diff --git a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml index 4ece0fa3ba..897d959b98 100644 --- a/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml +++ b/indra/newview/skins/default/xui/en/floater_whitelist_entry.xml @@ -5,6 +5,9 @@   height="108"   layout="topleft"   name="whitelist_entry" + single_instance="true" + help_topic="whitelist_entry" + title="WHITELIST ENTRY"   width="390">    <text type="string" length="1" bottom="20" follows="top|left" height="15" layout="topleft" | 
