[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:
Lirusaito
2014-03-12 19:41:15 -04:00
parent 30f5a3a162
commit ed8e37ed89
21 changed files with 355 additions and 204 deletions

View File

@@ -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)
{