Add silent keep/discard inventory offer buttons

Adapted from Phoenix code
This commit is contained in:
Salvatore La Bua
2013-10-10 20:12:35 +02:00
parent 5f0b1ab05b
commit 20ee6cdb72
2 changed files with 43 additions and 8 deletions

View File

@@ -1603,6 +1603,31 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
} // end switch (mIM)
break;
case -2: // decline silently
{
log_message = "You silently decline " + mDesc + " from " + mFromName + ".";
chat.mText = log_message;
LLFloaterChat::addChatHistory(chat);
}
break;
case -1: // accept silently
{
LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
open_agent_offer->startFetch();
if(catp || (itemp && itemp->isFinished()))
{
open_agent_offer->done();
}
else
{
opener = open_agent_offer;
}
log_message = "You silently accept " + mDesc + " from " + mFromName + ".";
chat.mText = log_message;
LLFloaterChat::addChatHistory(chat);
}
break;
case IOR_BUSY:
//Busy falls through to decline. Says to make busy message.
busy=TRUE;

View File

@@ -6721,7 +6721,25 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
name="UserGiveItem"
type="notify">
[NAME] has given you a [OBJECTTYPE] named '[OBJECTNAME]'.
(Keep)/(Discard) won't send an accepted/declined message.
<form name="form">
<button
index="2"
name="Mute"
text="Mute"/>
<button
index="-1"
name="(Keep)"
text="(Keep)"/>
<button
index="-2"
name="(Discard)"
text="(Discard)"/>
<button
index="4"
name="Profile"
text="Profile"/>
<button
index="0"
name="Keep"
@@ -6730,14 +6748,6 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
index="1"
name="Discard"
text="Discard"/>
<button
index="2"
name="Mute"
text="Mute"/>
<button
index="4"
name="Profile"
text="Profile"/>
</form>
</notification>