diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 19:39:11 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 19:39:11 +0100 |
commit | 265391fb3f88a97c5af868f3712bb7b06ad630c1 (patch) | |
tree | 39393f9a6a1a3107f1bf9bc5bb8bc68d7a9fee9f /indra/newview/llinventorybridge.cpp | |
parent | b54e4459df25ac00a63a6d2f094372ce74a11069 (diff) | |
parent | 491d0f1ae4b3557f36a9c1ba7d0033fdcb7d22e5 (diff) |
merge
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 64379f4ce7..973257b19c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -997,46 +997,36 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid) } } -bool LLInvFVBridge::isInOutfitsSidePanel() const +BOOL LLInvFVBridge::isInOutfitsSidePanel() const { LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); LLPanelOutfitsInventory *outfit_panel = dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (!outfit_panel) - return false; + return FALSE; return outfit_panel->isTabPanel(my_panel); } -bool LLInvFVBridge::canShare() +BOOL LLInvFVBridge::canShare() const { const LLInventoryModel* model = getInventoryModel(); - if(!model) - { - return false; - } + if (!model) return FALSE; - LLViewerInventoryItem *item = model->getItem(mUUID); + const LLViewerInventoryItem *item = model->getItem(mUUID); if (item) { - bool allowed = false; - allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item); - if (allowed && - !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) - { - allowed = false; - } - if (allowed && - !item->getPermissions().allowCopyBy(gAgent.getID())) - { - allowed = false; - } - return allowed; + if (!LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item)) + return FALSE; + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + return FALSE; + if (!item->getPermissions().allowCopyBy(gAgent.getID())) + return FALSE; + return TRUE; } - LLViewerInventoryCategory* cat = model->getCategory(mUUID); - // All categories can be given. - return cat != NULL; + const LLViewerInventoryCategory* cat = model->getCategory(mUUID); + return (cat != NULL); } // +=================================================+ @@ -4095,12 +4085,11 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type, U32 flags) : - LLItemBridge(inventory, root, uuid), - mInvType(type) + LLItemBridge(inventory, root, uuid) { mAttachPt = (flags & 0xff); // low bye of inventory flags - mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; + mInvType = type; } LLUIImagePtr LLObjectBridge::getIcon() const @@ -4447,9 +4436,9 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, LLWearableType::EType wearable_type) : LLItemBridge(inventory, root, uuid), mAssetType( asset_type ), - mInvType(inv_type), mWearableType(wearable_type) { + mInvType = inv_type; } // *NOTE: hack to get from avatar inventory to avatar |