There are no grids that don't support links.

Conflicts:
	indra/newview/llinventorybridge.cpp
This commit is contained in:
Inusaito Sayori
2015-08-01 19:10:56 -04:00
parent 383cd45432
commit 773a2a3855
7 changed files with 13 additions and 68 deletions

View File

@@ -34,7 +34,6 @@
#include "llsd.h"
#include "message.h"
#include <boost/tokenizer.hpp>
#include "../newview/hippogridmanager.h"
#include "llsdutil.h"
@@ -545,10 +544,6 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
S8 type;
msg->getS8Fast(block, _PREHASH_Type, type, block_num);
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);
mInventoryType = static_cast<LLInventoryType::EType>(type);
mPermissions.initMasks(mInventoryType);
@@ -1132,11 +1127,6 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
S8 type = (U8)sd[w].asInteger();
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;
if (sd.has(w))

View File

@@ -18,7 +18,6 @@
<key>register</key><string>http://secondlife.com/registration/</string>
<key>password</key><string>http://secondlife.com/account/request.php</string>
<key>render_compat</key><boolean>1</boolean>
<key>inventory_links</key><boolean>1</boolean>
<key>auto_update</key><boolean>0</boolean>
<key>locked</key><boolean>1</boolean>
</map>
@@ -35,7 +34,6 @@
<key>support</key><string>http://secondlife.com/support/</string>
<key>register</key><string>http://secondlife.com/registration/</string>
<key>render_compat</key><boolean>0</boolean>
<key>inventory_links</key><boolean>1</boolean>
<key>auto_update</key><boolean>0</boolean>
</map>
@@ -45,7 +43,6 @@
<key>gridname</key> <string>OSGrid</string>
<key>gridnick</key> <string>osgrid</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>loginuri</key> <string>http://login.osgrid.org/</string>
<key>password</key> <string>http://www.osgrid.org/</string>

View File

@@ -56,7 +56,6 @@ HippoGridInfo::HippoGridInfo(const std::string& gridName) :
mIsInProductionGrid(false),
mIsInAvination(false),
mRenderCompat(true),
mInvLinks(false),
mAutoUpdate(false),
mLocked(false),
mMaxAgentGroups(-1),
@@ -536,23 +535,6 @@ void HippoGridInfo::initFallback()
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()
{
if(isSecondLife())
@@ -915,7 +897,6 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]);
if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]);
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("locked")) grid->mLocked = gridMap["locked"];
if (newGrid) addGrid(grid);
@@ -952,7 +933,6 @@ void HippoGridManager::saveFile()
gridInfo[i]["search"] = grid->getSearchUrl();
gridInfo[i]["render_compat"] = grid->isRenderCompat();
gridInfo[i]["inventory_links"] = grid->supportsInvLinks();
gridInfo[i]["auto_update"] = grid->getAutoUpdate();
gridInfo[i]["locked"] = grid->getLocked();
}

View File

@@ -90,8 +90,6 @@ public:
void setRealCurrencySymbol(const std::string& sym);
void setClassifiedFee(int fee) { mClassifiedFee = fee; }
void setDirectoryFee(int fee) { mDirectoryFee = fee; }
bool supportsInvLinks();
void setSupportsInvLinks(bool b);
bool getAutoUpdate();
bool getLocked() { return mLocked; }
@@ -119,7 +117,6 @@ private:
bool mIsInProductionGrid;
bool mIsInAvination;
bool mRenderCompat;
bool mInvLinks;
bool mAutoUpdate;
bool mLocked;
bool mUPCSupported;

View File

@@ -98,11 +98,6 @@
#define ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU 1
#define BLOCK_WORN_ITEMS_IN_OUTBOX 1
bool InventoryLinksEnabled()
{
return gHippoGridManager->getConnectedGrid()->supportsInvLinks();
}
typedef std::pair<LLUUID, LLUUID> two_uuids_t;
typedef std::list<two_uuids_t> two_uuids_list_t;
@@ -574,10 +569,6 @@ bool LLInvFVBridge::isClipboardPasteableAsCopy() const
BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
{
if (!InventoryLinksEnabled())
{
return FALSE;
}
if (!LLInventoryClipboard::instance().hasContents() || !isAgentInventory())
{
return FALSE;
@@ -814,7 +805,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
{
items.push_back(std::string("Paste"));
// Paste as copy if we have links.
if (InventoryLinksEnabled() && isClipboardPasteableAsCopy())
if (isClipboardPasteableAsCopy())
{
items.push_back(std::string("Paste As Copy"));
paste_as_copy = true;
@@ -827,7 +818,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
paste_as_copy = false;
}
if (!paste_as_copy && InventoryLinksEnabled())
if (!paste_as_copy)
{
items.push_back(std::string("Paste As Link"));
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
// 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]
// 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);
const U32 num_links = item_array.size();
if (num_links > 0)
{
// Warn if the user is will break any links when deleting this item.
LLNotifications::instance().add(params);
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);
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"
return (item->getPermissions().allowCopyBy(gAgent.getID())) || (LLAssetType::lookupCanLink(item->getType()));
// [/SL:KB]
// return item->getPermissions().allowCopyBy(gAgent.getID()) || InventoryLinksEnabled();
// return item->getPermissions().allowCopyBy(gAgent.getID());
}
return FALSE;
}

View File

@@ -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>("Cancel")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::close, this, _1));
getChild<LLUICtrl>("Check All")->setCommitCallback(boost::bind(&LLMakeOutfitDialog::onCheckAll, this, true));
@@ -140,7 +133,7 @@ void LLMakeOutfitDialog::refresh()
if (fUseOutfits)
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);
}

View File

@@ -4370,7 +4370,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace)
if (0 == attachment_point ||
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
// "Attach to..." context menu item, so we should add, not replace.