diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-04-02 11:12:59 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-04-02 11:12:59 -0400 |
commit | 825e4df30d411de2b41864c5b63ef2ea5d317ebd (patch) | |
tree | a04013f297e69e6fd7ab0314bce655f564502d5a | |
parent | 2854008e8edd3419fe37a8c4971223eda5945bfa (diff) |
EXT-6689 : INFRASTRUCTURE : LLInventoryBridge code cleanup
Moved a bunch of local llinventorybridge functions into .cpp.
Did a bunch of superficial cleanup of llinventorybridge and related files.
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 657 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.h | 295 | ||||
-rw-r--r-- | indra/newview/llinventoryfunctions.h | 10 | ||||
-rw-r--r-- | indra/newview/llplacesinventorybridge.cpp | 2 |
4 files changed, 427 insertions, 537 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2a570ecebb..10a3713c1e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -70,6 +70,18 @@ #include "llwearablelist.h" #include "llpaneloutfitsinventory.h" +typedef std::pair<LLUUID, LLUUID> two_uuids_t; +typedef std::list<two_uuids_t> two_uuids_list_t; + +struct LLMoveInv +{ + LLUUID mObjectID; + LLUUID mCategoryID; + two_uuids_list_t mMoveList; + void (*mCallback)(S32, void*); + void* mUserData; +}; + using namespace LLOldEvents; // Helpers @@ -93,6 +105,7 @@ void remove_inventory_category_from_avatar(LLInventoryCategory* category); void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id); bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response); +void teleport_via_landmark(const LLUUID& asset_id); std::string ICON_NAME[ICON_NAME_COUNT] = { @@ -864,17 +877,6 @@ void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model, model->notifyObservers(); } - -const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type) -{ - const std::string rv= LLInventoryType::lookup(inv_type); - if(rv.empty()) - { - return std::string("<invalid>"); - } - return rv; -} - LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, @@ -889,7 +891,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_TEXTURE: if(!(inv_type == LLInventoryType::IT_TEXTURE || inv_type == LLInventoryType::IT_SNAPSHOT)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLTextureBridge(inventory, root, uuid, inv_type); break; @@ -897,7 +899,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_SOUND: if(!(inv_type == LLInventoryType::IT_SOUND)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLSoundBridge(inventory, root, uuid); break; @@ -905,7 +907,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_LANDMARK: if(!(inv_type == LLInventoryType::IT_LANDMARK)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLLandmarkBridge(inventory, root, uuid, flags); break; @@ -913,7 +915,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_CALLINGCARD: if(!(inv_type == LLInventoryType::IT_CALLINGCARD)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLCallingCardBridge(inventory, root, uuid); break; @@ -921,7 +923,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_SCRIPT: if(!(inv_type == LLInventoryType::IT_LSL)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLScriptBridge(inventory, root, uuid); break; @@ -929,7 +931,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_OBJECT: if(!(inv_type == LLInventoryType::IT_OBJECT || inv_type == LLInventoryType::IT_ATTACHMENT)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLObjectBridge(inventory, root, uuid, inv_type, flags); break; @@ -937,7 +939,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_NOTECARD: if(!(inv_type == LLInventoryType::IT_NOTECARD)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLNotecardBridge(inventory, root, uuid); break; @@ -945,7 +947,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_ANIMATION: if(!(inv_type == LLInventoryType::IT_ANIMATION)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLAnimationBridge(inventory, root, uuid); break; @@ -953,7 +955,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_GESTURE: if(!(inv_type == LLInventoryType::IT_GESTURE)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLGestureBridge(inventory, root, uuid); break; @@ -961,7 +963,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_LSL_TEXT: if(!(inv_type == LLInventoryType::IT_LSL)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLLSLTextBridge(inventory, root, uuid); break; @@ -970,7 +972,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_BODYPART: if(!(inv_type == LLInventoryType::IT_WEARABLE)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (EWearableType)flags); break; @@ -4950,50 +4952,123 @@ void LLWearableBridge::removeFromAvatar() } } -LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type, - const LLUUID& uuid, - LLInventoryModel* model) +// +=================================================+ +// | LLLinkItemBridge | +// +=================================================+ +// For broken item links +std::string LLLinkItemBridge::sPrefix("Link: "); +LLUIImagePtr LLLinkItemBridge::getIcon() const { - LLInvFVBridgeAction* action = NULL; - switch(asset_type) + if (LLViewerInventoryItem *item = getItem()) { - case LLAssetType::AT_TEXTURE: - action = new LLTextureBridgeAction(uuid,model); - break; - case LLAssetType::AT_SOUND: - action = new LLSoundBridgeAction(uuid,model); - break; - case LLAssetType::AT_LANDMARK: - action = new LLLandmarkBridgeAction(uuid,model); - break; - case LLAssetType::AT_CALLINGCARD: - action = new LLCallingCardBridgeAction(uuid,model); - break; - case LLAssetType::AT_OBJECT: - action = new LLObjectBridgeAction(uuid,model); - break; - case LLAssetType::AT_NOTECARD: - action = new LLNotecardBridgeAction(uuid,model); - break; - case LLAssetType::AT_ANIMATION: - action = new LLAnimationBridgeAction(uuid,model); - break; - case LLAssetType::AT_GESTURE: - action = new LLGestureBridgeAction(uuid,model); - break; - case LLAssetType::AT_LSL_TEXT: - action = new LLLSLTextBridgeAction(uuid,model); - break; - case LLAssetType::AT_CLOTHING: - case LLAssetType::AT_BODYPART: - action = new LLWearableBridgeAction(uuid,model); - break; - default: - break; + U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags + bool is_multi = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); + + return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); + } + return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); +} +void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + // *TODO: Translate + lldebugs << "LLLink::buildContextMenu()" << llendl; + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + items.push_back(std::string("Find Original")); + disabled_items.push_back(std::string("Find Original")); + + if(isItemInTrash()) + { + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Properties")); + addDeleteContextMenuOptions(items, disabled_items); + } + hide_context_entries(menu, items, disabled_items); +} + +// +=================================================+ +// | LLLinkBridge | +// +=================================================+ +// For broken folder links. +std::string LLLinkFolderBridge::sPrefix("Link: "); +LLUIImagePtr LLLinkFolderBridge::getIcon() const +{ + LLFolderType::EType preferred_type = LLFolderType::FT_NONE; + if (LLViewerInventoryItem *item = getItem()) + { + if (const LLViewerInventoryCategory* cat = item->getLinkedCategory()) + { + preferred_type = cat->getPreferredType(); + } + } + return LLFolderBridge::getIcon(preferred_type); +} +void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + // *TODO: Translate + lldebugs << "LLLink::buildContextMenu()" << llendl; + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + if (isItemInTrash()) + { + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Find Original")); + addDeleteContextMenuOptions(items, disabled_items); + } + hide_context_entries(menu, items, disabled_items); +} +void LLLinkFolderBridge::performAction(LLInventoryModel* model, std::string action) +{ + if ("goto" == action) + { + gotoItem(); + return; + } + LLItemBridge::performAction(model,action); +} +void LLLinkFolderBridge::gotoItem() +{ + const LLUUID &cat_uuid = getFolderID(); + if (!cat_uuid.isNull()) + { + if (LLFolderViewItem *base_folder = mRoot->getItemByID(cat_uuid)) + { + if (LLInventoryModel* model = getInventoryModel()) + { + model->fetchDescendentsOf(cat_uuid); + } + base_folder->setOpen(TRUE); + mRoot->setSelectionFromRoot(base_folder,TRUE); + mRoot->scrollToShowSelection(); + } } - return action; +} +const LLUUID &LLLinkFolderBridge::getFolderID() const +{ + if (LLViewerInventoryItem *link_item = getItem()) + { + if (const LLViewerInventoryCategory *cat = link_item->getLinkedCategory()) + { + const LLUUID& cat_uuid = cat->getUUID(); + return cat_uuid; + } + } + return LLUUID::null; } +/******************************************************************************** + ** + ** BRIDGE ACTIONS + **/ + // static void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type, const LLUUID& uuid,LLInventoryModel* model) @@ -5006,7 +5081,7 @@ void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type, } } -//static +// static void LLInvFVBridgeAction::doAction(const LLUUID& uuid, LLInventoryModel* model) { llassert(model); @@ -5026,128 +5101,231 @@ void LLInvFVBridgeAction::doAction(const LLUUID& uuid, LLInventoryModel* model) LLViewerInventoryItem* LLInvFVBridgeAction::getItem() const { - if(mModel) + if (mModel) return (LLViewerInventoryItem*)mModel->getItem(mUUID); return NULL; } -// virtual -void LLTextureBridgeAction::doIt() +class LLTextureBridgeAction: public LLInvFVBridgeAction { - if (getItem()) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); + if (getItem()) + { + LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLTextureBridgeAction(){} +protected: + LLTextureBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - -// virtual -void LLSoundBridgeAction::doIt() +class LLSoundBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if(item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLSoundBridgeAction(){} +protected: + LLSoundBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - - -// virtual -void LLLandmarkBridgeAction::doIt() +class LLLandmarkBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if( item ) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - // Opening (double-clicking) a landmark immediately teleports, - // but warns you the first time. - LLSD payload; - payload["asset_id"] = item->getAssetUUID(); - - LLSD args; - args["LOCATION"] = item->getName(); - - LLNotificationsUtil::add("TeleportFromLandmark", args, payload); + LLViewerInventoryItem* item = getItem(); + if (item) + { + // Opening (double-clicking) a landmark immediately teleports, + // but warns you the first time. + LLSD payload; + payload["asset_id"] = item->getAssetUUID(); + + LLSD args; + args["LOCATION"] = item->getName(); + + LLNotificationsUtil::add("TeleportFromLandmark", args, payload); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLLandmarkBridgeAction(){} +protected: + LLLandmarkBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - - -// virtual -void LLCallingCardBridgeAction::doIt() +class LLCallingCardBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if(item && item->getCreatorUUID().notNull()) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLAvatarActions::showProfile(item->getCreatorUUID()); + LLViewerInventoryItem* item = getItem(); + if (item && item->getCreatorUUID().notNull()) + { + LLAvatarActions::showProfile(item->getCreatorUUID()); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLCallingCardBridgeAction(){} +protected: + LLCallingCardBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} - LLInvFVBridgeAction::doIt(); -} +}; -// virtual -void LLNotecardBridgeAction::doIt() +class LLNotecardBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLNotecardBridgeAction(){} +protected: + LLNotecardBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - -// virtual -void LLGestureBridgeAction::doIt() +class LLGestureBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); - preview->setFocus(TRUE); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); + preview->setFocus(TRUE); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLGestureBridgeAction(){} +protected: + LLGestureBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - -// virtual -void LLAnimationBridgeAction::doIt() +class LLAnimationBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLAnimationBridgeAction(){} +protected: + LLAnimationBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - - -// virtual -void LLObjectBridgeAction::doIt() +class LLObjectBridgeAction: public LLInvFVBridgeAction { - /* - LLFloaterReg::showInstance("properties", mUUID); - */ - LLInvFVBridgeAction::doIt(); -} - + friend class LLInvFVBridgeAction; +public: + virtual void doIt() + { + /* + LLFloaterReg::showInstance("properties", mUUID); + */ + LLInvFVBridgeAction::doIt(); + } + virtual ~LLObjectBridgeAction(){} +protected: + LLObjectBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; -// virtual -void LLLSLTextBridgeAction::doIt() +class LLLSLTextBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_script", LLSD(mUUID), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_script", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLLSLTextBridgeAction(){} +protected: + LLLSLTextBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - +class LLWearableBridgeAction: public LLInvFVBridgeAction +{ + friend class LLInvFVBridgeAction; +public: + virtual void doIt() + { + if(isItemInTrash()) + { + LLNotificationsUtil::add("CannotWearTrash"); + } + else if(isAgentInventory()) + { + if(!get_is_item_worn(mUUID)) + { + wearOnAvatar(); + } + } + else + { + // must be in the inventory library. copy it to our inventory + // and put it on right away. + LLViewerInventoryItem* item = getItem(); + if(item && item->isComplete()) + { + LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); + copy_inventory_item( + gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + LLUUID::null, + std::string(), + cb); + } + else if(item) + { + // *TODO: We should fetch the item details, and then do + // the operation above. + LLNotificationsUtil::add("CannotWearInfoNotComplete"); + } + } + LLInvFVBridgeAction::doIt(); + } + virtual ~LLWearableBridgeAction(){} +protected: + LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} + BOOL isItemInTrash() const; + // return true if the item is in agent inventory. if false, it + // must be lost or in the inventory library. + BOOL isAgentInventory() const; + void wearOnAvatar(); +}; BOOL LLWearableBridgeAction::isItemInTrash() const { @@ -5194,155 +5372,50 @@ void LLWearableBridgeAction::wearOnAvatar() } } -// virtual -void LLWearableBridgeAction::doIt() -{ - if(isItemInTrash()) - { - LLNotificationsUtil::add("CannotWearTrash"); - } - else if(isAgentInventory()) - { - if(!get_is_item_worn(mUUID)) - { - wearOnAvatar(); - } - } - else - { - // must be in the inventory library. copy it to our inventory - // and put it on right away. - LLViewerInventoryItem* item = getItem(); - if(item && item->isComplete()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else if(item) - { - // *TODO: We should fetch the item details, and then do - // the operation above. - LLNotificationsUtil::add("CannotWearInfoNotComplete"); - } - } - - LLInvFVBridgeAction::doIt(); -} - -// +=================================================+ -// | LLLinkItemBridge | -// +=================================================+ -// For broken item links -std::string LLLinkItemBridge::sPrefix("Link: "); -LLUIImagePtr LLLinkItemBridge::getIcon() const -{ - if (LLViewerInventoryItem *item = getItem()) - { - U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags - bool is_multi = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); - - return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); - } - return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); -} -void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) -{ - // *TODO: Translate - lldebugs << "LLLink::buildContextMenu()" << llendl; - menuentry_vec_t items; - menuentry_vec_t disabled_items; - - items.push_back(std::string("Find Original")); - disabled_items.push_back(std::string("Find Original")); - - if(isItemInTrash()) - { - addTrashContextMenuOptions(items, disabled_items); - } - else - { - items.push_back(std::string("Properties")); - addDeleteContextMenuOptions(items, disabled_items); - } - hide_context_entries(menu, items, disabled_items); -} - -// +=================================================+ -// | LLLinkBridge | -// +=================================================+ -// For broken folder links. -std::string LLLinkFolderBridge::sPrefix("Link: "); -LLUIImagePtr LLLinkFolderBridge::getIcon() const +LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type, + const LLUUID& uuid, + LLInventoryModel* model) { - LLFolderType::EType preferred_type = LLFolderType::FT_NONE; - if (LLViewerInventoryItem *item = getItem()) + LLInvFVBridgeAction* action = NULL; + switch(asset_type) { - if (const LLViewerInventoryCategory* cat = item->getLinkedCategory()) - { - preferred_type = cat->getPreferredType(); - } + case LLAssetType::AT_TEXTURE: + action = new LLTextureBridgeAction(uuid,model); + break; + case LLAssetType::AT_SOUND: + action = new LLSoundBridgeAction(uuid,model); + break; + case LLAssetType::AT_LANDMARK: + action = new LLLandmarkBridgeAction(uuid,model); + break; + case LLAssetType::AT_CALLINGCARD: + action = new LLCallingCardBridgeAction(uuid,model); + break; + case LLAssetType::AT_OBJECT: + action = new LLObjectBridgeAction(uuid,model); + break; + case LLAssetType::AT_NOTECARD: + action = new LLNotecardBridgeAction(uuid,model); + break; + case LLAssetType::AT_ANIMATION: + action = new LLAnimationBridgeAction(uuid,model); + break; + case LLAssetType::AT_GESTURE: + action = new LLGestureBridgeAction(uuid,model); + break; + case LLAssetType::AT_LSL_TEXT: + action = new LLLSLTextBridgeAction(uuid,model); + break; + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + action = new LLWearableBridgeAction(uuid,model); + break; + default: + break; } - return LLFolderBridge::getIcon(preferred_type); + return action; } -void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) -{ - // *TODO: Translate - lldebugs << "LLLink::buildContextMenu()" << llendl; - menuentry_vec_t items; - menuentry_vec_t disabled_items; - if (isItemInTrash()) - { - addTrashContextMenuOptions(items, disabled_items); - } - else - { - items.push_back(std::string("Find Original")); - addDeleteContextMenuOptions(items, disabled_items); - } - hide_context_entries(menu, items, disabled_items); -} -void LLLinkFolderBridge::performAction(LLInventoryModel* model, std::string action) -{ - if ("goto" == action) - { - gotoItem(); - return; - } - LLItemBridge::performAction(model,action); -} -void LLLinkFolderBridge::gotoItem() -{ - const LLUUID &cat_uuid = getFolderID(); - if (!cat_uuid.isNull()) - { - if (LLFolderViewItem *base_folder = mRoot->getItemByID(cat_uuid)) - { - if (LLInventoryModel* model = getInventoryModel()) - { - model->fetchDescendentsOf(cat_uuid); - } - base_folder->setOpen(TRUE); - mRoot->setSelectionFromRoot(base_folder,TRUE); - mRoot->scrollToShowSelection(); - } - } -} -const LLUUID &LLLinkFolderBridge::getFolderID() const -{ - if (LLViewerInventoryItem *link_item = getItem()) - { - if (const LLViewerInventoryCategory *cat = link_item->getLinkedCategory()) - { - const LLUUID& cat_uuid = cat->getUUID(); - return cat_uuid; - } - } - return LLUUID::null; -} +/** Bridge Actions + ** + ********************************************************************************/ diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 44165594ee..e7b3785a48 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -45,78 +45,12 @@ class LLInventoryPanel; class LLInventoryModel; class LLMenuGL; class LLCallingCardObserver; - -enum EInventoryIcon -{ - TEXTURE_ICON_NAME, - SOUND_ICON_NAME, - CALLINGCARD_ONLINE_ICON_NAME, - CALLINGCARD_OFFLINE_ICON_NAME, - LANDMARK_ICON_NAME, - LANDMARK_VISITED_ICON_NAME, - SCRIPT_ICON_NAME, - CLOTHING_ICON_NAME, - OBJECT_ICON_NAME, - OBJECT_MULTI_ICON_NAME, - NOTECARD_ICON_NAME, - BODYPART_ICON_NAME, - SNAPSHOT_ICON_NAME, - - BODYPART_SHAPE_ICON_NAME, - BODYPART_SKIN_ICON_NAME, - BODYPART_HAIR_ICON_NAME, - BODYPART_EYES_ICON_NAME, - CLOTHING_SHIRT_ICON_NAME, - CLOTHING_PANTS_ICON_NAME, - CLOTHING_SHOES_ICON_NAME, - CLOTHING_SOCKS_ICON_NAME, - CLOTHING_JACKET_ICON_NAME, - CLOTHING_GLOVES_ICON_NAME, - CLOTHING_UNDERSHIRT_ICON_NAME, - CLOTHING_UNDERPANTS_ICON_NAME, - CLOTHING_SKIRT_ICON_NAME, - CLOTHING_ALPHA_ICON_NAME, - CLOTHING_TATTOO_ICON_NAME, - - ANIMATION_ICON_NAME, - GESTURE_ICON_NAME, - - LINKITEM_ICON_NAME, - LINKFOLDER_ICON_NAME, - - ICON_NAME_COUNT -}; - -extern std::string ICON_NAME[ICON_NAME_COUNT]; - -typedef std::pair<LLUUID, LLUUID> two_uuids_t; -typedef std::list<two_uuids_t> two_uuids_list_t; -typedef std::pair<LLUUID, two_uuids_list_t> uuid_move_list_t; - -struct LLMoveInv -{ - LLUUID mObjectID; - LLUUID mCategoryID; - two_uuids_list_t mMoveList; - void (*mCallback)(S32, void*); - void* mUserData; -}; - -struct LLAttachmentRezAction -{ - LLUUID mItemID; - S32 mAttachPt; -}; +class LLViewerJointAttachment; typedef std::vector<std::string> menuentry_vec_t; -const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type); -void hide_context_entries(LLMenuGL& menu, - const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridge (& its derived classes) +// Class LLInvFVBridge // // Short for Inventory-Folder-View-Bridge. This is an // implementation class to be able to view inventory items. @@ -177,7 +111,7 @@ public: virtual void pasteFromClipboard() {} virtual void pasteLinkFromClipboard() {} void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, - menuentry_vec_t &disabled_items, U32 flags); + menuentry_vec_t &disabled_items, U32 flags); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, @@ -227,17 +161,18 @@ protected: const LLUUID mUUID; // item id LLInventoryType::EType mInvType; void purgeItem(LLInventoryModel *model, const LLUUID &uuid); - }; -/** - * This class intended to build Folder View Bridge via LLInvFVBridge::createBridge. - * It can be overridden with another way of creation necessary Inventory-Folder-View-Bridge. - */ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInvFVBridge +// +// This class intended to build Folder View Bridge via LLInvFVBridge::createBridge. +// It can be overridden with another way of creation necessary Inventory-Folder-View-Bridge. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryFVBridgeBuilder { public: - virtual ~LLInventoryFVBridgeBuilder(){} + virtual ~LLInventoryFVBridgeBuilder() {} virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, @@ -247,6 +182,48 @@ public: U32 flags = 0x00) const; }; +// Used by LLItemBridge::getIcon +enum EInventoryIcon +{ + TEXTURE_ICON_NAME, + SOUND_ICON_NAME, + CALLINGCARD_ONLINE_ICON_NAME, + CALLINGCARD_OFFLINE_ICON_NAME, + LANDMARK_ICON_NAME, + LANDMARK_VISITED_ICON_NAME, + SCRIPT_ICON_NAME, + CLOTHING_ICON_NAME, + OBJECT_ICON_NAME, + OBJECT_MULTI_ICON_NAME, + NOTECARD_ICON_NAME, + BODYPART_ICON_NAME, + SNAPSHOT_ICON_NAME, + + BODYPART_SHAPE_ICON_NAME, + BODYPART_SKIN_ICON_NAME, + BODYPART_HAIR_ICON_NAME, + BODYPART_EYES_ICON_NAME, + CLOTHING_SHIRT_ICON_NAME, + CLOTHING_PANTS_ICON_NAME, + CLOTHING_SHOES_ICON_NAME, + CLOTHING_SOCKS_ICON_NAME, + CLOTHING_JACKET_ICON_NAME, + CLOTHING_GLOVES_ICON_NAME, + CLOTHING_UNDERSHIRT_ICON_NAME, + CLOTHING_UNDERPANTS_ICON_NAME, + CLOTHING_SKIRT_ICON_NAME, + CLOTHING_ALPHA_ICON_NAME, + CLOTHING_TATTOO_ICON_NAME, + + ANIMATION_ICON_NAME, + GESTURE_ICON_NAME, + + LINKITEM_ICON_NAME, + LINKFOLDER_ICON_NAME, + + ICON_NAME_COUNT +}; +extern std::string ICON_NAME[ICON_NAME_COUNT]; class LLItemBridge : public LLInvFVBridge { @@ -290,7 +267,6 @@ protected: mutable std::string mDisplayName; }; - class LLFolderBridge : public LLInvFVBridge { friend class LLInvFVBridge; @@ -397,7 +373,6 @@ protected: LLItemBridge(inventory, root, uuid) {} }; - class LLTextureBridge : public LLItemBridge { friend class LLInvFVBridge; @@ -450,7 +425,6 @@ protected: LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00); - protected: BOOL mVisited; }; @@ -465,19 +439,15 @@ public: virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - //virtual void renameItem(const std::string& new_name); - //virtual BOOL removeItem(); virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data); void refreshFolderViewItem(); - protected: LLCallingCardBridge(LLInventoryPanel* inventory, LLFolderView* folder, const LLUUID& uuid ); ~LLCallingCardBridge(); - protected: LLCallingCardObserver* mObserver; }; @@ -489,7 +459,6 @@ class LLNotecardBridge : public LLItemBridge public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - protected: LLNotecardBridge(LLInventoryPanel* inventory, LLFolderView* root, @@ -523,7 +492,6 @@ protected: : LLItemBridge(inventory, root, uuid) {} }; - class LLAnimationBridge : public LLItemBridge { friend class LLInvFVBridge; @@ -541,7 +509,6 @@ protected: LLItemBridge(inventory, root, uuid) {} }; - class LLObjectBridge : public LLItemBridge { friend class LLInvFVBridge; @@ -568,14 +535,12 @@ protected: BOOL mIsMultiObject; }; - class LLLSLTextBridge : public LLItemBridge { friend class LLInvFVBridge; public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - protected: LLLSLTextBridge(LLInventoryPanel* inventory, LLFolderView* root, @@ -583,7 +548,6 @@ protected: LLItemBridge(inventory, root, uuid) {} }; - class LLWearableBridge : public LLItemBridge { friend class LLInvFVBridge; @@ -632,45 +596,38 @@ class LLLinkItemBridge : public LLItemBridge friend class LLInvFVBridge; public: virtual const std::string& getPrefix() { return sPrefix; } - virtual LLUIImagePtr getIcon() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - protected: LLLinkItemBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} - protected: static std::string sPrefix; }; - class LLLinkFolderBridge : public LLItemBridge { friend class LLInvFVBridge; public: virtual const std::string& getPrefix() { return sPrefix; } - virtual LLUIImagePtr getIcon() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); virtual void gotoItem(); - protected: LLLinkFolderBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} const LLUUID &getFolderID() const; - protected: static std::string sPrefix; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridgeAction (& its derived classes) +// Class LLInvFVBridgeAction // // This is an implementation class to be able to // perform action to view inventory items. @@ -680,7 +637,7 @@ class LLInvFVBridgeAction { public: // This method is a convenience function which creates the correct - // type of bridge action based on some basic information + // type of bridge action based on some basic information. static LLInvFVBridgeAction* createAction(LLAssetType::EType asset_type, const LLUUID& uuid, LLInventoryModel* model); @@ -689,149 +646,21 @@ public: static void doAction(const LLUUID& uuid, LLInventoryModel* model); virtual void doIt() {}; - virtual ~LLInvFVBridgeAction(){}//need this because of warning on OSX + virtual ~LLInvFVBridgeAction() {} // need this because of warning on OSX protected: LLInvFVBridgeAction(const LLUUID& id, LLInventoryModel* model) : mUUID(id), mModel(model) {} LLViewerInventoryItem* getItem() const; protected: - const LLUUID& mUUID; // item id + const LLUUID& mUUID; // item id LLInventoryModel* mModel; }; - -class LLTextureBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLTextureBridgeAction(){} -protected: - LLTextureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLSoundBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLSoundBridgeAction(){} -protected: - LLSoundBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLLandmarkBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLLandmarkBridgeAction(){} -protected: - LLLandmarkBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLCallingCardBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLCallingCardBridgeAction(){} -protected: - LLCallingCardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLNotecardBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLNotecardBridgeAction(){} -protected: - LLNotecardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLGestureBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLGestureBridgeAction(){} -protected: - LLGestureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLAnimationBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLAnimationBridgeAction(){} -protected: - LLAnimationBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLObjectBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLObjectBridgeAction(){} -protected: - LLObjectBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLLSLTextBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLLSLTextBridgeAction(){} -protected: - LLLSLTextBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLWearableBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt(); - virtual ~LLWearableBridgeAction(){} -protected: - LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - - - BOOL isItemInTrash() const; - // return true if the item is in agent inventory. if false, it - // must be lost or in the inventory library. - BOOL isAgentInventory() const; - - void wearOnAvatar(); - -}; - void wear_inventory_item_on_avatar(LLInventoryItem* item); -class LLViewerJointAttachment; -void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment); +void rez_attachment(LLViewerInventoryItem* item, + LLViewerJointAttachment* attachment); // Move items from an in-world object's "Contents" folder to a specified // folder in agent inventory. @@ -841,13 +670,9 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, void (*callback)(S32, void*) = NULL, void* user_data = NULL); - - -void teleport_via_landmark(const LLUUID& asset_id); - // Utility function to hide all entries except those in the list void hide_context_entries(LLMenuGL& menu, - const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries); + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); #endif // LL_LLINVENTORYBRIDGE_H diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index eb33763670..e3cd988e39 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -52,7 +52,6 @@ // and override the () operator to return TRUE if you want to collect // the category or item passed in. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLInventoryCollectFunctor { public: @@ -62,7 +61,6 @@ public: static bool itemTransferCommonlyAllowed(LLInventoryItem* item); }; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLAssetIDMatches // @@ -116,14 +114,12 @@ protected: LLAssetType::EType mType; }; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIsNotType // // Implementation of a LLInventoryCollectFunctor which returns FALSE if the // type is the type passed in during construction, otherwise false. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLIsNotType : public LLInventoryCollectFunctor { public: @@ -156,7 +152,6 @@ protected: // Simple class that collects calling cards that are not null, and not // the agent. Duplicates are possible. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLBuddyCollector : public LLInventoryCollectFunctor { public: @@ -172,7 +167,6 @@ public: // Simple class that collects calling cards that are not null, and not // the agent. Duplicates are discarded. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLUniqueBuddyCollector : public LLInventoryCollectFunctor { public: @@ -202,13 +196,11 @@ protected: LLUUID mBuddyID; }; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLNameCategoryCollector // // Collects categories based on case-insensitive match of prefix //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLNameCategoryCollector : public LLInventoryCollectFunctor { public: @@ -270,7 +262,7 @@ public: virtual void doItem(LLFolderViewItem* item); BOOL wasItemSelected() { return mItemSelected; } protected: - BOOL mItemSelected; + BOOL mItemSelected; }; class LLOpenFilteredFolders : public LLFolderViewFunctor diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp index b4f960f4ac..f59a55cb8b 100644 --- a/indra/newview/llplacesinventorybridge.cpp +++ b/indra/newview/llplacesinventorybridge.cpp @@ -168,7 +168,7 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( case LLAssetType::AT_LANDMARK: if(!(inv_type == LLInventoryType::IT_LANDMARK)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } new_listener = new LLPlacesLandmarkBridge(inv_type, inventory, root, uuid, flags); break; |