summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-28 16:28:31 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-28 16:28:31 +0300
commit9c1af0798f69f72e0bbe63408fd34c2b4a464366 (patch)
tree1111378fb85119773b7033245c18b20811728f67 /indra/newview/llinventorybridge.cpp
parentae62a2d63da77b9923128271790f12a995b9a919 (diff)
parent9206341e680ff682ec2842c676c066bb78c2f29d (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 0b1408616e..38f3521b2d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -952,6 +952,8 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid)
BOOL LLInvFVBridge::canShare() const
{
+ if (!isAgentInventory()) return FALSE;
+
const LLInventoryModel* model = getInventoryModel();
if (!model) return FALSE;
@@ -963,9 +965,10 @@ BOOL LLInvFVBridge::canShare() const
return (BOOL)LLGiveInventory::isInventoryGiveAcceptable(item);
}
- // All categories can be given.
- const LLViewerInventoryCategory* cat = model->getCategory(mUUID);
- return (cat != NULL);
+ // Categories can be given.
+ if (model->getCategory(mUUID)) return TRUE;
+
+ return FALSE;
}
// +=================================================+
@@ -2612,12 +2615,6 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
mDisabledItems.push_back(std::string("Share"));
}
- if (mItems.empty())
- {
- mItems.push_back(std::string("--no options--"));
- mDisabledItems.push_back(std::string("--no options--"));
- }
-
hide_context_entries(menu, mItems, mDisabledItems);
// Add menu items that are dependent on the contents of the folder.