diff options
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 9 | ||||
| -rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 15 | ||||
| -rw-r--r-- | indra/llui/llscrolllistctrl.h | 2 | ||||
| -rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloatertools.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llpanelgroup.h | 2 | ||||
| -rw-r--r-- | indra/newview/llpanelgrouproles.cpp | 39 | ||||
| -rw-r--r-- | indra/newview/llpanelgrouproles.h | 1 | ||||
| -rw-r--r-- | indra/newview/llpreviewtexture.cpp | 81 | ||||
| -rw-r--r-- | indra/newview/llpreviewtexture.h | 1 | ||||
| -rw-r--r-- | indra/newview/llstartup.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 29 | ||||
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 14 | 
13 files changed, 157 insertions, 58 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index f1b6fe0a12..680017204c 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -224,7 +224,14 @@ void LLPluginClassMedia::idle(void)  				void *addr = mPlugin->getSharedMemoryAddress(mTextureSharedMemoryName);  				// clear texture memory to avoid random screen visual fuzz from uninitialized texture data -				memset( addr, 0x00, newsize ); +				if (addr) +				{ +					memset( addr, 0x00, newsize ); +				} +				else +				{ +					LL_WARNS("Plugin") << "Failed to get previously created shared memory address: " << mTextureSharedMemoryName << " size: " << mTextureSharedMemorySize << LL_ENDL; +				}  				// We could do this to force an update, but textureValid() will still be returning false until the first roundtrip to the plugin,  				// so it may not be worthwhile. diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 0afa8d43f1..7c1f4a4dca 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -345,6 +345,21 @@ S32 LLScrollListCtrl::getItemCount() const  	return mItemList.size();  } +BOOL LLScrollListCtrl::hasSelectedItem() const +{ +	item_list::iterator iter; +	for (iter = mItemList.begin(); iter < mItemList.end(); ) +	{ +		LLScrollListItem* itemp = *iter; +		if (itemp && itemp->getSelected()) +		{ +			return TRUE; +		} +		iter++; +	} +	return FALSE; +} +  // virtual LLScrolListInterface function (was deleteAllItems)  void LLScrollListCtrl::clearRows()  { diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 8343750a54..699a8744e1 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -201,6 +201,8 @@ public:  	virtual BOOL	isSelected(const LLSD& value) const; +	BOOL 			hasSelectedItem() const; +  	BOOL			handleClick(S32 x, S32 y, MASK mask);  	BOOL			selectFirstItem();  	BOOL			selectNthItem( S32 index ); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 1af2c10a33..c330c2ae47 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2290,6 +2290,8 @@ BOOL LLPanelEstateInfo::postBuild()  	getChild<LLUICtrl>("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this)); +	getChild<LLUICtrl>("externally_visible_radio")->setFocus(TRUE); +  	return LLPanelRegionInfo::postBuild();  } diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index b14b9b7578..2869256d09 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -638,20 +638,20 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)  	// HACK - highlight buttons for next click  	mRadioGroupMove->setVisible(move_visible); -	if (!gGrabBtnSpin &&  -		!gGrabBtnVertical && -		!(mask == MASK_VERTICAL) &&  -		!(mask == MASK_SPIN) ) +	if (!(gGrabBtnSpin ||  +		gGrabBtnVertical ||  +		(mask == MASK_VERTICAL) ||  +		(mask == MASK_SPIN)))  	{  		mRadioGroupMove->setValue("radio move");  	} -	else if (gGrabBtnVertical ||  -			 (mask == MASK_VERTICAL) ) +	else if ((mask == MASK_VERTICAL) || +			 (gGrabBtnVertical && (mask != MASK_SPIN)))  	{  		mRadioGroupMove->setValue("radio lift");  	} -	else if (gGrabBtnSpin ||  -			 (mask == MASK_SPIN) ) +	else if ((mask == MASK_SPIN) ||  +			 (gGrabBtnSpin && (mask != MASK_VERTICAL)))  	{  		mRadioGroupMove->setValue("radio spin");  	} diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 0e6f5b8924..05be4b5aee 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -164,6 +164,8 @@ public:  	virtual void setupCtrls	(LLPanel* parent) {}; +	virtual void onFilterChanged() { } +  protected:  	LLUUID	mGroupID;  	BOOL mAllowEdit; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 8440e9ee50..78270c20bb 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -494,6 +494,7 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter)  	mSearchFilter = filter;  	LLStringUtil::toLower(mSearchFilter);  	update(GC_ALL); +	onFilterChanged();  }  void LLPanelGroupSubTab::activate() @@ -2775,6 +2776,16 @@ void LLPanelGroupActionsSubTab::activate()  	LLPanelGroupSubTab::activate();  	update(GC_ALL); +	mActionDescription->clear(); +	mActionList->deselectAllItems(); +	mActionList->deleteAllItems(); +	buildActionsList(mActionList, +					 GP_ALL_POWERS, +					 GP_ALL_POWERS, +					 NULL, +					 FALSE, +					 TRUE, +					 FALSE);  }  void LLPanelGroupActionsSubTab::deactivate() @@ -2803,19 +2814,31 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)  	if (mGroupID.isNull()) return; -	mActionList->deselectAllItems();  	mActionMembers->deleteAllItems();  	mActionRoles->deleteAllItems(); -	mActionDescription->clear(); +	if(mActionList->hasSelectedItem()) +	{ +		LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); +		if (gdatap && gdatap->isMemberDataComplete() && gdatap->isRoleDataComplete()) +		{ +			handleActionSelect(); +		} +	} +} + +void LLPanelGroupActionsSubTab::onFilterChanged() +{ +	mActionDescription->clear(); +	mActionList->deselectAllItems();  	mActionList->deleteAllItems();  	buildActionsList(mActionList, -					 GP_ALL_POWERS, -					 GP_ALL_POWERS, -					 NULL, -					 FALSE, -					 TRUE, -					 FALSE); +		GP_ALL_POWERS, +		GP_ALL_POWERS, +		NULL, +		FALSE, +		TRUE, +		FALSE);  }  void LLPanelGroupActionsSubTab::handleActionSelect() diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 9a696124a8..1d1d69e0ae 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -311,6 +311,7 @@ public:  	virtual bool needsApply(std::string& mesg);  	virtual bool apply(std::string& mesg);  	virtual void update(LLGroupChange gc); +	virtual void onFilterChanged();  	void handleActionSelect(); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 645a77e42a..12bcd89cb0 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -52,6 +52,8 @@  #include "llviewerwindow.h"  #include "lllineeditor.h" +#include <boost/lexical_cast.hpp> +  const S32 CLIENT_RECT_VPAD = 4;  const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f; @@ -98,6 +100,29 @@ LLPreviewTexture::~LLPreviewTexture()  	}  } +void LLPreviewTexture::populateRatioList() +{ +	// Fill in ratios list with common aspect ratio values +	mRatiosList.clear(); +	mRatiosList.push_back(LLTrans::getString("Unconstrained")); +	mRatiosList.push_back("1:1"); +	mRatiosList.push_back("4:3"); +	mRatiosList.push_back("10:7"); +	mRatiosList.push_back("3:2"); +	mRatiosList.push_back("16:10"); +	mRatiosList.push_back("16:9"); +	mRatiosList.push_back("2:1"); +	 +	// Now fill combo box with provided list +	LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio"); +	combo->removeall(); + +	for (std::vector<std::string>::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it) +	{ +		combo->add(*it); +	} +} +  // virtual  BOOL LLPreviewTexture::postBuild()  { @@ -138,27 +163,12 @@ BOOL LLPreviewTexture::postBuild()          }      } -	// Fill in ratios list with common aspect ratio values -	mRatiosList.clear(); -	mRatiosList.push_back(LLTrans::getString("Unconstrained")); -	mRatiosList.push_back("1:1"); -	mRatiosList.push_back("4:3"); -	mRatiosList.push_back("10:7"); -	mRatiosList.push_back("3:2"); -	mRatiosList.push_back("16:10"); -	mRatiosList.push_back("16:9"); -	mRatiosList.push_back("2:1"); -	 -	// Now fill combo box with provided list -	LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio"); -	combo->removeall(); - -	for (std::vector<std::string>::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it) -	{ -		combo->add(*it); -	} +	// Fill in ratios list and combo box with common aspect ratio values +	populateRatioList();  	childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this); + +	LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");  	combo->setCurrentByIndex(0);  	return LLPreview::postBuild(); @@ -444,16 +454,25 @@ void LLPreviewTexture::updateDimensions()  		return;  	} -	if (mAssetStatus != PREVIEW_ASSET_LOADED) +	S32 img_width = mImage->getFullWidth(); +	S32 img_height = mImage->getFullHeight(); + +	if (mAssetStatus != PREVIEW_ASSET_LOADED +		|| mLastWidth != img_width +		|| mLastHeight != img_height)  	{  		mAssetStatus = PREVIEW_ASSET_LOADED;  		// Asset has been fully loaded, adjust aspect ratio  		adjustAspectRatio();  	} -	 + +  	// Update the width/height display every time -	getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]",  llformat("%d", mImage->getFullWidth())); -	getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight())); +	getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]",  llformat("%d", img_width)); +	getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", img_height)); + +	mLastHeight = img_height; +	mLastWidth = img_width;  	// Reshape the floater only when required  	if (mUpdateDimensions) @@ -579,7 +598,12 @@ void LLPreviewTexture::adjustAspectRatio()  			std::vector<std::string>::const_iterator found = std::find(mRatiosList.begin(), mRatiosList.end(), ratio.str());  			if (found == mRatiosList.end())  			{ -				combo->setCurrentByIndex(0); +				// No existing ratio found, create an element that will show image at original ratio +				populateRatioList(); // makes sure previous custom ratio is cleared +				std::string ratio = boost::lexical_cast<std::string>(num)+":" + boost::lexical_cast<std::string>(denom); +				mRatiosList.push_back(ratio); +				combo->add(ratio); +				combo->setCurrentByIndex(mRatiosList.size()- 1);  			}  			else  			{ @@ -587,6 +611,15 @@ void LLPreviewTexture::adjustAspectRatio()  			}  		}  	} +	else +	{ +		// Aspect ratio was set to unconstrained or was clamped +		LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio"); +		if (combo) +		{ +			combo->setCurrentByIndex(0); //unconstrained +		} +	}  	mUpdateDimensions = TRUE;  } diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index b104a91c75..c156c48d0c 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -67,6 +67,7 @@ public:  	/*virtual*/ void setObjectID(const LLUUID& object_id);  protected:  	void				init(); +	void				populateRatioList();  	/* virtual */ BOOL	postBuild();  	bool				setAspectRatio(const F32 width, const F32 height);  	static void			onAspectRatioCommit(LLUICtrl*,void* userdata); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 33b6352bf5..1a480b1838 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2268,13 +2268,15 @@ void login_callback(S32 option, void *userdata)  */  void show_release_notes_if_required()  { -    if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion +    static bool release_notes_shown = false; +    if (!release_notes_shown && (LLVersionInfo::getChannelAndVersion() != gLastRunVersion)          && LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds          && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")          && !gSavedSettings.getBOOL("FirstLoginThisInstall"))      {          LLSD info(LLAppViewer::instance()->getViewerInfo());          LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); +        release_notes_shown = true;      }  } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9f05ee61bd..01b0dd0077 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3052,20 +3052,23 @@ void LLViewerMediaImpl::update()  					data = mMediaSource->getBitsData();  				} -				// Offset the pixels pointer to match x_pos and y_pos -				data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() ); -				data += ( y_pos * mMediaSource->getTextureDepth() ); - +				if(data != NULL)  				{ -					LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE); -					placeholder_image->setSubImage( -							data, -							mMediaSource->getBitsWidth(), -							mMediaSource->getBitsHeight(), -							x_pos, -							y_pos, -							width, -							height); +					// Offset the pixels pointer to match x_pos and y_pos +					data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() ); +					data += ( y_pos * mMediaSource->getTextureDepth() ); + +					{ +						LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE); +									placeholder_image->setSubImage( +									data, +									mMediaSource->getBitsWidth(), +									mMediaSource->getBitsHeight(), +									x_pos, +									y_pos, +									width, +									height); +					}  				}  			} diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 6abd6f7b64..c162af371f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1462,9 +1462,17 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)  	}  	bool size_okay = true; -	 -	U32 raw_width = mRawImage->getWidth() << mRawDiscardLevel; -	U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel; + +	S32 discard_level = mRawDiscardLevel; +	if (mRawDiscardLevel < 0) +	{ +		LL_DEBUGS() << "Negative raw discard level when creating image: " << mRawDiscardLevel << LL_ENDL; +		discard_level = 0; +	} + +	U32 raw_width = mRawImage->getWidth() << discard_level; +	U32 raw_height = mRawImage->getHeight() << discard_level; +  	if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE )  	{  		LL_INFOS() << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << LL_ENDL;  | 
