There are no grids that don't support links.
Conflicts: indra/newview/llinventorybridge.cpp
This commit is contained in:
@@ -34,7 +34,6 @@
|
|||||||
#include "llsd.h"
|
#include "llsd.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include <boost/tokenizer.hpp>
|
#include <boost/tokenizer.hpp>
|
||||||
#include "../newview/hippogridmanager.h"
|
|
||||||
|
|
||||||
#include "llsdutil.h"
|
#include "llsdutil.h"
|
||||||
|
|
||||||
@@ -545,10 +544,6 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
|
|||||||
S8 type;
|
S8 type;
|
||||||
msg->getS8Fast(block, _PREHASH_Type, type, block_num);
|
msg->getS8Fast(block, _PREHASH_Type, type, block_num);
|
||||||
mType = static_cast<LLAssetType::EType>(type);
|
mType = static_cast<LLAssetType::EType>(type);
|
||||||
if (mType == LLAssetType::AT_LINK || mType == LLAssetType::AT_LINK_FOLDER)
|
|
||||||
{
|
|
||||||
gHippoGridManager->getConnectedGrid()->setSupportsInvLinks(true);
|
|
||||||
}
|
|
||||||
msg->getS8(block, "InvType", type, block_num);
|
msg->getS8(block, "InvType", type, block_num);
|
||||||
mInventoryType = static_cast<LLInventoryType::EType>(type);
|
mInventoryType = static_cast<LLInventoryType::EType>(type);
|
||||||
mPermissions.initMasks(mInventoryType);
|
mPermissions.initMasks(mInventoryType);
|
||||||
@@ -1132,11 +1127,6 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
|
|||||||
S8 type = (U8)sd[w].asInteger();
|
S8 type = (U8)sd[w].asInteger();
|
||||||
mType = static_cast<LLAssetType::EType>(type);
|
mType = static_cast<LLAssetType::EType>(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mType == LLAssetType::AT_LINK || mType == LLAssetType::AT_LINK_FOLDER)
|
|
||||||
{
|
|
||||||
gHippoGridManager->getConnectedGrid()->setSupportsInvLinks(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
w = INV_INVENTORY_TYPE_LABEL;
|
w = INV_INVENTORY_TYPE_LABEL;
|
||||||
if (sd.has(w))
|
if (sd.has(w))
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
<key>register</key><string>http://secondlife.com/registration/</string>
|
<key>register</key><string>http://secondlife.com/registration/</string>
|
||||||
<key>password</key><string>http://secondlife.com/account/request.php</string>
|
<key>password</key><string>http://secondlife.com/account/request.php</string>
|
||||||
<key>render_compat</key><boolean>1</boolean>
|
<key>render_compat</key><boolean>1</boolean>
|
||||||
<key>inventory_links</key><boolean>1</boolean>
|
|
||||||
<key>auto_update</key><boolean>0</boolean>
|
<key>auto_update</key><boolean>0</boolean>
|
||||||
<key>locked</key><boolean>1</boolean>
|
<key>locked</key><boolean>1</boolean>
|
||||||
</map>
|
</map>
|
||||||
@@ -35,7 +34,6 @@
|
|||||||
<key>support</key><string>http://secondlife.com/support/</string>
|
<key>support</key><string>http://secondlife.com/support/</string>
|
||||||
<key>register</key><string>http://secondlife.com/registration/</string>
|
<key>register</key><string>http://secondlife.com/registration/</string>
|
||||||
<key>render_compat</key><boolean>0</boolean>
|
<key>render_compat</key><boolean>0</boolean>
|
||||||
<key>inventory_links</key><boolean>1</boolean>
|
|
||||||
<key>auto_update</key><boolean>0</boolean>
|
<key>auto_update</key><boolean>0</boolean>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
@@ -45,7 +43,6 @@
|
|||||||
<key>gridname</key> <string>OSGrid</string>
|
<key>gridname</key> <string>OSGrid</string>
|
||||||
<key>gridnick</key> <string>osgrid</string>
|
<key>gridnick</key> <string>osgrid</string>
|
||||||
<key>helperuri</key> <string>http://helper.osgrid.org/</string>
|
<key>helperuri</key> <string>http://helper.osgrid.org/</string>
|
||||||
<key>inventory_links</key> <boolean>0</boolean>
|
|
||||||
<key>loginpage</key> <string>http://www.osgrid.org/splash/</string>
|
<key>loginpage</key> <string>http://www.osgrid.org/splash/</string>
|
||||||
<key>loginuri</key> <string>http://login.osgrid.org/</string>
|
<key>loginuri</key> <string>http://login.osgrid.org/</string>
|
||||||
<key>password</key> <string>http://www.osgrid.org/</string>
|
<key>password</key> <string>http://www.osgrid.org/</string>
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ HippoGridInfo::HippoGridInfo(const std::string& gridName) :
|
|||||||
mIsInProductionGrid(false),
|
mIsInProductionGrid(false),
|
||||||
mIsInAvination(false),
|
mIsInAvination(false),
|
||||||
mRenderCompat(true),
|
mRenderCompat(true),
|
||||||
mInvLinks(false),
|
|
||||||
mAutoUpdate(false),
|
mAutoUpdate(false),
|
||||||
mLocked(false),
|
mLocked(false),
|
||||||
mMaxAgentGroups(-1),
|
mMaxAgentGroups(-1),
|
||||||
@@ -536,23 +535,6 @@ void HippoGridInfo::initFallback()
|
|||||||
FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/");
|
FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HippoGridInfo::supportsInvLinks()
|
|
||||||
{
|
|
||||||
if(isSecondLife())
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return mInvLinks;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HippoGridInfo::setSupportsInvLinks(bool b)
|
|
||||||
{
|
|
||||||
if (b == true && mInvLinks == false)
|
|
||||||
{
|
|
||||||
LL_INFOS() << "Inventory Link support detected" << LL_ENDL;
|
|
||||||
}
|
|
||||||
mInvLinks = b;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HippoGridInfo::getAutoUpdate()
|
bool HippoGridInfo::getAutoUpdate()
|
||||||
{
|
{
|
||||||
if(isSecondLife())
|
if(isSecondLife())
|
||||||
@@ -915,7 +897,6 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
|
|||||||
if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]);
|
if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]);
|
||||||
if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]);
|
if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]);
|
||||||
if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]);
|
if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]);
|
||||||
if (gridMap.has("inventory_links")) grid->setSupportsInvLinks(gridMap["inventory_links"]);
|
|
||||||
if (gridMap.has("auto_update")) grid->mAutoUpdate = gridMap["auto_update"];
|
if (gridMap.has("auto_update")) grid->mAutoUpdate = gridMap["auto_update"];
|
||||||
if (gridMap.has("locked")) grid->mLocked = gridMap["locked"];
|
if (gridMap.has("locked")) grid->mLocked = gridMap["locked"];
|
||||||
if (newGrid) addGrid(grid);
|
if (newGrid) addGrid(grid);
|
||||||
@@ -952,7 +933,6 @@ void HippoGridManager::saveFile()
|
|||||||
|
|
||||||
gridInfo[i]["search"] = grid->getSearchUrl();
|
gridInfo[i]["search"] = grid->getSearchUrl();
|
||||||
gridInfo[i]["render_compat"] = grid->isRenderCompat();
|
gridInfo[i]["render_compat"] = grid->isRenderCompat();
|
||||||
gridInfo[i]["inventory_links"] = grid->supportsInvLinks();
|
|
||||||
gridInfo[i]["auto_update"] = grid->getAutoUpdate();
|
gridInfo[i]["auto_update"] = grid->getAutoUpdate();
|
||||||
gridInfo[i]["locked"] = grid->getLocked();
|
gridInfo[i]["locked"] = grid->getLocked();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,8 +90,6 @@ public:
|
|||||||
void setRealCurrencySymbol(const std::string& sym);
|
void setRealCurrencySymbol(const std::string& sym);
|
||||||
void setClassifiedFee(int fee) { mClassifiedFee = fee; }
|
void setClassifiedFee(int fee) { mClassifiedFee = fee; }
|
||||||
void setDirectoryFee(int fee) { mDirectoryFee = fee; }
|
void setDirectoryFee(int fee) { mDirectoryFee = fee; }
|
||||||
bool supportsInvLinks();
|
|
||||||
void setSupportsInvLinks(bool b);
|
|
||||||
bool getAutoUpdate();
|
bool getAutoUpdate();
|
||||||
bool getLocked() { return mLocked; }
|
bool getLocked() { return mLocked; }
|
||||||
|
|
||||||
@@ -119,7 +117,6 @@ private:
|
|||||||
bool mIsInProductionGrid;
|
bool mIsInProductionGrid;
|
||||||
bool mIsInAvination;
|
bool mIsInAvination;
|
||||||
bool mRenderCompat;
|
bool mRenderCompat;
|
||||||
bool mInvLinks;
|
|
||||||
bool mAutoUpdate;
|
bool mAutoUpdate;
|
||||||
bool mLocked;
|
bool mLocked;
|
||||||
bool mUPCSupported;
|
bool mUPCSupported;
|
||||||
|
|||||||
@@ -98,11 +98,6 @@
|
|||||||
#define ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU 1
|
#define ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU 1
|
||||||
#define BLOCK_WORN_ITEMS_IN_OUTBOX 1
|
#define BLOCK_WORN_ITEMS_IN_OUTBOX 1
|
||||||
|
|
||||||
bool InventoryLinksEnabled()
|
|
||||||
{
|
|
||||||
return gHippoGridManager->getConnectedGrid()->supportsInvLinks();
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef std::pair<LLUUID, LLUUID> two_uuids_t;
|
typedef std::pair<LLUUID, LLUUID> two_uuids_t;
|
||||||
typedef std::list<two_uuids_t> two_uuids_list_t;
|
typedef std::list<two_uuids_t> two_uuids_list_t;
|
||||||
|
|
||||||
@@ -574,10 +569,6 @@ bool LLInvFVBridge::isClipboardPasteableAsCopy() const
|
|||||||
|
|
||||||
BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
|
BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
|
||||||
{
|
{
|
||||||
if (!InventoryLinksEnabled())
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
if (!LLInventoryClipboard::instance().hasContents() || !isAgentInventory())
|
if (!LLInventoryClipboard::instance().hasContents() || !isAgentInventory())
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -814,7 +805,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
|
|||||||
{
|
{
|
||||||
items.push_back(std::string("Paste"));
|
items.push_back(std::string("Paste"));
|
||||||
// Paste as copy if we have links.
|
// Paste as copy if we have links.
|
||||||
if (InventoryLinksEnabled() && isClipboardPasteableAsCopy())
|
if (isClipboardPasteableAsCopy())
|
||||||
{
|
{
|
||||||
items.push_back(std::string("Paste As Copy"));
|
items.push_back(std::string("Paste As Copy"));
|
||||||
paste_as_copy = true;
|
paste_as_copy = true;
|
||||||
@@ -827,7 +818,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
|
|||||||
paste_as_copy = false;
|
paste_as_copy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!paste_as_copy && InventoryLinksEnabled())
|
if (!paste_as_copy)
|
||||||
{
|
{
|
||||||
items.push_back(std::string("Paste As Link"));
|
items.push_back(std::string("Paste As Link"));
|
||||||
if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
|
if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
|
||||||
@@ -1852,21 +1843,18 @@ BOOL LLItemBridge::removeItem()
|
|||||||
// [SL:KB] - Patch: Inventory-Links | Checked: 2010-06-01 (Catznip-2.2.0a) | Added: Catznip-2.0.1a
|
// [SL:KB] - Patch: Inventory-Links | Checked: 2010-06-01 (Catznip-2.2.0a) | Added: Catznip-2.0.1a
|
||||||
// Users move folders around and reuse links that way... if we know something has links then it's just bad not to warn them :|
|
// Users move folders around and reuse links that way... if we know something has links then it's just bad not to warn them :|
|
||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
// if (!InventoryLinksEnabled())
|
if (!item->getIsLinkType())
|
||||||
{
|
{
|
||||||
if (!item->getIsLinkType())
|
LLInventoryModel::item_array_t item_array = gInventory.collectLinksTo(mUUID);
|
||||||
|
const U32 num_links = item_array.size();
|
||||||
|
if (num_links > 0)
|
||||||
{
|
{
|
||||||
LLInventoryModel::item_array_t item_array = gInventory.collectLinksTo(mUUID);
|
// Warn if the user is will break any links when deleting this item.
|
||||||
const U32 num_links = item_array.size();
|
LLNotifications::instance().add(params);
|
||||||
if (num_links > 0)
|
return FALSE;
|
||||||
{
|
|
||||||
// Warn if the user is will break any links when deleting this item.
|
|
||||||
LLNotifications::instance().add(params);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLNotifications::instance().forceResponse(params, 0);
|
LLNotifications::instance().forceResponse(params, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1924,7 +1912,7 @@ BOOL LLItemBridge::isItemCopyable() const
|
|||||||
// NOTE: we do *not* want to return TRUE on everything like LL seems to do in SL-2.1.0 because not all types are "linkable"
|
// NOTE: we do *not* want to return TRUE on everything like LL seems to do in SL-2.1.0 because not all types are "linkable"
|
||||||
return (item->getPermissions().allowCopyBy(gAgent.getID())) || (LLAssetType::lookupCanLink(item->getType()));
|
return (item->getPermissions().allowCopyBy(gAgent.getID())) || (LLAssetType::lookupCanLink(item->getType()));
|
||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
// return item->getPermissions().allowCopyBy(gAgent.getID()) || InventoryLinksEnabled();
|
// return item->getPermissions().allowCopyBy(gAgent.getID());
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,13 +85,6 @@ LLMakeOutfitDialog::LLMakeOutfitDialog(bool modal) : LLModalDialog(LLStringUtil:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
|
||||||
{
|
|
||||||
childSetValue("checkbox_use_links", false);
|
|
||||||
childSetEnabled("checkbox_use_outfits", false);
|
|
||||||
childSetValue("checkbox_use_outfits", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
getChild<LLUICtrl>("Save")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onSave, this));
|
getChild<LLUICtrl>("Save")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onSave, this));
|
||||||
getChild<LLUICtrl>("Cancel")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::close, this, _1));
|
getChild<LLUICtrl>("Cancel")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::close, this, _1));
|
||||||
getChild<LLUICtrl>("Check All")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onCheckAll, this, true));
|
getChild<LLUICtrl>("Check All")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onCheckAll, this, true));
|
||||||
@@ -140,7 +133,7 @@ void LLMakeOutfitDialog::refresh()
|
|||||||
if (fUseOutfits)
|
if (fUseOutfits)
|
||||||
pCheckCtrl->setValue(true);
|
pCheckCtrl->setValue(true);
|
||||||
}
|
}
|
||||||
getChild<LLUICtrl>("checkbox_use_links")->setEnabled(!fUseOutfits && gHippoGridManager->getConnectedGrid()->supportsInvLinks());
|
getChild<LLUICtrl>("checkbox_use_links")->setEnabled(!fUseOutfits);
|
||||||
getChild<LLUICtrl>("checkbox_legacy_copy_changes")->setEnabled(!fUseOutfits);
|
getChild<LLUICtrl>("checkbox_legacy_copy_changes")->setEnabled(!fUseOutfits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4370,7 +4370,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace)
|
|||||||
if (0 == attachment_point ||
|
if (0 == attachment_point ||
|
||||||
get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))
|
get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))
|
||||||
{
|
{
|
||||||
if ((!replace || attachment_point != 0) && gHippoGridManager->getConnectedGrid()->supportsInvLinks())
|
if (!replace || attachment_point != 0)
|
||||||
{
|
{
|
||||||
// If we know the attachment point then we got here by clicking an
|
// If we know the attachment point then we got here by clicking an
|
||||||
// "Attach to..." context menu item, so we should add, not replace.
|
// "Attach to..." context menu item, so we should add, not replace.
|
||||||
|
|||||||
Reference in New Issue
Block a user