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.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index da809b7baa..ca1361c84b 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() {}
@@ -176,17 +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
@@ -677,7 +668,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else
+ else if (canOpenItem())
{
items.push_back(std::string("Task Open"));
if (!isItemCopyable())
@@ -723,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(
@@ -757,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);
}
@@ -768,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 +872,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
};
@@ -900,6 +899,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 +976,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 +1062,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 +1124,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1163,6 +1164,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1196,6 +1198,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};