diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-16 16:11:53 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-16 16:11:53 -0500 |
commit | 66e7ca7c7af325f1541098abfc166f6bfde60813 (patch) | |
tree | 50510fa066e05fdc9b8fac7dbcf3a1e22d7457a6 /indra/newview/llinventorybridge.cpp | |
parent | a13be32d8030660b067b74c4e368b656bf6da19e (diff) |
EXT-2524 : Disable ability to make links manually in non-god mode
Non-god mode treatment of copy/paste is now consistent with 1.23 behavior, and "paste as linK" doesn't show up in non-god mode.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7587149ac2..cf944b5823 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -606,10 +606,13 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Paste")); } - items.push_back(std::string("Paste As Link")); - if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + if (gAgent.isGodlike()) { - disabled_items.push_back(std::string("Paste As Link")); + items.push_back(std::string("Paste As Link")); + if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Paste As Link")); + } } items.push_back(std::string("Paste Separator")); @@ -1351,17 +1354,27 @@ BOOL LLItemBridge::isItemCopyable() const return FALSE; } - // All items can be copied, not all can be pasted. - // The only time an item can't be copied is if it's a link - // return (item->getPermissions().allowCopyBy(gAgent.getID())); + // You can never copy a link. if (item->getIsLinkType()) { return FALSE; } - return TRUE; + + if (gAgent.isGodlike()) + { + // All items can be copied in god mode since you can + // at least paste-as-link the item, though you + // still may not be able paste the item. + return TRUE; + } + else + { + return (item->getPermissions().allowCopyBy(gAgent.getID())); + } } return FALSE; } + BOOL LLItemBridge::copyToClipboard() const { if(isItemCopyable()) |