From a220acb45496dfbfb154fa9e16943102eda922fc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 22 Apr 2024 23:45:44 +0300 Subject: viewer#1300 Inventory favorites basic framework --- indra/newview/llinventorybridge.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 6f06f3b36d..bbc601b34d 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -86,6 +86,7 @@ public: //-------------------------------------------------------------------- virtual const LLUUID& getUUID() const { return mUUID; } virtual const LLUUID& getThumbnailUUID() const { return LLUUID::null; } + virtual bool getIsFavorite() const { return false; } virtual void clearDisplayName() { mDisplayName.clear(); } virtual void restoreItem() {} virtual void restoreToWorld() {} @@ -256,6 +257,7 @@ public: LLViewerInventoryItem* getItem() const; virtual const LLUUID& getThumbnailUUID() const; + virtual bool getIsFavorite() const; protected: BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); @@ -302,6 +304,7 @@ public: virtual std::string getLabelSuffix() const; virtual LLFontGL::StyleFlags getLabelStyle() const; virtual const LLUUID& getThumbnailUUID() const; + virtual bool getIsFavorite() const; void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;} -- cgit v1.2.3 From cea6eeeede9f687ca195cc9b9e778fd6784afbe2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 25 Apr 2024 04:46:42 +0300 Subject: viewer#1300 'Star' favorites in inventory image is WIP --- indra/newview/llinventorybridge.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index bbc601b34d..8bb4e188e6 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -86,7 +86,7 @@ public: //-------------------------------------------------------------------- virtual const LLUUID& getUUID() const { return mUUID; } virtual const LLUUID& getThumbnailUUID() const { return LLUUID::null; } - virtual bool getIsFavorite() const { return false; } + virtual bool isFavorite() const { return false; } virtual void clearDisplayName() { mDisplayName.clear(); } virtual void restoreItem() {} virtual void restoreToWorld() {} @@ -257,7 +257,9 @@ public: LLViewerInventoryItem* getItem() const; virtual const LLUUID& getThumbnailUUID() const; - virtual bool getIsFavorite() const; + virtual bool isFavorite() const; + virtual bool hasFavorites() const { return false; } + virtual void setHasFavorites(bool val) {} protected: BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); @@ -279,6 +281,7 @@ public: mCallingCards(FALSE), mWearables(FALSE), mIsLoading(false), + mHasFavorites(false), mShowDescendantsCount(false) {} @@ -304,7 +307,9 @@ public: virtual std::string getLabelSuffix() const; virtual LLFontGL::StyleFlags getLabelStyle() const; virtual const LLUUID& getThumbnailUUID() const; - virtual bool getIsFavorite() const; + virtual bool isFavorite() const; + virtual bool hasFavorites() const; + virtual void setHasFavorites(bool val); void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;} @@ -392,6 +397,7 @@ protected: bool mWearables; bool mIsLoading; bool mShowDescendantsCount; + bool mHasFavorites; LLTimer mTimeSinceRequestStart; std::string mMessage; LLRootHandle mHandle; -- cgit v1.2.3 From 2add3b49537fb041b880752dc5302ac6b317e601 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 29 Apr 2024 22:07:12 +0300 Subject: viewer#1300 'Star' favorites in inventory #3 --- indra/newview/llinventorybridge.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 8bb4e188e6..39cd393fdd 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -258,8 +258,6 @@ public: LLViewerInventoryItem* getItem() const; virtual const LLUUID& getThumbnailUUID() const; virtual bool isFavorite() const; - virtual bool hasFavorites() const { return false; } - virtual void setHasFavorites(bool val) {} protected: BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); @@ -281,7 +279,6 @@ public: mCallingCards(FALSE), mWearables(FALSE), mIsLoading(false), - mHasFavorites(false), mShowDescendantsCount(false) {} @@ -308,8 +305,6 @@ public: virtual LLFontGL::StyleFlags getLabelStyle() const; virtual const LLUUID& getThumbnailUUID() const; virtual bool isFavorite() const; - virtual bool hasFavorites() const; - virtual void setHasFavorites(bool val); void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;} @@ -397,7 +392,6 @@ protected: bool mWearables; bool mIsLoading; bool mShowDescendantsCount; - bool mHasFavorites; LLTimer mTimeSinceRequestStart; std::string mMessage; LLRootHandle mHandle; -- cgit v1.2.3 From 1e7dc04644367dd7eb1469b36848aac265eb7050 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 29 Apr 2024 22:07:12 +0300 Subject: viewer#1300 'Star' favorites in inventory #4 --- indra/newview/llinventorybridge.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 39cd393fdd..5100da15cd 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -172,7 +172,8 @@ protected: 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 isAgentInventory() const; // false if lost or in the inventory library + bool isAgentInventoryRoot() const; // true if worn by agent BOOL isCOFFolder() const; // true if COF or descendant of BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox -- cgit v1.2.3 From 645811c6ef3134a540fc1bc7d32d7bdb8fa35046 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 1 May 2024 03:16:47 +0300 Subject: Viewer#1301 Implement Inventory Favorites Tab WIP --- indra/newview/llinventorybridge.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'indra/newview/llinventorybridge.h') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 5100da15cd..2b30d34d70 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -729,6 +729,45 @@ public: U32 flags = 0x00) const; }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Favorites Inventory Panel related classes +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +// Overridden version of the Inventory-Folder-View-Bridge for Folders +class LLFavoritesFolderBridge : public LLFolderBridge +{ + 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. + LLFavoritesFolderBridge(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 LLFavoritesInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder +{ +public: + LLFavoritesInventoryBridgeBuilder() {} + // 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; +}; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Marketplace Inventory Panel related classes //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3