From 66e7ca7c7af325f1541098abfc166f6bfde60813 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 16 Dec 2009 16:11:53 -0500 Subject: 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 --- indra/newview/llinventorybridge.cpp | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') 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()) -- cgit v1.2.3