[RLVa] Updates thanks to Kitty
1ea7389, 49be412, ed4c8e6 & 7ce9521 - changed : "Give to #RLV" agent-to-agent and script-to-agent offers can contain subfolders -> limited to 3 levels (e.g. #RLV/~FolderA/FolderB/FolderC) -> #RLV folder is auto-created if it doesn't currently exist 8780d84 - Incremented version number to RLVa-1.4.10 f078067 - internal : boolean (custom) debug settings should have a boolean type 72a8ad8 & 401ca14 - internal : added supporting code for "Detach Folder" RLVa lock checks 05718b5 - fixed : RenderResolutionDivisor is non-functional -> RenderResolutionDivisor isn't actually taken into account when checking the new screen resolution against the current screen buffer size 4fa138b - fixed : viewer clips mouse to its rectangle when switching into mouselook while it's not the active application -> Repro: * rez a prim with a script to llForceMouseLook(TRUE) and force-sit when clicked (with a slight delay) * click the prim and give focus to another application => the viewer will center the mouse cursor on itself and restrict movement to within its own rectangle (requires alt-tab to escape) + Singu Note: Thanks to Kitty for this, it is possible that this would happen in our last release 14132c9 - fixed : region name and global coordinates are shown on the About floater when @showloc restricted + Singu Note: RLV version is now shown in help->about 9a2af62 - changed : llRegionSayTo messages are no longer subject to @recvchat(from) or @recvemote(from) 2dc4b89 - fixed : @getstatus and @getstatusall should specify an (optional) separator -> added support for both @getstatus:tp;|=123 and @getstatus:;|=123 fbb3fb1 - Incremented API version number to 2.8.0 92c39b9 - internal : quick and dirty hack fix for RlvUtil::filterNames() but there's no time to do a proper backport from RLVa-1.5 2580f1c - internal : remove hack for legacy viewers without multi-attachment support
This commit is contained in:
@@ -268,7 +268,7 @@ void LLInventoryObject::updateServer(BOOL) const
|
||||
llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl;
|
||||
}
|
||||
|
||||
inline
|
||||
// inline
|
||||
void LLInventoryObject::correctInventoryName(std::string& name)
|
||||
{
|
||||
LLStringUtil::replaceNonstandardASCII(name, ' ');
|
||||
|
||||
@@ -84,9 +84,13 @@ public:
|
||||
void setParent(const LLUUID& new_parent);
|
||||
void setType(LLAssetType::EType type);
|
||||
|
||||
private:
|
||||
// [RLVa:KB] - Checked: 2014-01-07 (RLVa-1.4.10)
|
||||
// in place correction for inventory name string
|
||||
void correctInventoryName(std::string& name);
|
||||
static void correctInventoryName(std::string& name);
|
||||
// [/RLVa:KB]
|
||||
private:
|
||||
// // in place correction for inventory name string
|
||||
// void correctInventoryName(std::string& name);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveDebug</key>
|
||||
<map>
|
||||
@@ -22,7 +22,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveCanOOC</key>
|
||||
<map>
|
||||
@@ -33,7 +33,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveForbidGiveToRLV</key>
|
||||
<map>
|
||||
@@ -44,7 +44,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveNoSetEnv</key>
|
||||
<map>
|
||||
@@ -55,7 +55,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveReplaceWhenFolderBeginsWith</key>
|
||||
<map>
|
||||
@@ -77,7 +77,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RestrainedLoveStackWhenFolderBeginsWith</key>
|
||||
<map>
|
||||
@@ -99,7 +99,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableCompositeFolders</key>
|
||||
<map>
|
||||
@@ -110,7 +110,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableLegacyNaming</key>
|
||||
<map>
|
||||
@@ -121,7 +121,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaEnableSharedWear</key>
|
||||
<map>
|
||||
@@ -132,7 +132,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaHideLockedLayers</key>
|
||||
<map>
|
||||
@@ -143,7 +143,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaHideLockedAttachments</key>
|
||||
<map>
|
||||
@@ -154,7 +154,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaSharedInvAutoRename</key>
|
||||
<map>
|
||||
@@ -165,7 +165,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaShowAssertionFailures</key>
|
||||
<map>
|
||||
@@ -176,7 +176,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>RLVaShowNameTags</key>
|
||||
<map>
|
||||
@@ -187,7 +187,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaTopLevelMenu</key>
|
||||
<map>
|
||||
@@ -198,7 +198,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RLVaWearReplaceUnlocked</key>
|
||||
<map>
|
||||
@@ -209,7 +209,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>ForceInitialCOFDelay</key>
|
||||
<map>
|
||||
|
||||
@@ -2191,8 +2191,8 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate)
|
||||
|
||||
//gViewerWindow->stopGrab();
|
||||
LLSelectMgr::getInstance()->deselectAll();
|
||||
gViewerWindow->hideCursor();
|
||||
gViewerWindow->moveCursorToCenter();
|
||||
// gViewerWindow->hideCursor();
|
||||
// gViewerWindow->moveCursorToCenter();
|
||||
|
||||
if (mCameraMode != CAMERA_MODE_MOUSELOOK)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "llfloatercustomize.h"
|
||||
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvinventory.h"
|
||||
#include "llattachmentsmgr.h"
|
||||
@@ -65,7 +65,7 @@
|
||||
LLAgentWearables gAgentWearables;
|
||||
|
||||
BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
|
||||
bool LLAgentWearables::mInitialWearablesLoaded = false;
|
||||
// [/SL:KB]
|
||||
|
||||
@@ -829,7 +829,7 @@ const LLUUID LLAgentWearables::getWearableItemID(LLWearableType::EType type, U32
|
||||
return LLUUID();
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
|
||||
// [RLVa:KB] - Checked: 2011-03-31 (RLVa-1.3.0)
|
||||
void LLAgentWearables::getWearableItemIDs(uuid_vec_t& idItems) const
|
||||
{
|
||||
for (wearableentry_map_t::const_iterator itWearableType = mWearableDatas.begin();
|
||||
@@ -844,8 +844,8 @@ void LLAgentWearables::getWearableItemIDs(LLWearableType::EType eType, uuid_vec_
|
||||
wearableentry_map_t::const_iterator itWearableType = mWearableDatas.find(eType);
|
||||
if (mWearableDatas.end() != itWearableType)
|
||||
{
|
||||
for (wearableentry_vec_t::const_iterator itWearable = itWearableType->second.begin(), endWearable = itWearableType->second.end();
|
||||
itWearable != endWearable; ++itWearable)
|
||||
for (wearableentry_vec_t::const_iterator itWearable = itWearableType->second.begin();
|
||||
itWearable != itWearableType->second.end(); ++itWearable)
|
||||
{
|
||||
LLViewerWearable* wearable = dynamic_cast<LLViewerWearable*>(*itWearable);
|
||||
if(wearable)
|
||||
@@ -1402,7 +1402,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
||||
// Start rendering & update the server
|
||||
mWearablesLoaded = TRUE;
|
||||
checkWearablesLoaded();
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-3.0.0a) | Modified: Catznip-2.2.0a
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.2)
|
||||
if (!mInitialWearablesLoaded)
|
||||
{
|
||||
mInitialWearablesLoaded = true;
|
||||
@@ -1830,7 +1830,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
|
||||
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
|
||||
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
|
||||
msg->addU8Fast(_PREHASH_AttachmentPt, replace? 0 : ATTACHMENT_ADD); // Wear at the previous or default attachment point
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
if ( (rlv_handler_t::isEnabled()) && (sInitialAttachmentsRequested) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
|
||||
{
|
||||
RlvAttachmentLockWatchdog::instance().onWearAttachment(item, RLV_WEAR_ADD);
|
||||
@@ -1847,7 +1847,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
|
||||
}
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1b) | Added: RLVa-1.3.1b
|
||||
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
|
||||
sInitialAttachmentsRequested = true;
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
@@ -2076,7 +2076,7 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_
|
||||
return mLoadedSignal.connect(cb);
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
|
||||
boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb)
|
||||
{
|
||||
return mInitialWearablesLoadedSignal.connect(cb);
|
||||
|
||||
@@ -3014,10 +3014,10 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id)
|
||||
LLInventoryModel::EXCLUDE_TRASH);
|
||||
for (S32 i=0; i<item_array.count(); i++)
|
||||
{
|
||||
const LLInventoryItem* item = item_array.get(i).get();
|
||||
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
||||
const LLViewerInventoryItem* item = item_array.get(i).get();
|
||||
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8)
|
||||
#if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
|
||||
// NOTE-RLVa: debug-only, can be removed down the line
|
||||
if (rlv_handler_t::isEnabled())
|
||||
@@ -3025,10 +3025,14 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id)
|
||||
RLV_ASSERT(rlvPredCanRemoveItem(item));
|
||||
}
|
||||
#endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
|
||||
// [/RLVa:KB]
|
||||
|
||||
gInventory.purgeObject(item->getUUID());
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// const LLInventoryItem* item = item_array.get(i).get();
|
||||
// if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
|
||||
// {
|
||||
// gInventory.purgeObject(item->getUUID());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,9 @@
|
||||
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhelper.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#if LL_WINDOWS
|
||||
@@ -168,15 +169,7 @@ LLFloaterAbout::LLFloaterAbout()
|
||||
|
||||
// Position
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a)
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
|
||||
{
|
||||
support.append(RlvStrings::getString(RLV_STRING_HIDDEN));
|
||||
support.append("\n\n");
|
||||
}
|
||||
else if (region)
|
||||
// [/RLVa:KB]
|
||||
// if (region)
|
||||
if (region)
|
||||
{
|
||||
LLStyleSP server_link_style(new LLStyle);
|
||||
server_link_style->setVisible(true);
|
||||
@@ -184,6 +177,9 @@ LLFloaterAbout::LLFloaterAbout()
|
||||
server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes"));
|
||||
server_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
|
||||
|
||||
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
|
||||
if (RlvActions::canShowLocation())
|
||||
{
|
||||
const LLVector3d &pos = gAgent.getPositionGlobal();
|
||||
LLUIString pos_text = getString("you_are_at");
|
||||
pos_text.setArg("[POSITION]",
|
||||
@@ -204,6 +200,10 @@ LLFloaterAbout::LLFloaterAbout()
|
||||
support.append(buffer);
|
||||
support.append(")");
|
||||
}
|
||||
}
|
||||
else
|
||||
support.append(RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
|
||||
// [/RLVa:KN]
|
||||
support.append("\n");
|
||||
|
||||
support.append(gLastVersionChannel);
|
||||
@@ -265,6 +265,9 @@ LLFloaterAbout::LLFloaterAbout()
|
||||
getWindow()->setCursor(UI_CURSOR_ARROW);
|
||||
#endif
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0)
|
||||
support.append("RLV Version: " + (RlvActions::isRlvEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)");
|
||||
// [/RLVa:KB]
|
||||
support.append("OpenGL Version: ");
|
||||
support.append( (const char*) glGetString(GL_VERSION) );
|
||||
support.append("\n\n");
|
||||
|
||||
@@ -60,10 +60,17 @@ LLToolGun::LLToolGun( LLToolComposite* composite )
|
||||
|
||||
void LLToolGun::handleSelect()
|
||||
{
|
||||
gViewerWindow->hideCursor();
|
||||
gViewerWindow->moveCursorToCenter();
|
||||
gViewerWindow->getWindow()->setMouseClipping(TRUE);
|
||||
mIsSelected = TRUE;
|
||||
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
|
||||
if (gFocusMgr.getAppHasFocus())
|
||||
{
|
||||
// [/RLVa:KB]
|
||||
gViewerWindow->hideCursor();
|
||||
gViewerWindow->moveCursorToCenter();
|
||||
gViewerWindow->getWindow()->setMouseClipping(TRUE);
|
||||
mIsSelected = TRUE;
|
||||
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
void LLToolGun::handleDeselect()
|
||||
|
||||
@@ -1494,7 +1494,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
||||
|
||||
bool busy = gAgent.getBusy();
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
|
||||
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1)
|
||||
bool fRlvNotifyAccepted = false;
|
||||
// [/RLVa:KB]
|
||||
switch(button)
|
||||
@@ -1505,25 +1505,23 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
||||
// group_notice_inventory is 1 greater than the offer integer value.
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Modified: RLVa-1.2.1e
|
||||
// Only change the inventory offer's destination folder to the shared root if:
|
||||
// Only treat the offer as 'Give to #RLV' if:
|
||||
// - the user has enabled the feature
|
||||
// - the inventory offer came from a script (and specifies a folder)
|
||||
// - the name starts with the prefix - mDesc format: '[OBJECTNAME]' ( http://slurl.com/... )
|
||||
if ( (rlv_handler_t::isEnabled()) &&
|
||||
(IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
|
||||
if ( (rlv_handler_t::isEnabled()) && (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
|
||||
{
|
||||
fRlvNotifyAccepted = true;
|
||||
if (!RlvSettings::getForbidGiveToRLV())
|
||||
{
|
||||
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
|
||||
if (pRlvRoot)
|
||||
{
|
||||
fRlvNotifyAccepted = false; // "accepted_in_rlv" is sent from RlvGiveToRLVTaskOffer *after* we have the folder
|
||||
mFolderID = pRlvRoot->getUUID();
|
||||
const LLUUID& idRlvRoot = RlvInventory::instance().getSharedRootID();
|
||||
if (idRlvRoot.notNull())
|
||||
mFolderID = idRlvRoot;
|
||||
|
||||
RlvGiveToRLVTaskOffer* pOfferObserver = new RlvGiveToRLVTaskOffer(mTransactionID);
|
||||
gInventory.addObserver(pOfferObserver);
|
||||
}
|
||||
fRlvNotifyAccepted = false; // "accepted_in_rlv" is sent from RlvGiveToRLVTaskOffer *after* we have the folder
|
||||
|
||||
RlvGiveToRLVTaskOffer* pOfferObserver = new RlvGiveToRLVTaskOffer(mTransactionID);
|
||||
gInventory.addObserver(pOfferObserver);
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
@@ -1536,7 +1534,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
||||
// send the message
|
||||
msg->sendReliable(mHost);
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
|
||||
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1)
|
||||
if (fRlvNotifyAccepted)
|
||||
{
|
||||
std::string::size_type idxToken = mDesc.find("' ( http://");
|
||||
@@ -1563,9 +1561,8 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
||||
// This is an offer from an agent. In this case, the back
|
||||
// end has already copied the items into your inventory,
|
||||
// so we can fetch it out of our inventory.
|
||||
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
|
||||
if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) && (LLAssetType::AT_CATEGORY == mType) &&
|
||||
(RlvInventory::instance().getSharedRoot()) && (mDesc.find(RLV_PUTINV_PREFIX) == 0) )
|
||||
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0)
|
||||
if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getForbidGiveToRLV()) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 0) )
|
||||
{
|
||||
RlvGiveToRLVAgentOffer* pOfferObserver = new RlvGiveToRLVAgentOffer(mObjectID);
|
||||
pOfferObserver->startFetch();
|
||||
@@ -4006,10 +4003,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
|
||||
// Filtering "rules":
|
||||
// avatar => filter all avie text (unless it's this avie or they're an exemption)
|
||||
// objects => filter everything except attachments this avie owns (never filter llOwnerSay chat)
|
||||
// objects => filter everything except attachments this avie owns (never filter llOwnerSay or llRegionSayTo chat)
|
||||
if ( ( (CHAT_SOURCE_AGENT == chat.mSourceType) && (from_id != gAgent.getID()) ) ||
|
||||
( (CHAT_SOURCE_OBJECT == chat.mSourceType) && ((!is_owned_by_me) || (!is_attachment)) &&
|
||||
(CHAT_TYPE_OWNER != chat.mChatType) ) )
|
||||
(CHAT_TYPE_OWNER != chat.mChatType) && (CHAT_TYPE_DIRECT != chat.mChatType) ) )
|
||||
{
|
||||
bool fIsEmote = RlvUtil::isEmote(mesg);
|
||||
if ((!fIsEmote) &&
|
||||
|
||||
@@ -660,7 +660,17 @@ void LLPipeline::resizeScreenTexture()
|
||||
GLuint resX = gViewerWindow->getWorldViewWidthRaw();
|
||||
GLuint resY = gViewerWindow->getWorldViewHeightRaw();
|
||||
|
||||
if ((resX != mScreen.getWidth()) || (resY != mScreen.getHeight()))
|
||||
// [RLVa:KB] - Checked: 2014-02-23 (RLVa-1.4.10)
|
||||
U32 resMod = gSavedSettings.getU32("RenderResolutionDivisor"), resAdjustedX = resX, resAdjustedY = resY;
|
||||
if ( (resMod > 1) && (resMod < resX) && (resMod < resY) )
|
||||
{
|
||||
resAdjustedX /= resMod;
|
||||
resAdjustedY /= resMod;
|
||||
}
|
||||
|
||||
if ( (resAdjustedX != mScreen.getWidth()) || (resAdjustedY != mScreen.getHeight()) )
|
||||
// [/RLVa:KB]
|
||||
// if ((resX != mScreen.getWidth()) || (resY != mScreen.getHeight()))
|
||||
{
|
||||
releaseScreenBuffers();
|
||||
if (!allocateScreenBuffer(resX,resY))
|
||||
|
||||
@@ -91,6 +91,12 @@ bool RlvActions::canStand()
|
||||
return (!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting()));
|
||||
}
|
||||
|
||||
// Checked: 2014-02-24 (RLVa-1.4.10)
|
||||
bool RlvActions::canShowLocation()
|
||||
{
|
||||
return !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC);
|
||||
}
|
||||
|
||||
// Checked: 2013-05-10 (RLVa-1.4.9)
|
||||
bool RlvActions::hasBehaviour(ERlvBehaviour eBhvr)
|
||||
{
|
||||
|
||||
@@ -79,6 +79,11 @@ public:
|
||||
*/
|
||||
static bool canStand();
|
||||
|
||||
/*
|
||||
* Returns true if the user can see their in-world location
|
||||
*/
|
||||
static bool canShowLocation();
|
||||
|
||||
// ================
|
||||
// Helper functions
|
||||
// ================
|
||||
|
||||
@@ -392,7 +392,9 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
|
||||
if (LLAvatarNameCache::get(idAgents[idxAgent], &avName))
|
||||
{
|
||||
const std::string& strDisplayName = avName.mDisplayName;
|
||||
bool fFilterDisplay = (strDisplayName.length() > 2);
|
||||
const std::string& strLegacyName = avName.getLegacyName();
|
||||
fFilterLegacy &= (strLegacyName.length() > 2);
|
||||
const std::string& strAnonym = RlvStrings::getAnonym(avName);
|
||||
|
||||
// If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around
|
||||
@@ -400,11 +402,13 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
|
||||
{
|
||||
if (fFilterLegacy)
|
||||
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
if (fFilterDisplay)
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
if (fFilterDisplay)
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
if (fFilterLegacy)
|
||||
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
||||
}
|
||||
@@ -682,7 +686,7 @@ bool rlvPredCanNotWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWea
|
||||
}
|
||||
|
||||
// Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
|
||||
bool rlvPredCanRemoveItem(const LLInventoryItem* pItem)
|
||||
bool rlvPredCanRemoveItem(const LLViewerInventoryItem* pItem)
|
||||
{
|
||||
if ( (pItem) && (RlvForceWear::isWearableItem(pItem)) )
|
||||
{
|
||||
@@ -705,7 +709,7 @@ bool rlvPredCanRemoveItem(const LLInventoryItem* pItem)
|
||||
}
|
||||
|
||||
// Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
|
||||
bool rlvPredCanNotRemoveItem(const LLInventoryItem* pItem)
|
||||
bool rlvPredCanNotRemoveItem(const LLViewerInventoryItem* pItem)
|
||||
{
|
||||
return !rlvPredCanRemoveItem(pItem);
|
||||
}
|
||||
|
||||
@@ -243,8 +243,8 @@ protected:
|
||||
|
||||
bool rlvPredCanWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWearMask);
|
||||
bool rlvPredCanNotWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWearMask);
|
||||
bool rlvPredCanRemoveItem(const LLInventoryItem* pItem);
|
||||
bool rlvPredCanNotRemoveItem(const LLInventoryItem* pItem);
|
||||
bool rlvPredCanRemoveItem(const LLViewerInventoryItem* pItem);
|
||||
bool rlvPredCanNotRemoveItem(const LLViewerInventoryItem* pItem);
|
||||
|
||||
struct RlvPredCanWearItem
|
||||
{
|
||||
@@ -262,6 +262,18 @@ protected:
|
||||
ERlvWearMask m_eWearMask;
|
||||
};
|
||||
|
||||
struct RlvPredCanRemoveItem
|
||||
{
|
||||
RlvPredCanRemoveItem() {}
|
||||
bool operator()(const LLViewerInventoryItem* pItem) { return rlvPredCanRemoveItem(pItem); }
|
||||
};
|
||||
|
||||
struct RlvPredCanNotRemoveItem
|
||||
{
|
||||
RlvPredCanNotRemoveItem() {}
|
||||
bool operator()(const LLViewerInventoryItem* pItem) { return rlvPredCanNotRemoveItem(pItem); }
|
||||
};
|
||||
|
||||
struct RlvPredIsEqualOrLinkedItem
|
||||
{
|
||||
RlvPredIsEqualOrLinkedItem(const LLViewerInventoryItem* pItem) : m_pItem(pItem) {}
|
||||
|
||||
@@ -57,14 +57,14 @@
|
||||
|
||||
// Version of the specifcation we support
|
||||
const S32 RLV_VERSION_MAJOR = 2;
|
||||
const S32 RLV_VERSION_MINOR = 7;
|
||||
const S32 RLV_VERSION_MINOR = 8;
|
||||
const S32 RLV_VERSION_PATCH = 0;
|
||||
const S32 RLV_VERSION_BUILD = 0;
|
||||
|
||||
// Implementation version
|
||||
const S32 RLVa_VERSION_MAJOR = 1;
|
||||
const S32 RLVa_VERSION_MINOR = 4;
|
||||
const S32 RLVa_VERSION_PATCH = 9;
|
||||
const S32 RLVa_VERSION_PATCH = 10;
|
||||
const S32 RLVa_VERSION_BUILD = 0;
|
||||
|
||||
// Uncomment before a final release
|
||||
@@ -101,6 +101,8 @@ const S32 RLVa_VERSION_BUILD = 0;
|
||||
#define RLV_ROOT_FOLDER "#RLV"
|
||||
#define RLV_CMD_PREFIX '@'
|
||||
#define RLV_PUTINV_PREFIX "#RLV/~"
|
||||
#define RLV_PUTINV_SEPARATOR "/"
|
||||
#define RLV_PUTINV_MAXDEPTH 4
|
||||
#define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90<39> with the rest of SL
|
||||
#define RLV_STRINGS_FILE "rlva_strings.xml"
|
||||
|
||||
|
||||
@@ -67,6 +67,34 @@ static bool rlvParseNotifyOption(const std::string& strOption, S32& nChannel, st
|
||||
return (itTok == tokens.end());
|
||||
}
|
||||
|
||||
// Checked: 2014-02-26 (RLVa-1.4.10)
|
||||
static bool rlvParseGetStatusOption(const std::string& strOption, std::string& strFilter, std::string& strSeparator)
|
||||
{
|
||||
// @getstatus:[<option>][;<separator>]
|
||||
// * Parameters: first and second parameters are both optional
|
||||
// * Examples : @getstatus=123 ; @getstatus:tp=123 ; @getstatus:tp;|=123 ; @getstatus:;|=123
|
||||
|
||||
boost_tokenizer tokens(strOption, boost::char_separator<char>(";", "", boost::keep_empty_tokens));
|
||||
boost_tokenizer::const_iterator itTok = tokens.begin();
|
||||
|
||||
strSeparator = "/";
|
||||
strFilter.clear();
|
||||
|
||||
// <option> optional parameter (defaults to empty string if unspecified)
|
||||
if (itTok != tokens.end())
|
||||
strFilter = *itTok++;
|
||||
else
|
||||
strFilter.clear();
|
||||
|
||||
// <separator> optional paramter (defaults to '/' if unspecified)
|
||||
if ( (itTok != tokens.end()) && (!(*itTok).empty()) )
|
||||
strSeparator = *itTok++;
|
||||
else
|
||||
strSeparator = "/";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Constructor/destructor
|
||||
//
|
||||
@@ -1900,19 +1928,27 @@ ERlvCmdRet RlvHandler::processReplyCommand(const RlvCommand& rlvCmd) const
|
||||
}
|
||||
break;
|
||||
#endif // RLV_EXTENSION_CMD_GETCOMMAND
|
||||
case RLV_BHVR_GETSTATUS: // @getstatus[:<option>]=<channel> - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
case RLV_BHVR_GETSTATUS: // @getstatus - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
{
|
||||
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
|
||||
rlv_object_map_t::const_iterator itObj = m_Objects.find(rlvCmd.getObjectID());
|
||||
if (itObj != m_Objects.end())
|
||||
strReply = itObj->second.getStatusString(rlvCmd.getOption());
|
||||
std::string strFilter, strSeparator;
|
||||
if (rlvParseGetStatusOption(rlvCmd.getOption(), strFilter, strSeparator))
|
||||
{
|
||||
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
|
||||
rlv_object_map_t::const_iterator itObj = m_Objects.find(rlvCmd.getObjectID());
|
||||
if (itObj != m_Objects.end())
|
||||
strReply = itObj->second.getStatusString(strFilter, strSeparator);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RLV_BHVR_GETSTATUSALL: // @getstatusall[:<option>]=<channel> - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
case RLV_BHVR_GETSTATUSALL: // @getstatusall - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.1.0f
|
||||
{
|
||||
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
|
||||
for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj)
|
||||
strReply += itObj->second.getStatusString(rlvCmd.getOption());
|
||||
std::string strFilter, strSeparator;
|
||||
if (rlvParseGetStatusOption(rlvCmd.getOption(), strFilter, strSeparator))
|
||||
{
|
||||
// NOTE: specification says response should start with '/' but RLV-1.16.1 returns an empty string when no rules are set
|
||||
for (rlv_object_map_t::const_iterator itObj = m_Objects.begin(); itObj != m_Objects.end(); ++itObj)
|
||||
strReply += itObj->second.getStatusString(strFilter, strSeparator);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RLV_BHVR_UNKNOWN:
|
||||
|
||||
@@ -422,18 +422,15 @@ bool RlvObject::hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOpt
|
||||
}
|
||||
|
||||
// Checked: 2009-11-27 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
|
||||
std::string RlvObject::getStatusString(const std::string& strMatch) const
|
||||
std::string RlvObject::getStatusString(const std::string& strFilter, const std::string& strSeparator) const
|
||||
{
|
||||
std::string strStatus, strCmd;
|
||||
|
||||
for (rlv_command_list_t::const_iterator itCmd = m_Commands.begin(); itCmd != m_Commands.end(); ++itCmd)
|
||||
{
|
||||
strCmd = itCmd->asString();
|
||||
if ( (strMatch.empty()) || (std::string::npos != strCmd.find(strMatch)) )
|
||||
{
|
||||
strStatus.push_back('/');
|
||||
strStatus += strCmd;
|
||||
}
|
||||
if ( (strFilter.empty()) || (std::string::npos != strCmd.find(strFilter)) )
|
||||
strStatus.append(strSeparator).append(strCmd);
|
||||
}
|
||||
|
||||
return strStatus;
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
bool removeCommand(const RlvCommand& rlvCmd);
|
||||
void setCommandRet(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
|
||||
|
||||
std::string getStatusString(const std::string& strMatch) const;
|
||||
std::string getStatusString(const std::string& strFilter, const std::string& strSeparator) const;
|
||||
bool hasBehaviour(ERlvBehaviour eBehaviour, bool fStrictOnly) const;
|
||||
bool hasBehaviour(ERlvBehaviour eBehaviour, const std::string& strOption, bool fStrictOnly) const;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2011, Kitty Barnett
|
||||
* Copyright (c) 2009-2014, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
@@ -270,7 +270,7 @@ const LLUUID& RlvInventory::getSharedRootID() const
|
||||
}
|
||||
|
||||
// Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-1.0.1a
|
||||
LLViewerInventoryCategory* RlvInventory::getSharedFolder(const LLUUID& idParent, const std::string& strFolderName) const
|
||||
LLViewerInventoryCategory* RlvInventory::getSharedFolder(const LLUUID& idParent, const std::string& strFolderName, bool fMatchPartial) const
|
||||
{
|
||||
LLInventoryModel::cat_array_t* pFolders; LLInventoryModel::item_array_t* pItems;
|
||||
gInventory.getDirectDescendentsOf(idParent, pFolders, pItems);
|
||||
@@ -279,22 +279,14 @@ LLViewerInventoryCategory* RlvInventory::getSharedFolder(const LLUUID& idParent,
|
||||
|
||||
// If we can't find an exact match then we'll settle for a "contains" match
|
||||
LLViewerInventoryCategory* pPartial = NULL;
|
||||
|
||||
//LLStringUtil::toLower(strFolderName); <- everything was already converted to lower case before
|
||||
|
||||
std::string strName;
|
||||
for (S32 idxFolder = 0, cntFolder = pFolders->count(); idxFolder < cntFolder; idxFolder++)
|
||||
for (LLInventoryModel::cat_array_t::const_iterator itFolder = pFolders->begin(); itFolder != pFolders->end(); ++itFolder)
|
||||
{
|
||||
LLViewerInventoryCategory* pFolder = pFolders->get(idxFolder);
|
||||
LLViewerInventoryCategory* pFolder = *itFolder;
|
||||
std::string strName = pFolder->getName();
|
||||
|
||||
strName = pFolder->getName();
|
||||
if (strName.empty())
|
||||
continue;
|
||||
LLStringUtil::toLower(strName);
|
||||
|
||||
if (strFolderName == strName)
|
||||
if (boost::iequals(strName, strFolderName))
|
||||
return pFolder; // Found an exact match, no need to keep on going
|
||||
else if ( (!pPartial) && (RLV_FOLDER_PREFIX_HIDDEN != strName[0]) && (std::string::npos != strName.find(strFolderName)) )
|
||||
else if ( (fMatchPartial) && (!pPartial) && (RLV_FOLDER_PREFIX_HIDDEN != strName[0]) && (boost::icontains(strName, strFolderName) ) )
|
||||
pPartial = pFolder; // Found a partial (non-hidden) match, but we might still find an exact one (first partial match wins)
|
||||
}
|
||||
|
||||
@@ -302,7 +294,7 @@ LLViewerInventoryCategory* RlvInventory::getSharedFolder(const LLUUID& idParent,
|
||||
}
|
||||
|
||||
// Checked: 2010-02-28 (RLVa-1.2.0a) | Modified: RLVa-0.2.0e
|
||||
LLViewerInventoryCategory* RlvInventory::getSharedFolder(const std::string& strPath) const
|
||||
LLViewerInventoryCategory* RlvInventory::getSharedFolder(const std::string& strPath, bool fMatchPartial) const
|
||||
{
|
||||
// Sanity check - no shared root => no shared folder
|
||||
LLViewerInventoryCategory* pRlvRoot = getSharedRoot(), *pFolder = pRlvRoot;
|
||||
@@ -313,7 +305,7 @@ LLViewerInventoryCategory* RlvInventory::getSharedFolder(const std::string& strP
|
||||
boost_tokenizer tokens(strPath, boost::char_separator<char>("/", "", boost::drop_empty_tokens));
|
||||
for (boost_tokenizer::const_iterator itToken = tokens.begin(); itToken != tokens.end(); ++itToken)
|
||||
{
|
||||
pFolder = getSharedFolder(pFolder->getUUID(), *itToken);
|
||||
pFolder = getSharedFolder(pFolder->getUUID(), *itToken, fMatchPartial);
|
||||
if (!pFolder)
|
||||
return NULL; // No such folder
|
||||
}
|
||||
@@ -503,7 +495,109 @@ void RlvRenameOnWearObserver::onCategoryCreate(const LLSD& sdData, void* pParam)
|
||||
// "Give to #RLV" helper classes
|
||||
//
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
|
||||
// Checked: 2014-01-07 (RLVa-1.4.10)
|
||||
bool RlvGiveToRLVOffer::createDestinationFolder(const std::string& strPath)
|
||||
{
|
||||
// NOTE: derived classes will delete the instance in their onDestinationCreated override, so don't do anything after triggering the callback
|
||||
|
||||
m_DestPath.clear();
|
||||
if (0 == strPath.find(RLV_PUTINV_PREFIX))
|
||||
{
|
||||
boost::split(m_DestPath, strPath, boost::is_any_of(std::string(RLV_PUTINV_SEPARATOR)));
|
||||
}
|
||||
|
||||
if ( (m_DestPath.size() >= 2) && (m_DestPath.size() <= RLV_PUTINV_MAXDEPTH) )
|
||||
{
|
||||
const std::string strFolder = m_DestPath.front();
|
||||
if (RLV_ROOT_FOLDER == strFolder)
|
||||
{
|
||||
m_DestPath.pop_front();
|
||||
|
||||
const LLUUID& idRlvRoot = RlvInventory::instance().getSharedRootID();
|
||||
if (idRlvRoot.notNull())
|
||||
{
|
||||
onCategoryCreateCallback(LLSD().with("folder_id", idRlvRoot), this);
|
||||
}
|
||||
else
|
||||
{
|
||||
const LLUUID idTemp = gInventory.createNewCategory(gInventory.getRootFolderID(), LLFolderType::FT_NONE, RLV_ROOT_FOLDER, onCategoryCreateCallback, (void*)this);
|
||||
if (idTemp.notNull())
|
||||
onCategoryCreateCallback(LLSD().with("folder_id", idTemp), this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
m_DestPath.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Checked: 2014-01-07 (RLVa-1.4.10)
|
||||
void RlvGiveToRLVOffer::onCategoryCreateCallback(const LLSD& sdData, void* pInstance)
|
||||
{
|
||||
RlvGiveToRLVOffer* pThis = (RlvGiveToRLVOffer*)pInstance;
|
||||
|
||||
LLUUID idFolder = sdData["folder_id"].asUUID();
|
||||
if (idFolder.isNull())
|
||||
{
|
||||
// Problem encountered, abort move
|
||||
pThis->onDestinationCreated(LLUUID::null, LLStringUtil::null);
|
||||
return;
|
||||
}
|
||||
|
||||
while (pThis->m_DestPath.size() > 1)
|
||||
{
|
||||
std::string strFolder = pThis->m_DestPath.front();
|
||||
pThis->m_DestPath.pop_front();
|
||||
|
||||
const LLViewerInventoryCategory* pFolder = RlvInventory::instance().getSharedFolder(idFolder, strFolder, false);
|
||||
if (pFolder)
|
||||
{
|
||||
idFolder = pFolder->getUUID();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLInventoryObject::correctInventoryName(strFolder);
|
||||
const LLUUID idTemp = gInventory.createNewCategory(idFolder, LLFolderType::FT_NONE, strFolder, onCategoryCreateCallback, pInstance);
|
||||
if (idTemp.notNull())
|
||||
onCategoryCreateCallback(LLSD().with("folder_id", idTemp), pInstance);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Destination folder should exist at this point (we'll be deallocated when the function returns)
|
||||
pThis->onDestinationCreated(idFolder, pThis->m_DestPath.front());
|
||||
}
|
||||
|
||||
// Checked: 2014-01-07 (RLVa-1.4.10)
|
||||
void RlvGiveToRLVOffer::moveAndRename(const LLUUID& idFolder, const LLUUID& idDestination, const std::string& strName)
|
||||
{
|
||||
const LLViewerInventoryCategory* pDest = gInventory.getCategory(idDestination);
|
||||
const LLViewerInventoryCategory* pFolder = gInventory.getCategory(idFolder);
|
||||
if ( (pDest) && (pFolder) )
|
||||
{
|
||||
LLPointer<LLViewerInventoryCategory> pNewFolder = new LLViewerInventoryCategory(pFolder);
|
||||
if (pDest->getUUID() != pFolder->getParentUUID())
|
||||
{
|
||||
LLInventoryModel::update_list_t update;
|
||||
LLInventoryModel::LLCategoryUpdate updOldParent(pFolder->getParentUUID(), -1);
|
||||
update.push_back(updOldParent);
|
||||
LLInventoryModel::LLCategoryUpdate updNewParent(pDest->getUUID(), 1);
|
||||
update.push_back(updNewParent);
|
||||
gInventory.accountForUpdate(update);
|
||||
|
||||
pNewFolder->setParent(pDest->getUUID());
|
||||
pNewFolder->updateParentOnServer(FALSE);
|
||||
}
|
||||
|
||||
pNewFolder->rename(strName);
|
||||
pNewFolder->updateServer(FALSE);
|
||||
gInventory.updateCategory(pNewFolder);
|
||||
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0)
|
||||
void RlvGiveToRLVTaskOffer::changed(U32 mask)
|
||||
{
|
||||
if (mask & LLInventoryObserver::ADD)
|
||||
@@ -513,10 +607,10 @@ void RlvGiveToRLVTaskOffer::changed(U32 mask)
|
||||
{
|
||||
LLUUID idTransaction;
|
||||
pMsg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, idTransaction);
|
||||
if(m_idTransaction == idTransaction)
|
||||
if (m_idTransaction == idTransaction)
|
||||
{
|
||||
LLUUID idInvObject;
|
||||
for(S32 idxBlock = 0, cntBlock = pMsg->getNumberOfBlocksFast(_PREHASH_FolderData); idxBlock < cntBlock; idxBlock++)
|
||||
for (S32 idxBlock = 0, cntBlock = pMsg->getNumberOfBlocksFast(_PREHASH_FolderData); idxBlock < cntBlock; idxBlock++)
|
||||
{
|
||||
pMsg->getUUIDFast(_PREHASH_FolderData, _PREHASH_FolderID, idInvObject, idxBlock);
|
||||
if ( (idInvObject.notNull()) && (std::find(m_Folders.begin(), m_Folders.end(), idInvObject) == m_Folders.end()) )
|
||||
@@ -529,7 +623,7 @@ void RlvGiveToRLVTaskOffer::changed(U32 mask)
|
||||
}
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0)
|
||||
void RlvGiveToRLVTaskOffer::done()
|
||||
{
|
||||
gInventory.removeObserver(this);
|
||||
@@ -538,37 +632,28 @@ void RlvGiveToRLVTaskOffer::done()
|
||||
doOnIdleOneTime(boost::bind(&RlvGiveToRLVTaskOffer::doneIdle, this));
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
|
||||
// Checked: 2014-01-07 (RLVa-1.4.10)
|
||||
void RlvGiveToRLVTaskOffer::doneIdle()
|
||||
{
|
||||
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
|
||||
if (pRlvRoot)
|
||||
const LLViewerInventoryCategory* pFolder = (m_Folders.size()) ? gInventory.getCategory(m_Folders.front()) : NULL;
|
||||
if ( (!pFolder) || (!createDestinationFolder(pFolder->getName())) )
|
||||
delete this;
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
|
||||
void RlvGiveToRLVTaskOffer::onDestinationCreated(const LLUUID& idFolder, const std::string& strName)
|
||||
{
|
||||
const LLViewerInventoryCategory* pTarget = (idFolder.notNull()) ? gInventory.getCategory(idFolder) : NULL;
|
||||
if (pTarget)
|
||||
{
|
||||
for (folder_ref_t::const_iterator itFolder = m_Folders.begin(); itFolder != m_Folders.end(); ++itFolder)
|
||||
{
|
||||
const LLViewerInventoryCategory* pFolder = gInventory.getCategory(*itFolder);
|
||||
if (!pFolder)
|
||||
continue;
|
||||
|
||||
std::string strFolder = pFolder->getName();
|
||||
if ( (pRlvRoot->getUUID() == pFolder->getParentUUID() ) && (strFolder.find(RLV_PUTINV_PREFIX) == 0))
|
||||
{
|
||||
LLPointer<LLViewerInventoryCategory> pNewFolder = new LLViewerInventoryCategory(pFolder);
|
||||
pNewFolder->rename(strFolder.erase(0, strFolder.find(RLV_FOLDER_PREFIX_PUTINV)));
|
||||
pNewFolder->updateServer(FALSE);
|
||||
gInventory.updateCategory(pNewFolder);
|
||||
|
||||
RlvBehaviourNotifyHandler::sendNotification("accepted_in_rlv inv_offer " + pNewFolder->getName());
|
||||
|
||||
gInventory.notifyObservers();
|
||||
break;
|
||||
}
|
||||
}
|
||||
const LLUUID& idOfferedFolder = m_Folders.front();
|
||||
moveAndRename(idOfferedFolder, idFolder, strName);
|
||||
RlvBehaviourNotifyHandler::sendNotification("accepted_in_rlv inv_offer " + RlvInventory::instance().getSharedPath(idOfferedFolder));
|
||||
}
|
||||
delete this;
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
|
||||
// Checked: 2014-01-07 (RLVa-1.4.10)
|
||||
void RlvGiveToRLVAgentOffer::done()
|
||||
{
|
||||
gInventory.removeObserver(this);
|
||||
@@ -577,33 +662,19 @@ void RlvGiveToRLVAgentOffer::done()
|
||||
doOnIdleOneTime(boost::bind(&RlvGiveToRLVAgentOffer::doneIdle, this));
|
||||
}
|
||||
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0e) | Modified: RLVa-1.2.0e
|
||||
// Checked: 2014-01-07 (RLVa-1.4.10)
|
||||
void RlvGiveToRLVAgentOffer::doneIdle()
|
||||
{
|
||||
const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot();
|
||||
const LLViewerInventoryCategory* pFolder = (mComplete.size()) ? gInventory.getCategory(mComplete[0]) : NULL;
|
||||
if ( (pRlvRoot) && (pFolder) )
|
||||
{
|
||||
std::string strName = pFolder->getName();
|
||||
if (strName.find(RLV_PUTINV_PREFIX) == 0)
|
||||
{
|
||||
LLInventoryModel::update_list_t update;
|
||||
LLInventoryModel::LLCategoryUpdate updOldParent(pFolder->getParentUUID(), -1);
|
||||
update.push_back(updOldParent);
|
||||
LLInventoryModel::LLCategoryUpdate updNewParent(pRlvRoot->getUUID(), 1);
|
||||
update.push_back(updNewParent);
|
||||
gInventory.accountForUpdate(update);
|
||||
const LLViewerInventoryCategory* pFolder = (mComplete.size()) ? gInventory.getCategory(mComplete.front()) : NULL;
|
||||
if ( (!pFolder) || (!createDestinationFolder(pFolder->getName())) )
|
||||
delete this;
|
||||
}
|
||||
|
||||
LLPointer<LLViewerInventoryCategory> pNewFolder = new LLViewerInventoryCategory(pFolder);
|
||||
pNewFolder->setParent(pRlvRoot->getUUID());
|
||||
pNewFolder->updateParentOnServer(FALSE);
|
||||
pNewFolder->rename(strName.erase(0, strName.find(RLV_FOLDER_PREFIX_PUTINV)));
|
||||
pNewFolder->updateServer(FALSE);
|
||||
gInventory.updateCategory(pNewFolder);
|
||||
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
}
|
||||
// Checked: 2010-04-18 (RLVa-1.2.0)
|
||||
void RlvGiveToRLVAgentOffer::onDestinationCreated(const LLUUID& idFolder, const std::string& strName)
|
||||
{
|
||||
if ( (idFolder.notNull()) && (mComplete.size()) )
|
||||
moveAndRename(mComplete[0], idFolder, strName);
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2011, Kitty Barnett
|
||||
* Copyright (c) 2009-2014, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||
@@ -54,11 +54,12 @@ public:
|
||||
LLViewerInventoryCategory* getSharedRoot() const;
|
||||
const LLUUID& getSharedRootID() const;
|
||||
// Returns a subfolder of idParent that starts with strFolderName (exact match > partial match)
|
||||
LLViewerInventoryCategory* getSharedFolder(const LLUUID& idParent, const std::string& strFolderName) const;
|
||||
LLViewerInventoryCategory* getSharedFolder(const LLUUID& idParent, const std::string& strFolderName, bool fMatchPartial = true) const;
|
||||
// Looks up a folder from a path (relative to the shared root)
|
||||
LLViewerInventoryCategory* getSharedFolder(const std::string& strPath) const;
|
||||
LLViewerInventoryCategory* getSharedFolder(const std::string& strPath, bool fMatchPartial = true) const;
|
||||
// Returns the path of the supplied folder (relative to the shared root)
|
||||
std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const;
|
||||
std::string getSharedPath(const LLUUID& idFolder) const;
|
||||
// Returns TRUE if the supplied folder is a descendent of the #RLV folder
|
||||
bool isSharedFolder(const LLUUID& idFolder);
|
||||
|
||||
@@ -118,30 +119,51 @@ protected:
|
||||
// "Give to #RLV" helper classes
|
||||
//
|
||||
|
||||
class RlvGiveToRLVOffer
|
||||
{
|
||||
protected:
|
||||
RlvGiveToRLVOffer(){}
|
||||
virtual ~RlvGiveToRLVOffer() {}
|
||||
protected:
|
||||
bool createDestinationFolder(const std::string& strPath);
|
||||
virtual void onDestinationCreated(const LLUUID& idFolder, const std::string& strName) = 0;
|
||||
void moveAndRename(const LLUUID& idFolder, const LLUUID& idDestination, const std::string& strName);
|
||||
private:
|
||||
static void onCategoryCreateCallback(const LLSD& sdData, void* pInstance);
|
||||
|
||||
private:
|
||||
std::list<std::string> m_DestPath;
|
||||
};
|
||||
|
||||
// [See LLInventoryTransactionObserver which says it's not entirely complete?]
|
||||
// NOTE: the offer may span mulitple BulkUpdateInventory messages so if we're no longer around then (ie due to "delete this") then
|
||||
// we'll miss those; in this specific case we only care about the *folder* though and that will be in the very first message
|
||||
class RlvGiveToRLVTaskOffer : public LLInventoryObserver
|
||||
class RlvGiveToRLVTaskOffer : public LLInventoryObserver, public RlvGiveToRLVOffer
|
||||
{
|
||||
public:
|
||||
RlvGiveToRLVTaskOffer(const LLUUID& idTransaction) : m_idTransaction(idTransaction) {}
|
||||
RlvGiveToRLVTaskOffer(const LLUUID& idTransaction) : RlvGiveToRLVOffer(), m_idTransaction(idTransaction) {}
|
||||
/*virtual*/ void changed(U32 mask);
|
||||
protected:
|
||||
/*virtual*/ void done();
|
||||
void doneIdle();
|
||||
/*virtual*/ void onDestinationCreated(const LLUUID& idFolder, const std::string& strName);
|
||||
|
||||
protected:
|
||||
typedef std::vector<LLUUID> folder_ref_t;
|
||||
folder_ref_t m_Folders;
|
||||
LLUUID m_idTransaction;
|
||||
};
|
||||
|
||||
class RlvGiveToRLVAgentOffer : public LLInventoryFetchDescendentsObserver
|
||||
class RlvGiveToRLVAgentOffer : public LLInventoryFetchDescendentsObserver, public RlvGiveToRLVOffer
|
||||
{
|
||||
public:
|
||||
RlvGiveToRLVAgentOffer(const LLUUID& idFolder) : LLInventoryFetchDescendentsObserver(idFolder) {}
|
||||
RlvGiveToRLVAgentOffer(const LLUUID& idFolder) : LLInventoryFetchDescendentsObserver(idFolder), RlvGiveToRLVOffer() {}
|
||||
/*virtual*/ ~RlvGiveToRLVAgentOffer() {}
|
||||
public:
|
||||
/*virtual*/ void done();
|
||||
protected:
|
||||
void doneIdle();
|
||||
/*virtual*/ void onDestinationCreated(const LLUUID& idFolder, const std::string& strName);
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
@@ -269,6 +291,12 @@ inline const LLUUID& RlvInventory::getFoldedParent(const LLUUID& idFolder, bool
|
||||
return (pFolder) ? pFolder->getUUID() : LLUUID::null;
|
||||
}
|
||||
|
||||
// Checked: 2011-11-26 (RLVa-1.5.4a) | Added: RLVa-1.5.4a
|
||||
inline std::string RlvInventory::getSharedPath(const LLUUID& idFolder) const
|
||||
{
|
||||
return getSharedPath(gInventory.getCategory(idFolder));
|
||||
}
|
||||
|
||||
// Checked: 2010-03-19 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||
inline bool RlvInventory::isFoldedFolder(const LLInventoryCategory* pFolder, bool fCheckComposite)
|
||||
{
|
||||
|
||||
@@ -562,25 +562,6 @@ void RlvAttachmentLockWatchdog::detach(const LLViewerObject* pAttachObj)
|
||||
m_PendingDetach.push_back(pAttachObj->getAttachmentItemID());
|
||||
|
||||
gMessageSystem->sendReliable(gAgent.getRegionHost() );
|
||||
|
||||
// HACK-RLVa: force the region to send out an ObjectUpdate for the old attachment so obsolete viewers will remember it exists
|
||||
S32 idxAttachPt = RlvAttachPtLookup::getAttachPointIndex(pAttachObj);
|
||||
const LLViewerJointAttachment* pAttachPt =
|
||||
(isAgentAvatarValid()) ? get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)idxAttachPt, (LLViewerJointAttachment*)NULL) : NULL;
|
||||
if ( (pAttachPt) && (!pAttachPt->getIsHUDAttachment()) && (pAttachPt->mAttachedObjects.size() > 1) )
|
||||
{
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator itAttachObj = pAttachPt->mAttachedObjects.begin();
|
||||
itAttachObj != pAttachPt->mAttachedObjects.end(); ++itAttachObj)
|
||||
{
|
||||
if (pAttachObj != *itAttachObj)
|
||||
{
|
||||
LLSelectMgr::instance().deselectAll();
|
||||
LLSelectMgr::instance().selectObjectAndFamily(*itAttachObj);
|
||||
LLSelectMgr::instance().deselectAll();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,22 +598,6 @@ void RlvAttachmentLockWatchdog::detach(S32 idxAttachPt, const uuid_vec_t& idsAtt
|
||||
}
|
||||
|
||||
gMessageSystem->sendReliable(gAgent.getRegionHost());
|
||||
|
||||
// HACK-RLVa: force the region to send out an ObjectUpdate for the old attachment so obsolete viewers will remember it exists
|
||||
if ( (!pAttachPt->getIsHUDAttachment()) && (pAttachPt->mAttachedObjects.size() > attachObjs.size()) )
|
||||
{
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator itAttachObj = pAttachPt->mAttachedObjects.begin();
|
||||
itAttachObj != pAttachPt->mAttachedObjects.end(); ++itAttachObj)
|
||||
{
|
||||
if (std::find(attachObjs.begin(), attachObjs.end(), *itAttachObj) == attachObjs.end())
|
||||
{
|
||||
LLSelectMgr::instance().deselectAll();
|
||||
LLSelectMgr::instance().selectObjectAndFamily(*itAttachObj);
|
||||
LLSelectMgr::instance().deselectAll();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user