summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-28 15:49:01 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-28 15:49:01 +0300
commit4cefba23d8c28cf94cc836706ad1afe9c294e2a9 (patch)
tree066d7a681df52ab9360ebb5eb42b0eb07c1e5d2d /indra/newview/llinventorybridge.cpp
parent5be77f8e8cdec5fa1bd16568875dc6c9ac94d96e (diff)
parent76da1229ec26b582e054e8a1588ea78943c92d70 (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.