diff options
| author | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-12-05 20:47:21 +0200 | 
|---|---|---|
| committer | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-12-05 20:47:21 +0200 | 
| commit | fc000880b40143534c47c475a7a0aba6ab75039e (patch) | |
| tree | 05e47fe1ecce5270aea3b6420080e6ee9e1cbeee /indra | |
| parent | e0b1b063c14081a7c53ab5620db20385e1f2bbbd (diff) | |
CHUI-519 FIXED Do not put offered items into the trash while in Busy / DND mode
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llui/llnotifications.cpp | 3 | ||||
| -rw-r--r-- | indra/llui/llnotifications.h | 13 | ||||
| -rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 1 | ||||
| -rwxr-xr-x | indra/newview/llviewermessage.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_conversation.xml | 3 | 
5 files changed, 20 insertions, 5 deletions
| diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 66144671c9..fd9bfec203 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -475,7 +475,8 @@ LLNotification::LLNotification(const LLSDParamAdapter<Params>& p) :  	mCancelled(false),  	mIgnored(false),  	mResponderObj(NULL), -	mId(p.id.isProvided() ? p.id : LLUUID::generateNewID()) +	mId(p.id.isProvided() ? p.id : LLUUID::generateNewID()), +	mOfferFromAgent(p.offer_from_agent)  {  	if (p.functor.name.isChosen())  	{ diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 088931858a..372b9ce46f 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -316,6 +316,7 @@ public:  												expiry;  		Optional<LLNotificationContext*>		context;  		Optional<void*>							responder; +		Optional<bool>							offer_from_agent;  		struct Functor : public LLInitParam::ChoiceBlock<Functor>  		{ @@ -339,7 +340,8 @@ public:  			payload("payload"),  			form_elements("form"),  			substitutions("substitutions"), -			expiry("expiry") +			expiry("expiry"), +			offer_from_agent("offer_from_agent", false)  		{  			time_stamp = LLDate::now();  			responder = NULL; @@ -352,7 +354,8 @@ public:  			payload("payload"),  			form_elements("form"),  			substitutions("substitutions"), -			expiry("expiry") +			expiry("expiry"), +			offer_from_agent("offer_from_agent", false)  		{  			functor.name = _name;  			name = _name; @@ -378,6 +381,7 @@ private:  	LLNotificationFormPtr mForm;  	void* mResponderObj; // TODO - refactor/remove this field  	LLNotificationResponderPtr mResponder; +	bool mOfferFromAgent;  	// a reference to the template  	LLNotificationTemplatePtr mTemplatep; @@ -513,6 +517,11 @@ public:  		return mTimestamp;  	} +	bool getOfferFromAgent() const +	{ +		return mOfferFromAgent; +	} +  	std::string getType() const;  	std::string getMessage() const;  	std::string getFooter() const; diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 91003c7d53..ff5b5e21f7 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -113,6 +113,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)  			p.panel = notify_box;  			// we not save offer notifications to the syswell floater that should be added to the IM floater  			p.can_be_stored = !add_notif_to_im; +			p.force_show = notification->getOfferFromAgent();  			LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());  			if(channel) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index dc8192105f..ea804508c8 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1971,6 +1971,7 @@ void inventory_offer_handler(LLOfferInfo* info)  		p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info));  		info->mPersist = true;  		p.name = "UserGiveItem"; +		p.offer_from_agent = true;  		// Prefetch the item into your local inventory.  		LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID); @@ -2738,7 +2739,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  				// Same as closing window  				info->forceResponse(IOR_DECLINE);  			} -			else if (is_do_not_disturb && dialog != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565) +			// old logic: busy mode must not affect interaction with objects (STORM-565) +			// new logic: inventory offers from in-world objects should be auto-declined (CHUI-519) +			else if (is_do_not_disturb && dialog == IM_TASK_INVENTORY_OFFERED)  			{  				// Until throttling is implemented, do not disturb mode should reject inventory instead of silently  				// accepting it.  SEE SL-39554 diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index e8265fe482..01ef8ebdb5 100644 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -116,9 +116,10 @@       label="Block Text"       layout="topleft"       name="MuteText"> -     <on_click function="Avatar.DoToSelected" parameter="mute_unmute"/> +     <on_click function="Avatar.DoToSelected" parameter="mute_unmute" />       <on_check function="Avatar.CheckItem" parameter="is_muted" />       <on_enable  function="Avatar.EnableItem" parameter="can_block" /> +    </menu_item_check>      <menu_item_call       label="Group Profile"       layout="topleft" | 
