summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobjectinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r--indra/newview/llpanelobjectinventory.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index a06b66dab0..9d0effc164 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -114,6 +114,7 @@ public:
virtual time_t getCreationDate() const;
virtual LLUIImagePtr getIcon() const;
virtual void openItem();
+ virtual BOOL canOpenItem() const { return FALSE; }
virtual void closeItem() {}
virtual void previewItem();
virtual void selectItem() {}
@@ -135,6 +136,8 @@ public:
virtual BOOL isUpToDate() const { return TRUE; }
virtual BOOL hasChildren() const { return FALSE; }
virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; }
+ virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; }
+
// LLDragAndDropBridge functionality
virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
@@ -174,16 +177,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const
void LLTaskInvFVBridge::showProperties()
{
- show_item_profile(mUUID);
-
- // Disable old properties floater; this is replaced by the sidepanel.
- /*
- LLFloaterProperties* floater = LLFloaterReg::showTypedInstance<LLFloaterProperties>("properties", mUUID);
- if (floater)
- {
- floater->setObjectID(mPanel->getTaskUUID());
- }
- */
+ show_task_item_profile(mUUID, mPanel->getTaskUUID());
}
struct LLBuyInvItemData
@@ -674,7 +668,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else
+ else if (canOpenItem())
{
items.push_back(std::string("Task Open"));
if (!isItemCopyable())
@@ -720,6 +714,8 @@ public:
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data);
+ virtual BOOL canOpenItem() const { return TRUE; }
+ virtual void openItem();
};
LLTaskCategoryBridge::LLTaskCategoryBridge(
@@ -754,7 +750,8 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
std::vector<std::string> items;
std::vector<std::string> disabled_items;
- items.push_back(std::string("Task Open"));
+ items.push_back(std::string("--no options--"));
+ disabled_items.push_back(std::string("--no options--"));
hide_context_entries(menu, items, disabled_items);
}
@@ -765,6 +762,10 @@ BOOL LLTaskCategoryBridge::hasChildren() const
return FALSE;
}
+void LLTaskCategoryBridge::openItem()
+{
+}
+
BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
@@ -874,6 +875,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
};
@@ -900,6 +902,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
@@ -976,9 +979,8 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else
+ else if (canOpenItem())
{
- items.push_back(std::string("Task Open"));
if (!isItemCopyable())
{
disabled_items.push_back(std::string("Task Open"));
@@ -1063,6 +1065,7 @@ public:
const std::string& name) :
LLTaskScriptBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
//virtual void buildContextMenu(LLMenuGL& menu);
@@ -1124,6 +1127,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1163,6 +1167,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1196,6 +1201,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};