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.cpp72
1 files changed, 37 insertions, 35 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 211b9cf4b1..c557e9b85d 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -2,25 +2,31 @@
* @file llsidepanelinventory.cpp
* @brief LLPanelObjectInventory class implementation
*
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, Linden Research, Inc.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
*
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
@@ -108,7 +114,6 @@ 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() {}
@@ -130,8 +135,6 @@ 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,
@@ -171,7 +174,16 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const
void LLTaskInvFVBridge::showProperties()
{
- show_task_item_profile(mUUID, mPanel->getTaskUUID());
+ 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());
+ }
+ */
}
struct LLBuyInvItemData
@@ -339,7 +351,7 @@ LLUIImagePtr LLTaskInvFVBridge::getIcon() const
{
const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS);
- return LLInventoryIcon::getIcon(mAssetType, mInventoryType, 0, item_is_multi );
+ return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, 0, item_is_multi );
}
void LLTaskInvFVBridge::openItem()
@@ -662,7 +674,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else if (canOpenItem())
+ else
{
items.push_back(std::string("Task Open"));
if (!isItemCopyable())
@@ -708,8 +720,6 @@ 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(
@@ -744,6 +754,7 @@ 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"));
hide_context_entries(menu, items, disabled_items);
}
@@ -754,10 +765,6 @@ BOOL LLTaskCategoryBridge::hasChildren() const
return FALSE;
}
-void LLTaskCategoryBridge::openItem()
-{
-}
-
BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
@@ -864,7 +871,6 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
};
@@ -891,7 +897,6 @@ 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);
@@ -968,8 +973,9 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else if (canOpenItem())
+ else
{
+ items.push_back(std::string("Task Open"));
if (!isItemCopyable())
{
disabled_items.push_back(std::string("Task Open"));
@@ -1054,7 +1060,6 @@ 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);
@@ -1116,7 +1121,6 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1156,7 +1160,6 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1190,7 +1193,6 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
- virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1234,7 +1236,7 @@ public:
LLUIImagePtr LLTaskWearableBridge::getIcon() const
{
- return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE );
+ return LLInventoryIcon::getIcon(mAssetType, mInventoryType, FALSE, mFlags, FALSE );
}