auto-accept to rlv from own objects
parent
5bfe6f57ae
commit
b769f3b83c
|
|
@ -764,7 +764,7 @@ void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf)
|
||||||
F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_in)
|
F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_in)
|
||||||
{
|
{
|
||||||
LLSettingsBase::TrackPosition blendf = (F32)blendf_in;
|
LLSettingsBase::TrackPosition blendf = (F32)blendf_in;
|
||||||
llassert(!isnan(blendf));
|
llassert(!std::isnan(blendf));
|
||||||
if (blendf >= 1.0)
|
if (blendf >= 1.0)
|
||||||
{
|
{
|
||||||
triggerComplete();
|
triggerComplete();
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/signals2.hpp>
|
#include <boost/signals2.hpp>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include "llsd.h"
|
#include "llsd.h"
|
||||||
#include "llsdutil.h"
|
#include "llsdutil.h"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,17 @@
|
||||||
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:noNamespaceSchemaLocation="llsd.xsd">
|
xsi:noNamespaceSchemaLocation="llsd.xsd">
|
||||||
<map>
|
<map>
|
||||||
|
<key>FSMeowAutoAcceptRLVFromOwnObjects</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Allows auto-accepting inventory offers to #RLV from own objects</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<string>1</string>
|
||||||
|
</map>
|
||||||
<key>FSTrishMouseLookFix</key>
|
<key>FSTrishMouseLookFix</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@ void inventory_offer_handler(LLOfferInfo* info)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LLCachedControl<bool> fsMeowAutoAcceptRlvFromOwnObjects(gSavedSettings, "FSMeowAutoAcceptRLVFromOwnObjects");
|
||||||
|
|
||||||
bool bAutoAccept(false);
|
bool bAutoAccept(false);
|
||||||
// Avoid the Accept/Discard dialog if the user so desires. JC
|
// Avoid the Accept/Discard dialog if the user so desires. JC
|
||||||
|
|
@ -236,14 +237,30 @@ void inventory_offer_handler(LLOfferInfo* info)
|
||||||
// </FS:Ansariel> Auto-accept any kind of inventory (FIRE-4128)
|
// </FS:Ansariel> Auto-accept any kind of inventory (FIRE-4128)
|
||||||
// [RLVa:KB]
|
// [RLVa:KB]
|
||||||
// Don't auto-accept give-to-RLV inventory offers
|
// Don't auto-accept give-to-RLV inventory offers
|
||||||
if ( (gSavedSettings.getBOOL("AutoAcceptNewInventory")) &&
|
if ( (gSavedSettings.getBOOL("AutoAcceptNewInventory")) )
|
||||||
( (!rlv_handler_t::isEnabled()) || (!RlvInventory::instance().isGiveToRLVOffer(*info)) ) )
|
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
{
|
||||||
|
if (rlv_handler_t::isEnabled() && RlvInventory::instance().isGiveToRLVOffer(*info))
|
||||||
|
{
|
||||||
|
if (info->mFromObject && info->mFromID == gAgentID && fsMeowAutoAcceptRlvFromOwnObjects && !RlvSettings::getForbidGiveToRLV())
|
||||||
|
{
|
||||||
|
bAutoAccept = true;
|
||||||
|
|
||||||
|
const LLUUID& idRlvRoot = RlvInventory::instance().getSharedRootID();
|
||||||
|
if (idRlvRoot.notNull())
|
||||||
|
info->mFolderID = idRlvRoot;
|
||||||
|
|
||||||
|
RlvGiveToRLVTaskOffer* pOfferObserver = new RlvGiveToRLVTaskOffer(info->mTransactionID);
|
||||||
|
gInventory.addObserver(pOfferObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// For certain types, just accept the items into the inventory,
|
// For certain types, just accept the items into the inventory,
|
||||||
// and possibly open them on receipt depending upon "ShowNewInventory".
|
// and possibly open them on receipt depending upon "ShowNewInventory".
|
||||||
bAutoAccept = true;
|
bAutoAccept = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Strip any SLURL from the message display. (DEV-2754)
|
// Strip any SLURL from the message display. (DEV-2754)
|
||||||
std::string msg = info->mDesc;
|
std::string msg = info->mDesc;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue