summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-13 14:16:24 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-13 14:16:24 -0800
commitb9852dde4b18adcda42fa3c4f882d9f6b8168893 (patch)
tree0803ab3698358d48abb761188ad19f0a77cc4562 /indra/newview/llinventorybridge.cpp
parent8d85d29765855162f43af5e212ecff5216cbc6aa (diff)
parentc316edda259a3914ceb0c646a543f144c370a39b (diff)
Merge.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 8cc53cd93c..ec3c9b60d2 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2084,7 +2084,12 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
{
if ("open" == action)
{
- openItem();
+ LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(folder->getItemByID(mUUID));
+ if (f)
+ {
+ f->setOpen(TRUE);
+ }
+
return;
}
else if ("paste" == action)
@@ -2238,12 +2243,25 @@ LLUIImagePtr LLFolderBridge::getIcon() const
LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type)
{
// we only have one folder image now
+ if (preferred_type == LLFolderType::FT_OUTFIT)
+ {
+ return LLUI::getUIImage("Inv_LookFolderClosed");
+ }
return LLUI::getUIImage("Inv_FolderClosed");
/*case LLAssetType::AT_MESH:
control = "inv_folder_mesh.tga";
break;*/
}
+LLUIImagePtr LLFolderBridge::getOpenIcon() const
+{
+ if (getPreferredType() == LLFolderType::FT_OUTFIT)
+ {
+ return LLUI::getUIImage("Inv_LookFolderOpen");
+ }
+ return LLUI::getUIImage("Inv_FolderOpen");
+}
+
BOOL LLFolderBridge::renameItem(const std::string& new_name)
{
if(!isItemRenameable())
@@ -2627,6 +2645,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
mItems.push_back(std::string("Rename"));
mItems.push_back(std::string("Delete"));
+
+ // EXT-4030: disallow deletion of currently worn outfit
+ const LLViewerInventoryItem *base_outfit_link = LLAppearanceManager::instance().getBaseOutfitLink();
+ if (base_outfit_link && (cat == base_outfit_link->getLinkedCategory()))
+ {
+ mDisabledItems.push_back(std::string("Delete"));
+ }
}
}