From a62f5bfac1e55455c67e1c36eb388af99795dab6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 14 Oct 2023 02:40:59 +0300 Subject: SL-20232 Allow deletion of worn items #1 --- indra/newview/llinventorybridge.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index decaee7db3..62e26b2f28 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -114,7 +114,7 @@ public: virtual BOOL isItemRenameable() const { return TRUE; } virtual BOOL isMultiPreviewAllowed() { return TRUE; } //virtual BOOL renameItem(const std::string& new_name) {} - virtual BOOL isItemRemovable() const; + virtual BOOL isItemRemovable(bool check_worn = true) const; virtual BOOL isItemMovable() const; virtual BOOL isItemInTrash() const; virtual bool isItemInOutfits() const; @@ -321,7 +321,7 @@ public: void* cargo_data, std::string& tooltip_msg); - virtual BOOL isItemRemovable() const; + virtual BOOL isItemRemovable(bool check_worn = true) const; virtual BOOL isItemMovable() const ; virtual BOOL isUpToDate() const; virtual bool isItemCopyable(bool can_copy_as_link = true) const; -- cgit v1.2.3 From ce83f77e7a5f32ac00b0a563fcf68ff98957f684 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 17 Oct 2023 00:34:00 +0300 Subject: SL-20232 Allow deletion of folders with worn content in tree view #3 --- indra/newview/llinventorybridge.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 62e26b2f28..0d87e2b97c 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -524,6 +524,8 @@ public: virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); LLInventoryObject* getObject() const; + LLViewerInventoryItem* getItem() const; + LLViewerInventoryCategory* getCategory() const; protected: static LLUUID sContextMenuItemID; // Only valid while the context menu is open. U32 mAttachPt; -- cgit v1.2.3 From fda96e36806dab544709ac87156949c3accc5cf8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 15 Nov 2023 22:15:03 +0200 Subject: SL-20575 When opening menu cache results and spread load over frames --- indra/newview/llinventorybridge.h | 40 +++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 0d87e2b97c..c493067fc4 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -162,6 +162,9 @@ protected: virtual void addLinkReplaceMenuOption(menuentry_vec_t& items, menuentry_vec_t& disabled_items); + virtual bool canMenuDelete(); + virtual bool canMenuCut(); + protected: LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid); @@ -272,14 +275,10 @@ class LLFolderBridge : public LLInvFVBridge public: LLFolderBridge(LLInventoryPanel* inventory, LLFolderView* root, - const LLUUID& uuid) - : LLInvFVBridge(inventory, root, uuid), - mCallingCards(FALSE), - mWearables(FALSE), - mIsLoading(false), - mShowDescendantsCount(false) - {} - + const LLUUID& uuid); + + ~LLFolderBridge(); + BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm = TRUE, LLPointer cb = NULL); BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE, BOOL user_confirm = TRUE, LLPointer cb = NULL); void callback_dropItemIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryItem* inv_item); @@ -392,6 +391,31 @@ protected: LLTimer mTimeSinceRequestStart; std::string mMessage; LLRootHandle mHandle; + +private: + // checking if folder is cutable or deletable is expensive, + // cache values and split check over frames + static void onCanDeleteIdle(void* user_data); + void initCanDeleteProcessing(LLInventoryModel* model, S32 version); + void completeDeleteProcessing(); + bool canMenuDelete(); + bool canMenuCut(); + + enum ECanDeleteState + { + CDS_INIT_FOLDER_CHECK, + CDS_PROCESSING_ITEMS, + CDS_PROCESSING_FOLDERS, + CDS_DONE, + }; + + ECanDeleteState mCanDeleteFolderState; + LLInventoryModel::cat_array_t mFoldersToCheck; + LLInventoryModel::item_array_t mItemsToCheck; + S32 mLastCheckedVersion; + S32 mInProgressVersion; + bool mCanDelete; + bool mCanCut; }; class LLTextureBridge : public LLItemBridge -- cgit v1.2.3 From 1b68f71348ecf3983b76b40d7940da8377f049b7 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 29 Apr 2024 07:43:28 +0300 Subject: #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed --- indra/newview/llinventorybridge.h | 942 +++++++++++++++++++------------------- 1 file changed, 471 insertions(+), 471 deletions(-) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 6f06f3b36d..e1e0bbb5bd 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -1,25 +1,25 @@ -/** +/** * @file llinventorybridge.h * @brief Implementation of the Inventory-Folder-View-Bridge classes. * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * 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. - * + * * 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. - * + * * 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 - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -65,144 +65,144 @@ typedef std::list two_uuids_list_t; class LLInvFVBridge : public LLFolderViewModelItemInventory { public: - // This method is a convenience function which creates the correct - // type of bridge based on some basic information - static LLInvFVBridge* createBridge(LLAssetType::EType asset_type, - LLAssetType::EType actual_asset_type, - LLInventoryType::EType inv_type, - LLInventoryPanel* inventory, - LLFolderViewModelInventory* view_model, - LLFolderView* root, - const LLUUID& uuid, - U32 flags = 0x00); - virtual ~LLInvFVBridge() {} - - bool canShare() const; - bool canListOnMarketplace() const; - bool canListOnMarketplaceNow() const; - - //-------------------------------------------------------------------- - // LLInvFVBridge functionality - //-------------------------------------------------------------------- - virtual const LLUUID& getUUID() const { return mUUID; } + // This method is a convenience function which creates the correct + // type of bridge based on some basic information + static LLInvFVBridge* createBridge(LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00); + virtual ~LLInvFVBridge() {} + + bool canShare() const; + bool canListOnMarketplace() const; + bool canListOnMarketplaceNow() const; + + //-------------------------------------------------------------------- + // LLInvFVBridge functionality + //-------------------------------------------------------------------- + virtual const LLUUID& getUUID() const { return mUUID; } virtual const LLUUID& getThumbnailUUID() const { return LLUUID::null; } - virtual void clearDisplayName() { mDisplayName.clear(); } - virtual void restoreItem() {} - virtual void restoreToWorld() {} - - //-------------------------------------------------------------------- - // Inherited LLFolderViewModelItemInventory functions - //-------------------------------------------------------------------- - virtual const std::string& getName() const; - virtual const std::string& getDisplayName() const; - const std::string& getSearchableName() const { return mSearchableName; } - - std::string getSearchableDescription() const; - std::string getSearchableCreatorName() const; - std::string getSearchableUUIDString() const; - - virtual PermissionMask getPermissionMask() const; - virtual LLFolderType::EType getPreferredType() const; - virtual time_t getCreationDate() const; + virtual void clearDisplayName() { mDisplayName.clear(); } + virtual void restoreItem() {} + virtual void restoreToWorld() {} + + //-------------------------------------------------------------------- + // Inherited LLFolderViewModelItemInventory functions + //-------------------------------------------------------------------- + virtual const std::string& getName() const; + virtual const std::string& getDisplayName() const; + const std::string& getSearchableName() const { return mSearchableName; } + + std::string getSearchableDescription() const; + std::string getSearchableCreatorName() const; + std::string getSearchableUUIDString() const; + + virtual PermissionMask getPermissionMask() const; + virtual LLFolderType::EType getPreferredType() const; + virtual time_t getCreationDate() const; virtual void setCreationDate(time_t creation_date_utc); - virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } - virtual std::string getLabelSuffix() const { return LLStringUtil::null; } - virtual void openItem() {} - virtual void closeItem() {} + virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } + virtual std::string getLabelSuffix() const { return LLStringUtil::null; } + virtual void openItem() {} + virtual void closeItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false); - virtual void showProperties(); - virtual BOOL isItemRenameable() const { return TRUE; } - virtual BOOL isMultiPreviewAllowed() { return TRUE; } - //virtual BOOL renameItem(const std::string& new_name) {} - virtual BOOL isItemRemovable() const; - virtual BOOL isItemMovable() const; - virtual BOOL isItemInTrash() const; + virtual void showProperties(); + virtual BOOL isItemRenameable() const { return TRUE; } + virtual BOOL isMultiPreviewAllowed() { return TRUE; } + //virtual BOOL renameItem(const std::string& new_name) {} + virtual BOOL isItemRemovable() const; + virtual BOOL isItemMovable() const; + virtual BOOL isItemInTrash() const; virtual bool isItemInOutfits() const; - virtual BOOL isLink() const; - virtual BOOL isLibraryItem() const; - //virtual BOOL removeItem() = 0; - virtual void removeBatch(std::vector& batch); - virtual void move(LLFolderViewModelItem* new_parent_bridge) {} + virtual BOOL isLink() const; + virtual BOOL isLibraryItem() const; + //virtual BOOL removeItem() = 0; + virtual void removeBatch(std::vector& batch); + virtual void move(LLFolderViewModelItem* new_parent_bridge) {} virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; } - virtual BOOL copyToClipboard() const; - virtual BOOL cutToClipboard(); - virtual bool isCutToClipboard(); - virtual BOOL isClipboardPasteable() const; - virtual BOOL isClipboardPasteableAsLink() const; - virtual void pasteFromClipboard() {} - virtual void pasteLinkFromClipboard() {} - void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, - menuentry_vec_t &disabled_items, U32 flags); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual BOOL copyToClipboard() const; + virtual BOOL cutToClipboard(); + virtual bool isCutToClipboard(); + virtual BOOL isClipboardPasteable() const; + virtual BOOL isClipboardPasteableAsLink() const; + virtual void pasteFromClipboard() {} + virtual void pasteLinkFromClipboard() {} + void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, + menuentry_vec_t &disabled_items, U32 flags); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLToolDragAndDrop::ESource getDragSource() const; - virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - std::string& tooltip_msg) { return FALSE; } - virtual LLInventoryType::EType getInventoryType() const { return mInvType; } - virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } + virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; + virtual BOOL dragOrDrop(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + std::string& tooltip_msg) { return FALSE; } + virtual LLInventoryType::EType getInventoryType() const { return mInvType; } + virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } virtual LLSettingsType::type_e getSettingsType() const { return LLSettingsType::ST_NONE; } EInventorySortGroup getSortGroup() const { return SG_ITEM; } - virtual LLInventoryObject* getInventoryObject() const; + virtual LLInventoryObject* getInventoryObject() const; - //-------------------------------------------------------------------- - // Convenience functions for adding various common menu options. - //-------------------------------------------------------------------- + //-------------------------------------------------------------------- + // Convenience functions for adding various common menu options. + //-------------------------------------------------------------------- protected: - virtual void addTrashContextMenuOptions(menuentry_vec_t &items, - menuentry_vec_t &disabled_items); - virtual void addDeleteContextMenuOptions(menuentry_vec_t &items, - menuentry_vec_t &disabled_items); - virtual void addOpenRightClickMenuOption(menuentry_vec_t &items); - virtual void addMarketplaceContextMenuOptions(U32 flags, - menuentry_vec_t &items, - menuentry_vec_t &disabled_items); - virtual void addLinkReplaceMenuOption(menuentry_vec_t& items, - menuentry_vec_t& disabled_items); + virtual void addTrashContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items); + virtual void addDeleteContextMenuOptions(menuentry_vec_t &items, + menuentry_vec_t &disabled_items); + virtual void addOpenRightClickMenuOption(menuentry_vec_t &items); + virtual void addMarketplaceContextMenuOptions(U32 flags, + menuentry_vec_t &items, + menuentry_vec_t &disabled_items); + virtual void addLinkReplaceMenuOption(menuentry_vec_t& items, + menuentry_vec_t& disabled_items); protected: - LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid); - - LLInventoryModel* getInventoryModel() const; - LLInventoryFilter* getInventoryFilter() const; - - BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash? - BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? - - BOOL isAgentInventory() const; // false if lost or in the inventory library - BOOL isCOFFolder() const; // true if COF or descendant of - BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox - - BOOL isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder - - virtual BOOL isItemPermissive() const; - static void changeItemParent(LLInventoryModel* model, - LLViewerInventoryItem* item, - const LLUUID& new_parent, - BOOL restamp); - static void changeCategoryParent(LLInventoryModel* model, - LLViewerInventoryCategory* item, - const LLUUID& new_parent, - BOOL restamp); - void removeBatchNoCheck(std::vector& batch); - + LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid); + + LLInventoryModel* getInventoryModel() const; + LLInventoryFilter* getInventoryFilter() const; + + BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash? + BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? + + BOOL isAgentInventory() const; // false if lost or in the inventory library + BOOL isCOFFolder() const; // true if COF or descendant of + BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox + + BOOL isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder + + virtual BOOL isItemPermissive() const; + static void changeItemParent(LLInventoryModel* model, + LLViewerInventoryItem* item, + const LLUUID& new_parent, + BOOL restamp); + static void changeCategoryParent(LLInventoryModel* model, + LLViewerInventoryCategory* item, + const LLUUID& new_parent, + BOOL restamp); + void removeBatchNoCheck(std::vector& batch); + BOOL callback_cutToClipboard(const LLSD& notification, const LLSD& response); BOOL perform_cutToClipboard(); - LLHandle mInventoryPanel; - LLFolderView* mRoot; - const LLUUID mUUID; // item id - LLInventoryType::EType mInvType; - bool mIsLink; - LLTimer mTimeSinceRequestStart; - mutable std::string mDisplayName; - mutable std::string mSearchableName; - - void purgeItem(LLInventoryModel *model, const LLUUID &uuid); - void removeObject(LLInventoryModel *model, const LLUUID &uuid); - virtual void buildDisplayName() const {} + LLHandle mInventoryPanel; + LLFolderView* mRoot; + const LLUUID mUUID; // item id + LLInventoryType::EType mInvType; + bool mIsLink; + LLTimer mTimeSinceRequestStart; + mutable std::string mDisplayName; + mutable std::string mSearchableName; + + void purgeItem(LLInventoryModel *model, const LLUUID &uuid); + void removeObject(LLInventoryModel *model, const LLUUID &uuid); + virtual void buildDisplayName() const {} }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -214,169 +214,169 @@ protected: class LLInventoryFolderViewModelBuilder { public: - LLInventoryFolderViewModelBuilder() {} - virtual ~LLInventoryFolderViewModelBuilder() {} - virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, - LLAssetType::EType actual_asset_type, - LLInventoryType::EType inv_type, - LLInventoryPanel* inventory, - LLFolderViewModelInventory* view_model, - LLFolderView* root, - const LLUUID& uuid, - U32 flags = 0x00) const; + LLInventoryFolderViewModelBuilder() {} + virtual ~LLInventoryFolderViewModelBuilder() {} + virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00) const; }; class LLItemBridge : public LLInvFVBridge { public: - LLItemBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLInvFVBridge(inventory, root, uuid) {} - - typedef boost::function slurl_callback_t; - - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void selectItem(); - virtual void restoreItem(); - virtual void restoreToWorld(); - virtual void gotoItem(); - virtual LLUIImagePtr getIcon() const; - virtual std::string getLabelSuffix() const; - virtual LLFontGL::StyleFlags getLabelStyle() const; - virtual PermissionMask getPermissionMask() const; - virtual time_t getCreationDate() const; - virtual BOOL isItemRenameable() const; - virtual BOOL renameItem(const std::string& new_name); - virtual BOOL removeItem(); + LLItemBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLInvFVBridge(inventory, root, uuid) {} + + typedef boost::function slurl_callback_t; + + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void selectItem(); + virtual void restoreItem(); + virtual void restoreToWorld(); + virtual void gotoItem(); + virtual LLUIImagePtr getIcon() const; + virtual std::string getLabelSuffix() const; + virtual LLFontGL::StyleFlags getLabelStyle() const; + virtual PermissionMask getPermissionMask() const; + virtual time_t getCreationDate() const; + virtual BOOL isItemRenameable() const; + virtual BOOL renameItem(const std::string& new_name); + virtual BOOL removeItem(); virtual bool isItemCopyable(bool can_copy_as_link = true) const; - virtual bool hasChildren() const { return FALSE; } - virtual BOOL isUpToDate() const { return TRUE; } - virtual LLUIImagePtr getIconOverlay() const; + virtual bool hasChildren() const { return FALSE; } + virtual BOOL isUpToDate() const { return TRUE; } + virtual LLUIImagePtr getIconOverlay() const; - LLViewerInventoryItem* getItem() const; + LLViewerInventoryItem* getItem() const; virtual const LLUUID& getThumbnailUUID() const; protected: - BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); - virtual BOOL isItemPermissive() const; - virtual void buildDisplayName() const; - void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb); + BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); + virtual BOOL isItemPermissive() const; + virtual void buildDisplayName() const; + void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb); private: - void doShowOnMap(LLLandmark* landmark); + void doShowOnMap(LLLandmark* landmark); }; class LLFolderBridge : public LLInvFVBridge { public: - LLFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) - : LLInvFVBridge(inventory, root, uuid), - mCallingCards(FALSE), - mWearables(FALSE), - mIsLoading(false), - mShowDescendantsCount(false) - {} - - BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm = TRUE, LLPointer cb = NULL); - BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE, BOOL user_confirm = TRUE, LLPointer cb = NULL); + LLFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) + : LLInvFVBridge(inventory, root, uuid), + mCallingCards(FALSE), + mWearables(FALSE), + mIsLoading(false), + mShowDescendantsCount(false) + {} + + BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm = TRUE, LLPointer cb = NULL); + BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE, BOOL user_confirm = TRUE, LLPointer cb = NULL); void callback_dropItemIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryItem* inv_item); void callback_dropCategoryIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryCategory* inv_category); virtual void buildDisplayName() const; - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void openItem(); - virtual void closeItem(); - virtual BOOL isItemRenameable() const; - virtual void selectItem(); - virtual void restoreItem(); - - virtual LLFolderType::EType getPreferredType() const; - virtual LLUIImagePtr getIcon() const; - virtual LLUIImagePtr getIconOpen() const; - virtual LLUIImagePtr getIconOverlay() const; - static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); - virtual std::string getLabelSuffix() const; - virtual LLFontGL::StyleFlags getLabelStyle() const; + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem(); + virtual void closeItem(); + virtual BOOL isItemRenameable() const; + virtual void selectItem(); + virtual void restoreItem(); + + virtual LLFolderType::EType getPreferredType() const; + virtual LLUIImagePtr getIcon() const; + virtual LLUIImagePtr getIconOpen() const; + virtual LLUIImagePtr getIconOverlay() const; + static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); + virtual std::string getLabelSuffix() const; + virtual LLFontGL::StyleFlags getLabelStyle() const; virtual const LLUUID& getThumbnailUUID() const; - void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;} + void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;} - virtual BOOL renameItem(const std::string& new_name); + virtual BOOL renameItem(const std::string& new_name); - virtual BOOL removeItem(); - BOOL removeSystemFolder(); - bool removeItemResponse(const LLSD& notification, const LLSD& response); + virtual BOOL removeItem(); + BOOL removeSystemFolder(); + bool removeItemResponse(const LLSD& notification, const LLSD& response); void updateHierarchyCreationDate(time_t date); - virtual void pasteFromClipboard(); - virtual void pasteLinkFromClipboard(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual bool hasChildren() const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - std::string& tooltip_msg); - - virtual BOOL isItemRemovable() const; - virtual BOOL isItemMovable() const ; - virtual BOOL isUpToDate() const; + virtual void pasteFromClipboard(); + virtual void pasteLinkFromClipboard(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual bool hasChildren() const; + virtual BOOL dragOrDrop(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + std::string& tooltip_msg); + + virtual BOOL isItemRemovable() const; + virtual BOOL isItemMovable() const ; + virtual BOOL isUpToDate() const; virtual bool isItemCopyable(bool can_copy_as_link = true) const; - virtual BOOL isClipboardPasteable() const; - virtual BOOL isClipboardPasteableAsLink() const; - - EInventorySortGroup getSortGroup() const; - virtual void update(); + virtual BOOL isClipboardPasteable() const; + virtual BOOL isClipboardPasteableAsLink() const; + + EInventorySortGroup getSortGroup() const; + virtual void update(); - static void createWearable(LLFolderBridge* bridge, LLWearableType::EType type); + static void createWearable(LLFolderBridge* bridge, LLWearableType::EType type); - LLViewerInventoryCategory* getCategory() const; - LLHandle getHandle() { mHandle.bind(this); return mHandle; } + LLViewerInventoryCategory* getCategory() const; + LLHandle getHandle() { mHandle.bind(this); return mHandle; } - bool isLoading() { return mIsLoading; } + bool isLoading() { return mIsLoading; } protected: - void buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items); - void buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items); + void buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items); + void buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items); void addOpenFolderMenuOptions(U32 flags, menuentry_vec_t& items); - //-------------------------------------------------------------------- - // Menu callbacks - //-------------------------------------------------------------------- - static void pasteClipboard(void* user_data); - static void createNewShirt(void* user_data); - static void createNewPants(void* user_data); - static void createNewShoes(void* user_data); - static void createNewSocks(void* user_data); - static void createNewJacket(void* user_data); - static void createNewSkirt(void* user_data); - static void createNewGloves(void* user_data); - static void createNewUndershirt(void* user_data); - static void createNewUnderpants(void* user_data); - static void createNewShape(void* user_data); - static void createNewSkin(void* user_data); - static void createNewHair(void* user_data); - static void createNewEyes(void* user_data); - - BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); - - void modifyOutfit(BOOL append); - void copyOutfitToClipboard(); - void determineFolderType(); - - void dropToFavorites(LLInventoryItem* inv_item, LLPointer cb = NULL); - void dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit, LLPointer cb = NULL); - void dropToMyOutfits(LLInventoryCategory* inv_cat, LLPointer cb = NULL); - - //-------------------------------------------------------------------- - // Messy hacks for handling folder options - //-------------------------------------------------------------------- + //-------------------------------------------------------------------- + // Menu callbacks + //-------------------------------------------------------------------- + static void pasteClipboard(void* user_data); + static void createNewShirt(void* user_data); + static void createNewPants(void* user_data); + static void createNewShoes(void* user_data); + static void createNewSocks(void* user_data); + static void createNewJacket(void* user_data); + static void createNewSkirt(void* user_data); + static void createNewGloves(void* user_data); + static void createNewUndershirt(void* user_data); + static void createNewUnderpants(void* user_data); + static void createNewShape(void* user_data); + static void createNewSkin(void* user_data); + static void createNewHair(void* user_data); + static void createNewEyes(void* user_data); + + BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); + + void modifyOutfit(BOOL append); + void copyOutfitToClipboard(); + void determineFolderType(); + + void dropToFavorites(LLInventoryItem* inv_item, LLPointer cb = NULL); + void dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit, LLPointer cb = NULL); + void dropToMyOutfits(LLInventoryCategory* inv_cat, LLPointer cb = NULL); + + //-------------------------------------------------------------------- + // Messy hacks for handling folder options + //-------------------------------------------------------------------- public: - static LLHandle sSelf; - static void staticFolderOptionsMenu(); + static LLHandle sSelf; + static void staticFolderOptionsMenu(); protected: void outfitFolderCreatedCallback(LLUUID cat_source_id, LLUUID cat_dest_id, LLPointer cb); @@ -385,31 +385,31 @@ protected: void gatherMessage(std::string& message, S32 depth, LLError::ELevel log_level); LLUIImagePtr getFolderIcon(BOOL is_open) const; - bool mCallingCards; - bool mWearables; - bool mIsLoading; - bool mShowDescendantsCount; - LLTimer mTimeSinceRequestStart; + bool mCallingCards; + bool mWearables; + bool mIsLoading; + bool mShowDescendantsCount; + LLTimer mTimeSinceRequestStart; std::string mMessage; - LLRootHandle mHandle; + LLRootHandle mHandle; }; class LLTextureBridge : public LLItemBridge { public: - LLTextureBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLInventoryType::EType type) : - LLItemBridge(inventory, root, uuid) - { - mInvType = type; - } - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLInventoryModel* model, std::string action); - bool canSaveTexture(void); + LLTextureBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type) : + LLItemBridge(inventory, root, uuid) + { + mInvType = type; + } + virtual LLUIImagePtr getIcon() const; + virtual void openItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void performAction(LLInventoryModel* model, std::string action); + bool canSaveTexture(void); void setFileName(const std::string& file_name) { mFileName = file_name; } protected: std::string mFileName; @@ -418,205 +418,205 @@ protected: class LLSoundBridge : public LLItemBridge { public: - LLSoundBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLInventoryModel* model, std::string action); - static void openSoundPreview(void*); + LLSoundBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void performAction(LLInventoryModel* model, std::string action); + static void openSoundPreview(void*); }; class LLLandmarkBridge : public LLItemBridge { public: - LLLandmarkBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - U32 flags = 0x00); - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); + LLLandmarkBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00); + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual LLUIImagePtr getIcon() const; + virtual void openItem(); protected: - BOOL mVisited; + BOOL mVisited; }; class LLCallingCardBridge : public LLItemBridge { public: - LLCallingCardBridge(LLInventoryPanel* inventory, - LLFolderView* folder, - const LLUUID& uuid ); - ~LLCallingCardBridge(); - virtual std::string getLabelSuffix() const; - //virtual const std::string& getDisplayName() const; - virtual LLUIImagePtr getIcon() const; - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL dragOrDrop(MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - std::string& tooltip_msg); - void refreshFolderViewItem(); - void checkSearchBySuffixChanges(); + LLCallingCardBridge(LLInventoryPanel* inventory, + LLFolderView* folder, + const LLUUID& uuid ); + ~LLCallingCardBridge(); + virtual std::string getLabelSuffix() const; + //virtual const std::string& getDisplayName() const; + virtual LLUIImagePtr getIcon() const; + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual BOOL dragOrDrop(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + std::string& tooltip_msg); + void refreshFolderViewItem(); + void checkSearchBySuffixChanges(); protected: - LLCallingCardObserver* mObserver; + LLCallingCardObserver* mObserver; LLUUID mCreatorUUID; }; class LLNotecardBridge : public LLItemBridge { public: - LLNotecardBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + LLNotecardBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); }; class LLGestureBridge : public LLItemBridge { public: - LLGestureBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} - // Only suffix for gesture items, not task items, because only - // gestures in your inventory can be active. - virtual LLFontGL::StyleFlags getLabelStyle() const; - virtual std::string getLabelSuffix() const; - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void openItem(); - virtual BOOL removeItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - static void playGesture(const LLUUID& item_id); + LLGestureBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} + // Only suffix for gesture items, not task items, because only + // gestures in your inventory can be active. + virtual LLFontGL::StyleFlags getLabelStyle() const; + virtual std::string getLabelSuffix() const; + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem(); + virtual BOOL removeItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + static void playGesture(const LLUUID& item_id); }; class LLAnimationBridge : public LLItemBridge { public: - LLAnimationBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void openItem(); + LLAnimationBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void openItem(); }; class LLObjectBridge : public LLItemBridge { public: - LLObjectBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLInventoryType::EType type, - U32 flags); - virtual LLUIImagePtr getIcon() const; - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void openItem(); + LLObjectBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type, + U32 flags); + virtual LLUIImagePtr getIcon() const; + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem(); virtual BOOL isItemWearable() const { return TRUE; } - virtual std::string getLabelSuffix() const; - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL renameItem(const std::string& new_name); - LLInventoryObject* getObject() const; + virtual std::string getLabelSuffix() const; + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual BOOL renameItem(const std::string& new_name); + LLInventoryObject* getObject() const; protected: - static LLUUID sContextMenuItemID; // Only valid while the context menu is open. - U32 mAttachPt; - BOOL mIsMultiObject; + static LLUUID sContextMenuItemID; // Only valid while the context menu is open. + U32 mAttachPt; + BOOL mIsMultiObject; }; class LLLSLTextBridge : public LLItemBridge { public: - LLLSLTextBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid ) : - LLItemBridge(inventory, root, uuid) {} - virtual void openItem(); + LLLSLTextBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid ) : + LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); }; class LLWearableBridge : public LLItemBridge { public: - LLWearableBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, - LLWearableType::EType wearable_type); - virtual LLUIImagePtr getIcon() const; - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void openItem(); + LLWearableBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLAssetType::EType asset_type, + LLInventoryType::EType inv_type, + LLWearableType::EType wearable_type); + virtual LLUIImagePtr getIcon() const; + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem(); virtual BOOL isItemWearable() const { return TRUE; } - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual std::string getLabelSuffix() const; - virtual BOOL renameItem(const std::string& new_name); - virtual LLWearableType::EType getWearableType() const { return mWearableType; } - - static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu - static BOOL canWearOnAvatar( void* userdata ); - static void onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata ); - void wearOnAvatar(); - - static void onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata ); - void wearAddOnAvatar(); - - static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu - static void onEditOnAvatar( void* userdata ); - void editOnAvatar(); - - static BOOL canRemoveFromAvatar( void* userdata ); - static void removeAllClothesFromAvatar(); - void removeFromAvatar(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual std::string getLabelSuffix() const; + virtual BOOL renameItem(const std::string& new_name); + virtual LLWearableType::EType getWearableType() const { return mWearableType; } + + static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu + static BOOL canWearOnAvatar( void* userdata ); + static void onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata ); + void wearOnAvatar(); + + static void onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata ); + void wearAddOnAvatar(); + + static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu + static void onEditOnAvatar( void* userdata ); + void editOnAvatar(); + + static BOOL canRemoveFromAvatar( void* userdata ); + static void removeAllClothesFromAvatar(); + void removeFromAvatar(); protected: - LLAssetType::EType mAssetType; - LLWearableType::EType mWearableType; + LLAssetType::EType mAssetType; + LLWearableType::EType mWearableType; }; class LLLinkItemBridge : public LLItemBridge { public: - LLLinkItemBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} - virtual const std::string& getPrefix() { return sPrefix; } - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + LLLinkItemBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} + virtual const std::string& getPrefix() { return sPrefix; } + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); protected: - static std::string sPrefix; + static std::string sPrefix; }; class LLUnknownItemBridge : public LLItemBridge { public: - LLUnknownItemBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} - virtual LLUIImagePtr getIcon() const; - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + LLUnknownItemBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} + virtual LLUIImagePtr getIcon() const; + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); }; class LLLinkFolderBridge : public LLItemBridge { public: - LLLinkFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} - 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(); + LLLinkFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} + 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: - const LLUUID &getFolderID() const; - static std::string sPrefix; + const LLUUID &getFolderID() const; + static std::string sPrefix; }; @@ -628,10 +628,10 @@ public: const LLUUID& uuid, LLSettingsType::type_e settings_type); virtual LLUIImagePtr getIcon() const; - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void openItem(); - virtual BOOL isMultiPreviewAllowed() { return FALSE; } - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem(); + virtual BOOL isMultiPreviewAllowed() { return FALSE; } + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemRenameable() const; virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; } @@ -658,31 +658,31 @@ public: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInvFVBridgeAction // -// This is an implementation class to be able to +// This is an implementation class to be able to // perform action to view inventory items. // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInvFVBridgeAction { public: - // This method is a convenience function which creates the correct - // type of bridge action based on some basic information. - static LLInvFVBridgeAction* createAction(LLAssetType::EType asset_type, - const LLUUID& uuid, - LLInventoryModel* model); - static void doAction(LLAssetType::EType asset_type, - const LLUUID& uuid, LLInventoryModel* model); - static void doAction(const LLUUID& uuid, LLInventoryModel* model); - - virtual void doIt() {}; - virtual ~LLInvFVBridgeAction() {} // need this because of warning on OSX + // This method is a convenience function which creates the correct + // type of bridge action based on some basic information. + static LLInvFVBridgeAction* createAction(LLAssetType::EType asset_type, + const LLUUID& uuid, + LLInventoryModel* model); + static void doAction(LLAssetType::EType asset_type, + const LLUUID& uuid, LLInventoryModel* model); + static void doAction(const LLUUID& uuid, LLInventoryModel* model); + + virtual void doIt() {}; + virtual ~LLInvFVBridgeAction() {} // need this because of warning on OSX protected: - LLInvFVBridgeAction(const LLUUID& id, LLInventoryModel* model) : - mUUID(id), mModel(model) {} - LLViewerInventoryItem* getItem() const; + LLInvFVBridgeAction(const LLUUID& id, LLInventoryModel* model) : + mUUID(id), mModel(model) {} + LLViewerInventoryItem* getItem() const; protected: - const LLUUID& mUUID; // item id - LLInventoryModel* mModel; + const LLUUID& mUUID; // item id + LLInventoryModel* mModel; }; @@ -693,36 +693,36 @@ protected: // Overridden version of the Inventory-Folder-View-Bridge for Folders class LLRecentItemsFolderBridge : public LLFolderBridge { - friend class LLInvFVBridgeAction; + friend class LLInvFVBridgeAction; public: - // Creates context menu for Folders related to Recent Inventory Panel. - // Uses base logic and than removes from visible items "New..." menu items. - LLRecentItemsFolderBridge(LLInventoryType::EType type, - LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLFolderBridge(inventory, root, uuid) - { - mInvType = type; - } - /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); + // Creates context menu for Folders related to Recent Inventory Panel. + // Uses base logic and than removes from visible items "New..." menu items. + LLRecentItemsFolderBridge(LLInventoryType::EType type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLFolderBridge(inventory, root, uuid) + { + mInvType = type; + } + /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); }; // Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel class LLRecentInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder { public: - LLRecentInventoryBridgeBuilder() {} - // Overrides FolderBridge for Recent Inventory Panel. - // It use base functionality for bridges other than FolderBridge. - virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, - LLAssetType::EType actual_asset_type, - LLInventoryType::EType inv_type, - LLInventoryPanel* inventory, - LLFolderViewModelInventory* view_model, - LLFolderView* root, - const LLUUID& uuid, - U32 flags = 0x00) const; + LLRecentInventoryBridgeBuilder() {} + // Overrides FolderBridge for Recent Inventory Panel. + // It use base functionality for bridges other than FolderBridge. + virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00) const; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -733,15 +733,15 @@ class LLMarketplaceFolderBridge : public LLFolderBridge { public: // Overloads some display related methods specific to folders in a marketplace floater context - LLMarketplaceFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, + LLMarketplaceFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, const LLUUID& uuid); - - virtual LLUIImagePtr getIcon() const; - virtual LLUIImagePtr getIconOpen() const; - virtual std::string getLabelSuffix() const; - virtual LLFontGL::StyleFlags getLabelStyle() const; - + + virtual LLUIImagePtr getIcon() const; + virtual LLUIImagePtr getIconOpen() const; + virtual std::string getLabelSuffix() const; + virtual LLFontGL::StyleFlags getLabelStyle() const; + private: LLUIImagePtr getMarketplaceFolderIcon(BOOL is_open) const; // Those members are mutable because they are cached variablse to speed up display, not a state variables @@ -750,26 +750,26 @@ private: }; -void rez_attachment(LLViewerInventoryItem* item, - LLViewerJointAttachment* attachment, - bool replace = false); +void rez_attachment(LLViewerInventoryItem* item, + LLViewerJointAttachment* attachment, + bool replace = false); // Move items from an in-world object's "Contents" folder to a specified // folder in agent inventory. -BOOL move_inv_category_world_to_agent(const LLUUID& object_id, - const LLUUID& category_id, - BOOL drop, - std::function callback = NULL, - void* user_data = NULL, - LLInventoryFilter* filter = NULL); +BOOL move_inv_category_world_to_agent(const LLUUID& object_id, + const LLUUID& category_id, + BOOL drop, + std::function callback = NULL, + void* user_data = NULL, + LLInventoryFilter* filter = NULL); // Utility function to hide all entries except those in the list // Can be called multiple times on the same menu (e.g. if multiple items // are selected). If "append" is false, then only common enabled items // are set as enabled. -void hide_context_entries(LLMenuGL& menu, - const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries); +void hide_context_entries(LLMenuGL& menu, + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); // Helper functions to classify actions. bool isAddAction(const std::string& action); -- cgit v1.2.3