summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobjectinventory.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2010-06-21 12:20:24 -0400
committerNat Goodspeed <nat@lindenlab.com>2010-06-21 12:20:24 -0400
commitf17623d8c67a10c2d7547e40ac8442c703d107ed (patch)
tree2ae37385da280a758a66e920f9bdb317dcde59ee /indra/newview/llpanelobjectinventory.cpp
parent4e538adca41d486125c3b887ce694c457bcab157 (diff)
parentbef22c0325cbfeb3d290753a66ecf862bf4593d3 (diff)
Automated merge with ssh://192.168.2.107/c:/linden/viewer-release/
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r--indra/newview/llpanelobjectinventory.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index f683cbc8d0..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() {}
@@ -667,7 +668,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else
+ else if (canOpenItem())
{
items.push_back(std::string("Task Open"));
if (!isItemCopyable())
@@ -713,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(
@@ -747,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);
}
@@ -758,6 +762,10 @@ BOOL LLTaskCategoryBridge::hasChildren() const
return FALSE;
}
+void LLTaskCategoryBridge::openItem()
+{
+}
+
BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
@@ -864,6 +872,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
};
@@ -890,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);
@@ -966,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"));
@@ -1053,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);
@@ -1114,6 +1124,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1153,6 +1164,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1186,6 +1198,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};