diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpanelpermissions.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llselectmgr.cpp | 54 | ||||
| -rw-r--r-- | indra/newview/llselectmgr.h | 4 | ||||
| -rw-r--r-- | indra/newview/llsidepaneltaskinfo.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 8 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 10 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_task_info.xml | 8 | 
7 files changed, 103 insertions, 2 deletions
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 59130236f2..f3a16dbbf1 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -299,6 +299,9 @@ void LLPanelPermissions::refresh()  	BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()   						   && LLSelectMgr::getInstance()->selectGetRootsModify())  		|| LLSelectMgr::getInstance()->selectGetModify(); +	BOOL is_nonpermanent = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode()  +						   && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) +		|| LLSelectMgr::getInstance()->selectGetNonPermanent();  	const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus();  	S32 string_index = 0; @@ -307,12 +310,18 @@ void LLPanelPermissions::refresh()  			getString("text modify info 1"),  			getString("text modify info 2"),  			getString("text modify info 3"), -			getString("text modify info 4") +			getString("text modify info 4"), +			getString("text modify info 5"), +			getString("text modify info 6")  		};  	if (!is_perm_modify)  	{  		string_index += 2;  	} +	else if (!is_nonpermanent) +	{ +		string_index += 4; +	}  	if (!is_one_object)  	{  		++string_index; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b0aae89a85..44a0b3adc4 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -593,6 +593,12 @@ bool LLSelectMgr::linkObjects()  		return true;  	} +	if (!LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) +	{ +		LLNotificationsUtil::add("CannotLinkPermanent"); +		return true; +	} +  	LLUUID owner_id;  	std::string owner_name;  	if (!LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name)) @@ -2499,6 +2505,54 @@ BOOL LLSelectMgr::selectGetRootsModify()  //----------------------------------------------------------------------------- +// selectGetPermanent() - return TRUE if current agent can modify all +// selected objects. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetNonPermanent() +{ +	for (LLObjectSelection::iterator iter = getSelection()->begin(); +		 iter != getSelection()->end(); iter++ ) +	{ +		LLSelectNode* node = *iter; +		LLViewerObject* object = node->getObject(); +		if( !object || !node->mValid ) +		{ +			return FALSE; +		} +		if( object->isPermanentEnforced()) +		{ +			return FALSE; +		} +	} +	return TRUE; +} + +//----------------------------------------------------------------------------- +// selectGetRootsModify() - return TRUE if current agent can modify all +// selected root objects. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetRootsNonPermanent() +{ +	for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); +		 iter != getSelection()->root_end(); iter++ ) +	{ +		LLSelectNode* node = *iter; +		LLViewerObject* object = node->getObject(); +		if( !node->mValid ) +		{ +			return FALSE; +		} +		if( object->isPermanentEnforced()) +		{ +			return FALSE; +		} +	} + +	return TRUE; +} + + +//-----------------------------------------------------------------------------  // selectGetRootsTransfer() - return TRUE if current agent can transfer all  // selected root objects.  //----------------------------------------------------------------------------- diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 9a066799fe..07eb62a8fa 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -560,6 +560,10 @@ public:  	BOOL selectGetRootsModify();  	BOOL selectGetModify(); +	// returns TRUE if is all objects are non-permanent +	BOOL selectGetRootsNonPermanent(); +	BOOL selectGetNonPermanent(); +  	// returns TRUE if selected objects can be transferred.  	BOOL selectGetRootsTransfer(); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 24cb559fd0..4b49ae9f43 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -301,6 +301,8 @@ void LLSidepanelTaskInfo::refresh()  	// BUG: fails if a root and non-root are both single-selected.  	const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) ||  		LLSelectMgr::getInstance()->selectGetModify(); +	const BOOL is_nonpermanent = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanent()) || +		LLSelectMgr::getInstance()->selectGetNonPermanent();  	S32 string_index = 0;  	std::string MODIFY_INFO_STRINGS[] = @@ -308,12 +310,18 @@ void LLSidepanelTaskInfo::refresh()  			getString("text modify info 1"),  			getString("text modify info 2"),  			getString("text modify info 3"), -			getString("text modify info 4") +			getString("text modify info 4"), +			getString("text modify info 5"), +			getString("text modify info 6")  		};  	if (!is_perm_modify)  	{  		string_index += 2;  	} +	else if (!is_nonpermanent) +	{ +		string_index += 4; +	}  	if (!is_one_object)  	{  		++string_index; diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 528d2a7064..0a90cea886 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -877,6 +877,14 @@                  You can't modify these objects              </panel.string>              <panel.string +             name="text modify info 5"> +                You can't modify this object in frozen mode +            </panel.string> +            <panel.string +             name="text modify info 6"> +                You can't modify these objects in frozen mode +            </panel.string> +            <panel.string               name="text modify warning">                  You must select entire object to set permissions              </panel.string> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f6c29cc191..e1a7c6309d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1490,6 +1490,16 @@ Please make sure none are locked, and that you own all of them.    <notification     icon="alertmodal.tga" +   name="CannotLinkPermanent" +   type="alertmodal"> +Unable to link permanent objects in frozen mode. + +Please switch to unfrozen mode from the menu option Build->Pathfinding->Basic Setup. +    <tag>fail</tag> +  </notification> + +  <notification +   icon="alertmodal.tga"     name="CannotLinkDifferentOwners"     type="alertmodal">  Unable to link because not all of the objects have the same owner. diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 6600339ad7..8a823e8278 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -31,6 +31,14 @@                  You can't modify these objects              </panel.string>              <panel.string +             name="text modify info 5"> +                You can't modify this object in frozen mode +            </panel.string> +            <panel.string +             name="text modify info 6"> +                You can't modify these objects in frozen mode +            </panel.string> +            <panel.string               name="text modify warning">                  This object has linked parts              </panel.string>  | 
