MultiAttach unbork attempt

This commit is contained in:
Siana Gearz
2011-03-31 23:43:24 +02:00
parent 4b4096857f
commit b34d9fb88e
8 changed files with 29 additions and 16 deletions

View File

@@ -788,9 +788,12 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
{
return 0;
}
llassert(max_pixels >= 0.f);
llassert(max_chars >= 0);
//llassert(max_pixels >= 0.f);
//llassert(max_chars >= 0);
if(max_pixels < 0.f || max_chars < 0) {
return 0;
}
BOOL clip = FALSE;
F32 cur_x = 0;

View File

@@ -600,7 +600,14 @@ void HippoGridInfo::initFallback()
FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/");
}
bool HippoGridInfo::supportsInvLinks(){
if(isSecondLife())
return true;
else if(mLoginUri.find("avination.")!=std::string::npos)
return true;
else
return false;
}
// ********************************************************************
// ********************************************************************

View File

@@ -85,6 +85,7 @@ public:
void setCurrencySymbol(const std::string& sym);
void setRealCurrencySymbol(const std::string& sym);
void setDirectoryFee(int fee);
bool supportsInvLinks();
bool retrieveGridInfo();

View File

@@ -7367,10 +7367,10 @@ void LLAgent::makeNewOutfit(
return;
}
BOOL fUseLinks = gSavedSettings.getBOOL("UseInventoryLinks") &&
gHippoGridManager->getConnectedGrid()->isSecondLife();
BOOL fUseLinks = !gSavedSettings.getBOOL("UseInventoryLinks") ||
!gHippoGridManager->getConnectedGrid()->supportsInvLinks();
BOOL fUseOutfits = gSavedSettings.getBOOL("UseOutfitFolders") &&
gHippoGridManager->getConnectedGrid()->isSecondLife();
gHippoGridManager->getConnectedGrid()->supportsInvLinks();
LLAssetType::EType typeDest = (fUseOutfits) ? LLAssetType::AT_MY_OUTFITS : LLAssetType::AT_CLOTHING;
LLAssetType::EType typeFolder = (fUseOutfits) ? LLAssetType::AT_OUTFIT : LLAssetType::AT_NONE;
@@ -8483,10 +8483,11 @@ void LLAgent::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_
}
const LLInventoryItem* item = obj_item_array.get(i).get();
bool replace = !gHippoGridManager->getConnectedGrid()->supportsInvLinks();
msg->nextBlockFast(_PREHASH_ObjectData );
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD); // Wear at the previous or default attachment point
msg->addU8Fast(_PREHASH_AttachmentPt, replace? 0 : ATTACHMENT_ADD); // Wear at the previous or default attachment point
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
msg->addStringFast(_PREHASH_Name, item->getName());
msg->addStringFast(_PREHASH_Description, item->getDescription());

View File

@@ -220,11 +220,11 @@ public:
}
}
if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) {
if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) {
childSetEnabled("checkbox_use_links", FALSE);
childSetValue("checkbox_use_links", FALSE);
childSetEnabled("checkbox_use_outfits", FALSE);
childSetValue("checkbox_use_outfits", FALSE);
childSetValue("checkbox_use_outfits", FALSE);
}
childSetAction("Save", onSave, this );

View File

@@ -528,7 +528,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const
BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
{
if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
if (!gHippoGridManager->getConnectedGrid()->supportsInvLinks())
{
return FALSE;
}
@@ -1382,7 +1382,7 @@ BOOL LLItemBridge::isItemCopyable() const
LLViewerInventoryItem* item = getItem();
if (item && !item->getIsLinkType())
{
if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) {
if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) {
return (item->getPermissions().allowCopyBy(gAgent.getID()));
} else {
// All items can be copied since you can
@@ -2401,7 +2401,7 @@ void LLFolderBridge::folderOptionsMenu()
if(!(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments))
{
// </edit>
if (gHippoGridManager->getConnectedGrid()->isSecondLife())
if (gHippoGridManager->getConnectedGrid()->supportsInvLinks())
mItems.push_back(std::string("Add To Outfit"));
mItems.push_back(std::string("Wear Items"));
mItems.push_back(std::string("Replace Outfit"));
@@ -4179,7 +4179,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
items.push_back(std::string("Attach Separator"));
items.push_back(std::string("Object Wear"));
if (gHippoGridManager->getConnectedGrid()->isSecondLife())
if (gHippoGridManager->getConnectedGrid()->supportsInvLinks())
items.push_back(std::string("Object Add"));
if (!avatarp->canAttachMoreObjects())
{
@@ -4668,7 +4668,7 @@ void wear_inventory_category(LLInventoryCategory* category, bool copy, bool appe
// *NOTE: hack to get from avatar inventory to avatar
void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append, BOOL replace)
{
{
// Avoid unintentionally overwriting old wearables. We have to do
// this up front to avoid having to deal with the case of multiple
// wearables being dirty.

View File

@@ -3614,7 +3614,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point)
if (0 == attachment_point ||
get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))
{
if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->isSecondLife())
if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->supportsInvLinks())
{
// If we know the attachment point then we got here by clicking an
// "Attach to..." context menu item, so we should add, not replace.

View File

@@ -622,6 +622,7 @@ BOOL LLWearable::isDirty()
const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) );
if( avatar_image->getID() != image_id )
{
llwarns << "image ID " << avatar_image->getID() << " was changed." << llendl;
return TRUE;
}
}