From bb72788392ea6d25adb045abd555419cd60c4888 Mon Sep 17 00:00:00 2001 From: Palmer Date: Thu, 12 Nov 2009 14:05:01 -0800 Subject: Fixes for mesh inventory type correctness. --- indra/newview/llinventoryfunctions.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 75218e98e0..01c7f0974d 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -323,6 +323,9 @@ const std::string& get_item_icon_name(LLAssetType::EType asset_type, case LLAssetType::AT_LINK_FOLDER: idx = LINKFOLDER_ICON_NAME; break; + case LLAssetType::AT_MESH: + idx = MESH_ICON_NAME; + break; default: break; } -- cgit v1.2.3 From a66ec792c937b76ee41444a3663bcf81a362db85 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 16 Jun 2010 10:10:59 +0300 Subject: EXT-7790 FIX Reset inventory filter when showing original item in inventory reviwed by Loren Shih at https://codereview.productengine.com/secondlife/r/575/ --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c86d463a08..68fc86467c 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -52,6 +52,7 @@ #include "llappearancemgr.h" #include "llappviewer.h" //#include "llfirstuse.h" +#include "llfloaterinventory.h" #include "llfocusmgr.h" #include "llfolderview.h" #include "llgesturemgr.h" @@ -63,6 +64,7 @@ #include "llinventorypanel.h" #include "lllineeditor.h" #include "llmenugl.h" +#include "llpanelmaininventory.h" #include "llpreviewanim.h" #include "llpreviewgesture.h" #include "llpreviewnotecard.h" @@ -74,6 +76,7 @@ #include "llscrollcontainer.h" #include "llselectmgr.h" #include "llsidetray.h" +#include "llsidepanelinventory.h" #include "lltabcontainer.h" #include "lltooldraganddrop.h" #include "lluictrlfactory.h" @@ -332,9 +335,38 @@ void show_item_profile(const LLUUID& item_uuid) void show_item_original(const LLUUID& item_uuid) { + bool reset_inventory_filter = !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory"); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(); if (!active_panel) return; active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO); + + if(reset_inventory_filter) + { + LLSidepanelInventory *sidepanel_inventory = + dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + if(sidepanel_inventory) + { + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + + main_inventory->onFilterEdit(""); + } + + //now for inventory floater + + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) + { + LLFloaterInventory* floater_inventory = dynamic_cast(*iter); + if (floater_inventory) + { + LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel(); + + main_inventory->onFilterEdit(""); + } + } + + } } ///---------------------------------------------------------------------------- -- cgit v1.2.3 From 4aef5f54de70a8d729c93f7eb11995a7d23feed0 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 16 Jun 2010 17:32:51 -0700 Subject: EXT-7734 FIX In-world object properteis often don't show correct information reviewed by Leyla --- indra/newview/llinventoryfunctions.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 68fc86467c..3913e1805f 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -327,6 +327,11 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) return FALSE; } +void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id) +{ + LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", item_uuid).with("object", object_id)); +} + void show_item_profile(const LLUUID& item_uuid) { LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid); -- cgit v1.2.3 From 9eeaaf67387377fcf552be7cae5191df338f5a1e Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Thu, 17 Jun 2010 11:02:12 +0300 Subject: EXT-7791 FIX Show inventory panel if its not visible. reviewed by Mike Antipov, Loren Shih at https://codereview.productengine.com/secondlife/r/599/ --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.cpp | 43 +++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 11 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 68fc86467c..de24bd92d0 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -335,24 +335,34 @@ void show_item_profile(const LLUUID& item_uuid) void show_item_original(const LLUUID& item_uuid) { + //sidetray inventory panel + LLSidepanelInventory *sidepanel_inventory = + dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + bool reset_inventory_filter = !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory"); LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(); - if (!active_panel) return; + if (!active_panel) + { + //this may happen when there is no floatera and other panel is active in inventory tab + + if (sidepanel_inventory) + { + sidepanel_inventory->showInventoryPanel(); + } + } + + active_panel = LLInventoryPanel::getActiveInventoryPanel(); + if (!active_panel) + { + return; + } active_panel->setSelection(gInventory.getLinkedItemID(item_uuid), TAKE_FOCUS_NO); if(reset_inventory_filter) { - LLSidepanelInventory *sidepanel_inventory = - dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - if(sidepanel_inventory) - { - LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); - - main_inventory->onFilterEdit(""); - } - - //now for inventory floater + //inventory floater + bool floater_inventory_visible = false; LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) @@ -364,8 +374,19 @@ void show_item_original(const LLUUID& item_uuid) main_inventory->onFilterEdit(""); } + + if(floater_inventory->getVisible()) + { + floater_inventory_visible = true; + } + } + if(sidepanel_inventory && !floater_inventory_visible) + { + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + main_inventory->onFilterEdit(""); + } } } -- cgit v1.2.3 From 9f996443604a902e03de87d2d14545b4adffa69c Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 17 Jun 2010 19:03:57 +0300 Subject: EXT-7722 Fixed "Add to COF" and "Remove from COF" outfit context menu items to be enabled when appropriate and work properly. Work on "Take Off - Remove from Current Outfit" and "Wear - Add to Current Outfit" menu options: - The menu items of the outfit context menu and the My Outfits gear menu are now disabled when inappropriate instead of being hidden. - The menu items get enabled/disabled depending on whether you can wear (take off) anything from the selected outfit. (was: depending on whether you're wearing the outfit) - Changed the way the options work: they now only operate on clothes and attachments. "Add to COF" now only adds those body parts that are missing in COF; "Remove from COF" doesn't touch body parts at all. Without this change both "Add" and "Remove" options would be available simultaneously, because any valid outfit contains body parts. I think that would be confusing. And you don't expect you body parts to be replaced when doing "Add to COF'. (that's addition, not replacement) Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/585/ --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.cpp | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index de24bd92d0..469d1888dd 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -573,6 +573,31 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat, return FALSE; } +LLFindWearablesEx::LLFindWearablesEx(bool is_worn, bool include_body_parts) +: mIsWorn(is_worn) +, mIncludeBodyParts(include_body_parts) +{} + +bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + LLViewerInventoryItem *vitem = dynamic_cast(item); + if (!vitem) return false; + + // Skip non-wearables. + if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT) + { + return false; + } + + // Skip body parts if requested. + if (!mIncludeBodyParts && vitem->getType() == LLAssetType::AT_BODYPART) + { + return false; + } + + return (bool) get_is_item_worn(item->getUUID()) == mIsWorn; +} + bool LLFindWearablesOfType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (!item) return false; @@ -593,11 +618,6 @@ void LLFindWearablesOfType::setType(LLWearableType::EType type) mWearableType = type; } -bool LLFindWorn::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - return item && get_is_item_worn(item->getUUID()); -} - bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (item) -- cgit v1.2.3 From 913923850051409047d7df83cb005e3d270b5e3a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 25 Jun 2010 16:07:27 -0400 Subject: EXT-7914 FIXED Current outfit can be removed via My Inventory -> Trash button Now disabling remove if an outfit is linked in the COF. --- indra/newview/llinventoryfunctions.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 37088064c6..8940339265 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -282,7 +282,9 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) { - // This function doesn't check the folder's children. + // NOTE: This function doesn't check the folder's children. + // See LLFolderBridge::isItemRemovable for a function that does + // consider the children. if (!model) { @@ -296,17 +298,29 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) if (!isAgentAvatarValid()) return FALSE; - LLInventoryCategory* category = model->getCategory(id); + const LLInventoryCategory* category = model->getCategory(id); if (!category) { return FALSE; } - if (LLFolderType::lookupIsProtectedType(category->getPreferredType())) + const LLFolderType::EType folder_type = category->getPreferredType(); + + if (LLFolderType::lookupIsProtectedType(folder_type)) { return FALSE; } + // Can't delete the outfit that is currently being worn. + if (folder_type == LLFolderType::FT_OUTFIT) + { + const LLViewerInventoryItem *base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink(); + if (base_outfit_link && (category == base_outfit_link->getLinkedCategory())) + { + return FALSE; + } + } + return TRUE; } -- cgit v1.2.3 From 8d18056e8296472d58a820fd77a6a66100e70661 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 25 Jun 2010 16:04:45 -0700 Subject: Fix for EXT-8025 ('+' button on My Appearance > Edit Outfit panel does nothing) Button now gets disabled in the early-exit case in LLPanelOutfitEdit::onInventorySelectionChange(). onInventorySelectionChange() also uses the new predicate get_can_item_be_worn(), which both checks whether the item is already being worn and whether it's of a type that could be worn. Reviewed by Nyx at http://codereview.lindenlab.com/2451030 . --- indra/newview/llinventoryfunctions.cpp | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 37088064c6..7e9a2cb716 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -245,6 +245,47 @@ BOOL get_is_item_worn(const LLUUID& id) return FALSE; } +BOOL get_can_item_be_worn(const LLUUID& id) +{ + const LLViewerInventoryItem* item = gInventory.getItem(id); + if (!item) + return FALSE; + + switch(item->getType()) + { + case LLAssetType::AT_OBJECT: + { + if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID())) + { + // Already being worn + return FALSE; + } + else + { + // Not being worn yet. + return TRUE; + } + break; + } + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + if(gAgentWearables.isWearingItem(item->getLinkedUUID())) + { + // Already being worn + return FALSE; + } + else + { + // Not being worn yet. + return TRUE; + } + break; + default: + break; + } + return FALSE; +} + BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) { if (!model) -- cgit v1.2.3 From 297bab71ab6fcbdabd3f1c0ac0e2fa403a3ed319 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 5 Jul 2010 12:04:28 +0100 Subject: CID-495 Checker: FORWARD_NULL Function: show_item_original(const LLUUID &) File: /indra/newview/llinventoryfunctions.cpp --- indra/newview/llinventoryfunctions.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 7463658003..2d11337955 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -433,13 +433,12 @@ void show_item_original(const LLUUID& item_uuid) LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel(); main_inventory->onFilterEdit(""); - } - if(floater_inventory->getVisible()) - { - floater_inventory_visible = true; + if(floater_inventory->getVisible()) + { + floater_inventory_visible = true; + } } - } if(sidepanel_inventory && !floater_inventory_visible) { -- cgit v1.2.3 From f790036002a49176066ec346e4068dc05aa88357 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Sat, 10 Jul 2010 00:34:36 +0300 Subject: EXT-8190 PARTIAL FIX Fixed loading indicator infinite spins upon pressing 'Save' for outfit with non-link items. - Added inventory collector functor to select items by their actual type. - Fixed outfit "dirtiness" calculation so only link items are checked. Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/728/. --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 2d11337955..f20acbd016 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -507,6 +507,19 @@ bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return TRUE; } +bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if(mType == LLAssetType::AT_CATEGORY) + { + if(cat) return TRUE; + } + if(item) + { + if(item->getActualType() == mType) return TRUE; + } + return FALSE; +} + bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) -- cgit v1.2.3 From 5d85dad85f07ea23b3a2892276d8ac591a966864 Mon Sep 17 00:00:00 2001 From: Dessie Linden Date: Thu, 15 Jul 2010 12:31:08 -0700 Subject: Reverted changeset 2bb10eae42bf --- indra/newview/llinventoryfunctions.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f20acbd016..2d11337955 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -507,19 +507,6 @@ bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return TRUE; } -bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - if(mType == LLAssetType::AT_CATEGORY) - { - if(cat) return TRUE; - } - if(item) - { - if(item->getActualType() == mType) return TRUE; - } - return FALSE; -} - bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) -- cgit v1.2.3 From 431a6771ccf22501d47d0f09168926239aa21854 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 27 Jul 2010 18:00:37 +0300 Subject: Performed necessary refactoring after merge rev. 14093:babb41195f70 --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f20acbd016..2517db2678 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -251,6 +251,16 @@ BOOL get_can_item_be_worn(const LLUUID& id) if (!item) return FALSE; + const LLUUID trash_id = gInventory.findCategoryUUIDForType( + LLFolderType::FT_TRASH); + + // item can't be worn if base obj in trash, see EXT-7015 + if (gInventory.isObjectDescendentOf(item->getLinkedUUID(), + trash_id)) + { + return false; + } + switch(item->getType()) { case LLAssetType::AT_OBJECT: -- cgit v1.2.3 From 749a48ad733a64519e2f897227c6e1c997389312 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 28 Jul 2010 21:23:14 +0300 Subject: EXT-8258 ADDITIONAL FIX Enable the 'Trash' button in 'My Inventory' when a selected item gets worn. This is an additional fix to the one approved in https://codereview.productengine.com/secondlife/r/772/. Looks like sometimes get_is_item_worn() fails to determine that an item is actually worn. I suppose it happens when the item is already linked to COF but not yet known to LLAgentWearables. So I try fixing it by adding a COF links check to get_is_item_worn(), so that an item is considered worn as soon as it's linked to COF. Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/822/ --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 86af76e0a4..303031ab29 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -221,7 +221,13 @@ BOOL get_is_item_worn(const LLUUID& id) const LLViewerInventoryItem* item = gInventory.getItem(id); if (!item) return FALSE; - + + // Consider the item as worn if it has links in COF. + if (LLAppearanceMgr::instance().isLinkInCOF(id)) + { + return TRUE; + } + switch(item->getType()) { case LLAssetType::AT_OBJECT: -- cgit v1.2.3 From 75980159451eb4f80c1ac03ec4b9d8d488279840 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 27 Jul 2010 22:34:34 +0300 Subject: EXT-8491 FIXED Crash in LLAppearanceMgr::addCOFItemLink(). Reason: When you click on a clothing link in COF, LLAppearanceMgr::wearItemOnAvatar() removes all COF links of the clicked wearable type -- thus invalidating all previously obtained LLViewerInventoryItems for those links -- and then passes such an invalid item (item_to_wear) to addCOFItemLink() which of course crashes. Fix: 1. Handle this case in wearItemOnAvatar(): don't try wearing COF items. 2. Disable the Wear button in the inventory SP when a COF item is selected. 3. Fixed get_can_item_be_worn() to return FALSE for items which are in COF or have links in COF. Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/811/ --HG-- branch : product-engine --- indra/newview/llinventoryfunctions.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f20acbd016..3d350606c6 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -250,6 +250,18 @@ BOOL get_can_item_be_worn(const LLUUID& id) const LLViewerInventoryItem* item = gInventory.getItem(id); if (!item) return FALSE; + + if (LLAppearanceMgr::isLinkInCOF(item->getLinkedUUID())) + { + // an item having links in COF (i.e. a worn item) + return FALSE; + } + + if (gInventory.isObjectDescendentOf(id, LLAppearanceMgr::instance().getCOF())) + { + // a non-link object in COF (should not normally happen) + return FALSE; + } switch(item->getType()) { -- cgit v1.2.3 From 15247f086989a43881d79c1ee5416bb00721eb68 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Jul 2010 14:22:14 -0700 Subject: Backed out changeset: 58571b4e704b --- indra/newview/llinventoryfunctions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 2d11337955..f20acbd016 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -507,6 +507,19 @@ bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return TRUE; } +bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if(mType == LLAssetType::AT_CATEGORY) + { + if(cat) return TRUE; + } + if(item) + { + if(item->getActualType() == mType) return TRUE; + } + return FALSE; +} + bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) -- cgit v1.2.3 From 06b0d72efa96b6a0ed665f7cd46f358c48929e7b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Aug 2010 07:24:57 -0400 Subject: Change license from GPL to LGPL (version 2.1) --- indra/newview/llinventoryfunctions.cpp | 36 ++++++++++++++-------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 3d350606c6..e814cf012e 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2,31 +2,25 @@ * @file llinventoryfunctions.cpp * @brief Implementation of the inventory view and associated stuff. * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * 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 + * Copyright (C) 2010, 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. * - * 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 + * 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. * - * 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. + * 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 * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3 From 98cc2365034a93c69704daa69efb389799cc9627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 18:44:39 +0100 Subject: Backed out changeset a62bf7c0af21 Backing out this merge that I pushed (prematurely) to the wrong place. --- indra/newview/llinventoryfunctions.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f3d9639dee..e814cf012e 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -215,13 +215,7 @@ BOOL get_is_item_worn(const LLUUID& id) const LLViewerInventoryItem* item = gInventory.getItem(id); if (!item) return FALSE; - - // Consider the item as worn if it has links in COF. - if (LLAppearanceMgr::instance().isLinkInCOF(id)) - { - return TRUE; - } - + switch(item->getType()) { case LLAssetType::AT_OBJECT: @@ -263,16 +257,6 @@ BOOL get_can_item_be_worn(const LLUUID& id) return FALSE; } - const LLUUID trash_id = gInventory.findCategoryUUIDForType( - LLFolderType::FT_TRASH); - - // item can't be worn if base obj in trash, see EXT-7015 - if (gInventory.isObjectDescendentOf(item->getLinkedUUID(), - trash_id)) - { - return false; - } - switch(item->getType()) { case LLAssetType::AT_OBJECT: -- cgit v1.2.3 From ba454baab38d6e782338156dfbc97f7168710df2 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 8 Jun 2010 12:20:32 -0500 Subject: Lost code. --- indra/newview/llinventoryfunctions.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index a4b28ceccb..74fd331a06 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -682,6 +682,3 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) } } - case LLAssetType::AT_MESH: - idx = MESH_ICON_NAME; - break; \ No newline at end of file -- cgit v1.2.3