From 1eab3247111e66a3b81153173d1624a5c1c9fb72 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 21 Mar 2023 17:47:26 +0200 Subject: SL-19379 WIP Gallery view Inventory: first pass --- indra/newview/llinventorygallery.h | 233 +++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 indra/newview/llinventorygallery.h (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h new file mode 100644 index 0000000000..ab9d27e260 --- /dev/null +++ b/indra/newview/llinventorygallery.h @@ -0,0 +1,233 @@ +/** + * @file llinventorygallery.h + * @brief LLInventoryGallery class definition + * + * $LicenseInfo:firstyear=2023&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2023, 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$ + */ + +#ifndef LL_LLINVENTORYGALLERY_H +#define LL_LLINVENTORYGALLERY_H + +#include "llpanel.h" +#include "llinventorymodel.h" + +class LLInventoryCategoriesObserver; +class LLInventoryGalleryItem; +class LLScrollContainer; +class LLTextBox; + +class LLInventoryGallery : public LLPanel +{ +public: + + typedef boost::signals2::signal selection_change_signal_t; + typedef boost::function selection_change_callback_t; + + struct Params + : public LLInitParam::Block + { + Optional row_panel_height; + Optional row_panel_width_factor; + Optional gallery_width_factor; + Optional vertical_gap; + Optional horizontal_gap; + Optional item_width; + Optional item_height; + Optional item_horizontal_gap; + Optional items_in_row; + + Params(); + }; + + static const LLInventoryGallery::Params& getDefaultParams(); + + LLInventoryGallery(const LLInventoryGallery::Params& params = getDefaultParams()); + ~LLInventoryGallery(); + + BOOL postBuild(); + void initGallery(); + void draw(); + + void setFilterSubString(const std::string& string); + std::string getFilterSubString() { return mFilterSubString; } + + void getCurrentCategories(uuid_vec_t& vcur); + void updateAddedItem(LLUUID item_id); + void updateRemovedItem(LLUUID item_id); + void updateChangedItemName(LLUUID item_id, std::string name); + + void updateMessageVisibility(); + + void setRootFolder(const LLUUID cat_id); + void updateRootFolder(); + LLUUID getRootFolder() { return mFolderID; } + typedef boost::function root_changed_callback_t; + boost::signals2::connection setRootChangedCallback(root_changed_callback_t cb); + void onForwardFolder(); + void onBackwardFolder(); + void clearNavigationHistory(); + bool isBackwardAvailable(); + bool isForwardAvailable(); + + void setNavBackwardList(std::list backward_list) { mBackwardFolders = backward_list; } + void setNavForwardList(std::list forward_list) { mForwardFolders = forward_list; } + std::list getNavBackwardList() { return mBackwardFolders; } + std::list getNavForwardList() { return mForwardFolders; } + + LLUUID getOutfitImageID(LLUUID outfit_id); + + void refreshList(const LLUUID& category_id); + void computeDifference(const LLInventoryModel::cat_array_t vcats, const LLInventoryModel::item_array_t vitems, uuid_vec_t& vadded, uuid_vec_t& vremoved); + + void deselectItem(const LLUUID& category_id); + void signalSelectionItemID(const LLUUID& category_id); + boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); + +protected: + + void onChangeItemSelection(const LLUUID& category_id); + + void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); + + LLInventoryCategoriesObserver* mCategoriesObserver; + LLUUID mSelectedItemID; + bool mIsInitialized; + + selection_change_signal_t mSelectionChangeSignal; + boost::signals2::signal mRootChangedSignal; + LLUUID mFolderID; + std::list mBackwardFolders; + std::list mForwardFolders; + +private: + void addToGallery(LLInventoryGalleryItem* item); + void removeFromGalleryLast(LLInventoryGalleryItem* item); + void removeFromGalleryMiddle(LLInventoryGalleryItem* item); + LLPanel* addLastRow(); + void removeLastRow(); + void moveRowUp(int row); + void moveRowDown(int row); + void moveRow(int row, int pos); + LLPanel* addToRow(LLPanel* row_stack, LLInventoryGalleryItem* item, int pos, int hgap); + void removeFromLastRow(LLInventoryGalleryItem* item); + void reArrangeRows(S32 row_diff = 0); + void updateRowsIfNeeded(); + void updateGalleryWidth(); + + LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id); + + void buildGalleryPanel(int row_count); + void reshapeGalleryPanel(int row_count); + LLPanel* buildItemPanel(int left); + LLPanel* buildRowPanel(int left, int bottom); + void moveRowPanel(LLPanel* stack, int left, int bottom); + + std::vector mRowPanels; + std::vector mItemPanels; + std::vector mUnusedRowPanels; + std::vector mUnusedItemPanels; + std::vector mItems; + std::vector mHiddenItems; + LLScrollContainer* mScrollPanel; + LLPanel* mGalleryPanel; + LLPanel* mLastRowPanel; + LLTextBox* mMessageTextBox; + int mRowCount; + int mItemsAddedCount; + bool mGalleryCreated; + + /* Params */ + int mRowPanelHeight; + int mVerticalGap; + int mHorizontalGap; + int mItemWidth; + int mItemHeight; + int mItemHorizontalGap; + int mItemsInRow; + int mRowPanelWidth; + int mGalleryWidth; + int mRowPanWidthFactor; + int mGalleryWidthFactor; + + std::string mFilterSubString; + + typedef std::map gallery_item_map_t; + gallery_item_map_t mItemMap; + std::map mItemIndexMap; +}; + +class LLInventoryGalleryItem : public LLPanel +{ +public: + struct Params : public LLInitParam::Block + {}; + + enum EInventorySortGroup + { + SG_SYSTEM_FOLDER, + SG_TRASH_FOLDER, + SG_NORMAL_FOLDER, + SG_ITEM + }; + + LLInventoryGalleryItem(const Params& p); + virtual ~LLInventoryGalleryItem(); + + BOOL postBuild(); + void draw(); + BOOL handleMouseDown(S32 x, S32 y, MASK mask); + BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + + void setName(std::string name); + void setSelected(bool value); + void setUUID(LLUUID id) {mUUID = id;} + LLUUID getUUID() { return mUUID;} + + std::string getItemName() {return mName;} + bool isDefaultImage() {return mDefaultImage;} + + bool isHidden() {return mHidden;} + void setHidden(bool hidden) {mHidden = hidden;} + + void setType(LLAssetType::EType type); + void setThumbnail(LLUUID id); + void setGallery(LLInventoryGallery* gallery) { mGallery = gallery; } + bool isFolder() { return mIsFolder; } + EInventorySortGroup getSortGroup() { return mSortGroup; } + +private: + LLUUID mUUID; + LLTextBox* mNameText; + LLPanel* mTextBgPanel; + bool mSelected; + bool mDefaultImage; + bool mHidden; + bool mIsFolder; + + EInventorySortGroup mSortGroup; + LLAssetType::EType mType; + std::string mName; + LLInventoryGallery* mGallery; +}; + +#endif -- cgit v1.2.3 From d6a11416ec524420b6a6ac298b7b093cb24e9ec9 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 22 Mar 2023 01:20:22 +0200 Subject: SL-19379 WIP handle updated thumbnails in Gallery mode --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index ab9d27e260..35186c53fb 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -74,6 +74,7 @@ public: void updateAddedItem(LLUUID item_id); void updateRemovedItem(LLUUID item_id); void updateChangedItemName(LLUUID item_id, std::string name); + void updateItemThumbnail(LLUUID item_id); void updateMessageVisibility(); -- cgit v1.2.3 From 24b41ee746ccc6b5dd637b8704dc7ec819434605 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 22 Mar 2023 22:15:46 +0200 Subject: SL-19379 WIP basic drag and drop handling --- indra/newview/llinventorygallery.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 35186c53fb..7dd8187af3 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -66,6 +66,8 @@ public: BOOL postBuild(); void initGallery(); void draw(); + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, + void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } @@ -198,6 +200,11 @@ public: BOOL handleMouseDown(S32 x, S32 y, MASK mask); BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); void setName(std::string name); void setSelected(bool value); -- cgit v1.2.3 From cc98d967796e552432a59c2ad81742ad55bff983 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 24 Mar 2023 00:06:15 +0200 Subject: SL-19379 WIP add drag and drop out of Gallery --- indra/newview/llinventorygallery.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 7dd8187af3..0a779037db 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -200,6 +200,8 @@ public: BOOL handleMouseDown(S32 x, S32 y, MASK mask); BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + BOOL handleMouseUp(S32 x, S32 y, MASK mask); + BOOL handleHover(S32 x, S32 y, MASK mask); BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, -- cgit v1.2.3 From d733ee60ea1d7cd7a9259c188b7b942a41d24460 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 24 Mar 2023 12:56:57 +0200 Subject: SL-19379 WIP add double-click attach action for objects; add icon link overlays --- indra/newview/llinventorygallery.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 0a779037db..1c45a8345f 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -136,7 +136,7 @@ private: void updateRowsIfNeeded(); void updateGalleryWidth(); - LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id); + LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, bool is_link); void buildGalleryPanel(int row_count); void reshapeGalleryPanel(int row_count); @@ -219,7 +219,7 @@ public: bool isHidden() {return mHidden;} void setHidden(bool hidden) {mHidden = hidden;} - void setType(LLAssetType::EType type); + void setType(LLAssetType::EType type, bool is_link); void setThumbnail(LLUUID id); void setGallery(LLInventoryGallery* gallery) { mGallery = gallery; } bool isFolder() { return mIsFolder; } -- cgit v1.2.3 From e5b8b799cc75f3b9cd259403c323cd47b59453d8 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 29 Mar 2023 13:51:40 +0300 Subject: SL-19379 WIP add basic context menu --- indra/newview/llinventorygallery.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 1c45a8345f..5c529e7589 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -27,6 +27,7 @@ #ifndef LL_LLINVENTORYGALLERY_H #define LL_LLINVENTORYGALLERY_H +#include "lllistcontextmenu.h" #include "llpanel.h" #include "llinventorymodel.h" @@ -35,6 +36,8 @@ class LLInventoryGalleryItem; class LLScrollContainer; class LLTextBox; +class LLInventoryGalleryContextMenu; + class LLInventoryGallery : public LLPanel { public: @@ -108,6 +111,7 @@ public: protected: void onChangeItemSelection(const LLUUID& category_id); + void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); @@ -171,6 +175,7 @@ private: int mRowPanWidthFactor; int mGalleryWidthFactor; + LLInventoryGalleryContextMenu* mInventoryGalleryMenu; std::string mFilterSubString; typedef std::map gallery_item_map_t; -- cgit v1.2.3 From c10eed08189161bab67cfc296b1891a989d5748d Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 29 Mar 2023 18:02:04 +0300 Subject: SL-19379 WIP allow change search type for Gallery --- indra/newview/llinventorygallery.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 5c529e7589..09eafc8396 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -29,6 +29,7 @@ #include "lllistcontextmenu.h" #include "llpanel.h" +#include "llinventoryfilter.h" #include "llinventorymodel.h" class LLInventoryCategoriesObserver; @@ -108,6 +109,9 @@ public: void signalSelectionItemID(const LLUUID& category_id); boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); + void setSearchType(LLInventoryFilter::ESearchType type); + LLInventoryFilter::ESearchType getSearchType() { return mSearchType; } + protected: void onChangeItemSelection(const LLUUID& category_id); @@ -181,6 +185,8 @@ private: typedef std::map gallery_item_map_t; gallery_item_map_t mItemMap; std::map mItemIndexMap; + + LLInventoryFilter::ESearchType mSearchType; }; class LLInventoryGalleryItem : public LLPanel @@ -217,7 +223,14 @@ public: void setSelected(bool value); void setUUID(LLUUID id) {mUUID = id;} LLUUID getUUID() { return mUUID;} - + + void setAssetIDStr(std::string asset_id) {mAssetIDStr = asset_id;} + std::string getAssetIDStr() { return mAssetIDStr;} + void setDescription(std::string desc) {mDesc = desc;} + std::string getDescription() { return mDesc;} + void setCreatorName(std::string name) {mCreatorName = name;} + std::string getCreatorName() { return mCreatorName;} + std::string getItemName() {return mName;} bool isDefaultImage() {return mDefaultImage;} @@ -238,7 +251,11 @@ private: bool mDefaultImage; bool mHidden; bool mIsFolder; - + + std::string mAssetIDStr; + std::string mDesc; + std::string mCreatorName; + EInventorySortGroup mSortGroup; LLAssetType::EType mType; std::string mName; -- cgit v1.2.3 From 205d6ef5d6d05f5a429f987a78f45bbb2359404d Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 29 Mar 2023 20:51:58 +0300 Subject: SL-19379 WIP show wearable type icons --- indra/newview/llinventorygallery.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 09eafc8396..9d1a277c65 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -144,7 +144,7 @@ private: void updateRowsIfNeeded(); void updateGalleryWidth(); - LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, bool is_link); + LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, bool is_link); void buildGalleryPanel(int row_count); void reshapeGalleryPanel(int row_count); @@ -237,7 +237,7 @@ public: bool isHidden() {return mHidden;} void setHidden(bool hidden) {mHidden = hidden;} - void setType(LLAssetType::EType type, bool is_link); + void setType(LLAssetType::EType type, LLInventoryType::EType inventory_type, U32 flags, bool is_link); void setThumbnail(LLUUID id); void setGallery(LLInventoryGallery* gallery) { mGallery = gallery; } bool isFolder() { return mIsFolder; } -- cgit v1.2.3 From c15ee792a7248cf141abb3ae6a26b33a5aca1ed7 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 30 Mar 2023 15:04:49 +0300 Subject: SL-19379 WIP allow hide link items in search result --- indra/newview/llinventorygallery.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 9d1a277c65..02e706eecd 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -111,6 +111,8 @@ public: void setSearchType(LLInventoryFilter::ESearchType type); LLInventoryFilter::ESearchType getSearchType() { return mSearchType; } + void toggleSearchLinks(); + bool getSearchLinks(){ return mSearchLinks; } protected: @@ -187,6 +189,7 @@ private: std::map mItemIndexMap; LLInventoryFilter::ESearchType mSearchType; + bool mSearchLinks; }; class LLInventoryGalleryItem : public LLPanel @@ -241,6 +244,7 @@ public: void setThumbnail(LLUUID id); void setGallery(LLInventoryGallery* gallery) { mGallery = gallery; } bool isFolder() { return mIsFolder; } + bool isLink() { return mIsLink; } EInventorySortGroup getSortGroup() { return mSortGroup; } private: @@ -251,6 +255,7 @@ private: bool mDefaultImage; bool mHidden; bool mIsFolder; + bool mIsLink; std::string mAssetIDStr; std::string mDesc; -- cgit v1.2.3 From ae3e3662159ca26db5b2efe36d91a9ccdfcec256 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 30 Mar 2023 21:39:43 +0300 Subject: SL-19379 WIP update gear menu with Gallery items --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 02e706eecd..c53640d0ff 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -108,6 +108,7 @@ public: void deselectItem(const LLUUID& category_id); void signalSelectionItemID(const LLUUID& category_id); boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); + LLUUID getSelectedItemID() { return mSelectedItemID; } void setSearchType(LLInventoryFilter::ESearchType type); LLInventoryFilter::ESearchType getSearchType() { return mSearchType; } -- cgit v1.2.3 From 81d69cf84decb84bb7d65057063a19cb6c9fa6f5 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 31 Mar 2023 13:40:59 +0300 Subject: SL-19379 WIP add worn suffix, use bold font style for worn items and italic for links --- indra/newview/llinventorygallery.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index c53640d0ff..036817de93 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -81,6 +81,7 @@ public: void updateRemovedItem(LLUUID item_id); void updateChangedItemName(LLUUID item_id, std::string name); void updateItemThumbnail(LLUUID item_id); + void updateWornItem(LLUUID item_id, bool is_worn); void updateMessageVisibility(); @@ -103,6 +104,7 @@ public: LLUUID getOutfitImageID(LLUUID outfit_id); void refreshList(const LLUUID& category_id); + void onCOFChanged(); void computeDifference(const LLInventoryModel::cat_array_t vcats, const LLInventoryModel::item_array_t vitems, uuid_vec_t& vadded, uuid_vec_t& vremoved); void deselectItem(const LLUUID& category_id); @@ -147,7 +149,7 @@ private: void updateRowsIfNeeded(); void updateGalleryWidth(); - LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, bool is_link); + LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, bool is_link, bool is_worn); void buildGalleryPanel(int row_count); void reshapeGalleryPanel(int row_count); @@ -187,6 +189,7 @@ private: typedef std::map gallery_item_map_t; gallery_item_map_t mItemMap; + uuid_vec_t mCOFLinkedItems; std::map mItemIndexMap; LLInventoryFilter::ESearchType mSearchType; @@ -223,8 +226,11 @@ public: EAcceptance* accept, std::string& tooltip_msg); + LLFontGL* getTextFont(); + void setName(std::string name); void setSelected(bool value); + void setWorn(bool value); void setUUID(LLUUID id) {mUUID = id;} LLUUID getUUID() { return mUUID;} @@ -251,8 +257,10 @@ public: private: LLUUID mUUID; LLTextBox* mNameText; + LLTextBox* mSuffixText; LLPanel* mTextBgPanel; bool mSelected; + bool mWorn; bool mDefaultImage; bool mHidden; bool mIsFolder; -- cgit v1.2.3 From bc285ed41e86e685df07f4039c64c0402833b047 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 3 Apr 2023 21:34:37 +0300 Subject: SL-19521 Inventory filters floater should affect Inventory Gallery --- indra/newview/llinventorygallery.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 036817de93..cef7574093 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -75,6 +75,8 @@ public: void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } + LLInventoryFilter& getFilter() const { return *mFilter; } + bool checkAgainstFilterType(const LLUUID& object_id); void getCurrentCategories(uuid_vec_t& vcur); void updateAddedItem(LLUUID item_id); @@ -114,8 +116,8 @@ public: void setSearchType(LLInventoryFilter::ESearchType type); LLInventoryFilter::ESearchType getSearchType() { return mSearchType; } - void toggleSearchLinks(); - bool getSearchLinks(){ return mSearchLinks; } + + bool hasDescendents(const LLUUID& cat_id); protected: @@ -146,7 +148,7 @@ private: LLPanel* addToRow(LLPanel* row_stack, LLInventoryGalleryItem* item, int pos, int hgap); void removeFromLastRow(LLInventoryGalleryItem* item); void reArrangeRows(S32 row_diff = 0); - void updateRowsIfNeeded(); + bool updateRowsIfNeeded(); void updateGalleryWidth(); LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, bool is_link, bool is_worn); @@ -186,6 +188,7 @@ private: LLInventoryGalleryContextMenu* mInventoryGalleryMenu; std::string mFilterSubString; + LLInventoryFilter* mFilter; typedef std::map gallery_item_map_t; gallery_item_map_t mItemMap; @@ -193,7 +196,7 @@ private: std::map mItemIndexMap; LLInventoryFilter::ESearchType mSearchType; - bool mSearchLinks; + std::string mUsername; }; class LLInventoryGalleryItem : public LLPanel -- cgit v1.2.3 From 7ccfbd7c285cc2ab0bbf569912f8e9e2d5c1df72 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 4 Apr 2023 15:14:02 +0300 Subject: SL-19379 Don't switch focus to other Inventory floater when creating an item in Gallery --- indra/newview/llinventorygallery.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index cef7574093..7284c92c96 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -110,6 +110,7 @@ public: void computeDifference(const LLInventoryModel::cat_array_t vcats, const LLInventoryModel::item_array_t vitems, uuid_vec_t& vadded, uuid_vec_t& vremoved); void deselectItem(const LLUUID& category_id); + void changeItemSelection(const LLUUID& item_id); void signalSelectionItemID(const LLUUID& category_id); boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); LLUUID getSelectedItemID() { return mSelectedItemID; } @@ -121,7 +122,6 @@ public: protected: - void onChangeItemSelection(const LLUUID& category_id); void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); -- cgit v1.2.3 From f5809ad862c0a9b1004a2c9a779df99ff4555a1f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 4 Apr 2023 20:18:08 +0300 Subject: SL-19379 Observe thumbnail changes and update it in Gallery --- indra/newview/llinventorygallery.h | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 7284c92c96..98ed91df19 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -30,15 +30,19 @@ #include "lllistcontextmenu.h" #include "llpanel.h" #include "llinventoryfilter.h" +#include "llinventoryobserver.h" #include "llinventorymodel.h" class LLInventoryCategoriesObserver; class LLInventoryGalleryItem; class LLScrollContainer; class LLTextBox; +class LLThumbnailsObserver; class LLInventoryGalleryContextMenu; +typedef boost::function callback_t; + class LLInventoryGallery : public LLPanel { public: @@ -90,8 +94,7 @@ public: void setRootFolder(const LLUUID cat_id); void updateRootFolder(); LLUUID getRootFolder() { return mFolderID; } - typedef boost::function root_changed_callback_t; - boost::signals2::connection setRootChangedCallback(root_changed_callback_t cb); + boost::signals2::connection setRootChangedCallback(callback_t cb); void onForwardFolder(); void onBackwardFolder(); void clearNavigationHistory(); @@ -127,6 +130,7 @@ protected: void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); LLInventoryCategoriesObserver* mCategoriesObserver; + LLThumbnailsObserver* mThumbnailsObserver; LLUUID mSelectedItemID; bool mIsInitialized; @@ -279,4 +283,33 @@ private: LLInventoryGallery* mGallery; }; +class LLThumbnailsObserver : public LLInventoryObserver +{ +public: + LLThumbnailsObserver(){}; + + virtual void changed(U32 mask); + bool addItem(const LLUUID& obj_id, callback_t cb); + void removeItem(const LLUUID& obj_id); + +protected: + + struct LLItemData + { + LLItemData(const LLUUID& obj_id, const LLUUID& thumbnail_id, callback_t cb) + : mItemID(obj_id) + , mCallback(cb) + , mThumbnailID(thumbnail_id) + {} + + callback_t mCallback; + LLUUID mItemID; + LLUUID mThumbnailID; + }; + + typedef std::map item_map_t; + typedef item_map_t::value_type item_map_value_t; + item_map_t mItemMap; +}; + #endif -- cgit v1.2.3 From d5a949d97a67c8b9e551fc4b22d4c901eaf1d91a Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 7 Apr 2023 15:13:47 +0300 Subject: SL-19544 WIP Combination view first pass --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 98ed91df19..5634c63072 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -122,6 +122,7 @@ public: LLInventoryFilter::ESearchType getSearchType() { return mSearchType; } bool hasDescendents(const LLUUID& cat_id); + bool hasVisibleItems(); protected: -- cgit v1.2.3 From 842bc87941d4574fe1ce34186872e43ecef881c3 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 12 Apr 2023 12:56:56 +0300 Subject: SL-19544 WIP update combination gallery visibility after changing filter --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 5634c63072..6bca8a0dc5 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -123,6 +123,7 @@ public: bool hasDescendents(const LLUUID& cat_id); bool hasVisibleItems(); + void handleModifiedFilter(); protected: -- cgit v1.2.3 From 107a7eb919bb0afadf6ad3f92482cf7e6d67c56e Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 13 Apr 2023 17:49:26 +0300 Subject: SL-19544 WIP add active suffix for gestures and add appropriate context menu handling --- indra/newview/llinventorygallery.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 6bca8a0dc5..f0f4c45e04 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -27,6 +27,7 @@ #ifndef LL_LLINVENTORYGALLERY_H #define LL_LLINVENTORYGALLERY_H +#include "llgesturemgr.h" #include "lllistcontextmenu.h" #include "llpanel.h" #include "llinventoryfilter.h" @@ -38,6 +39,7 @@ class LLInventoryGalleryItem; class LLScrollContainer; class LLTextBox; class LLThumbnailsObserver; +class LLGalleryGestureObserver; class LLInventoryGalleryContextMenu; @@ -110,6 +112,7 @@ public: void refreshList(const LLUUID& category_id); void onCOFChanged(); + void onGesturesChanged(); void computeDifference(const LLInventoryModel::cat_array_t vcats, const LLInventoryModel::item_array_t vitems, uuid_vec_t& vadded, uuid_vec_t& vremoved); void deselectItem(const LLUUID& category_id); @@ -133,6 +136,7 @@ protected: LLInventoryCategoriesObserver* mCategoriesObserver; LLThumbnailsObserver* mThumbnailsObserver; + LLGalleryGestureObserver* mGestureObserver; LLUUID mSelectedItemID; bool mIsInitialized; @@ -199,6 +203,7 @@ private: typedef std::map gallery_item_map_t; gallery_item_map_t mItemMap; uuid_vec_t mCOFLinkedItems; + uuid_vec_t mActiveGestures; std::map mItemIndexMap; LLInventoryFilter::ESearchType mSearchType; @@ -257,6 +262,7 @@ public: void setHidden(bool hidden) {mHidden = hidden;} void setType(LLAssetType::EType type, LLInventoryType::EType inventory_type, U32 flags, bool is_link); + LLAssetType::EType getAssetType() { return mType; } void setThumbnail(LLUUID id); void setGallery(LLInventoryGallery* gallery) { mGallery = gallery; } bool isFolder() { return mIsFolder; } @@ -314,4 +320,15 @@ protected: item_map_t mItemMap; }; +class LLGalleryGestureObserver : public LLGestureManagerObserver +{ +public: + LLGalleryGestureObserver(LLInventoryGallery* gallery) : mGallery(gallery) {} + virtual ~LLGalleryGestureObserver() {} + virtual void changed() { mGallery->onGesturesChanged(); } + +private: + LLInventoryGallery* mGallery; +}; + #endif -- cgit v1.2.3 From 94dd7b2c0c020bad25dab9472d612f673f136422 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 13 Apr 2023 19:33:20 +0300 Subject: SL-19544 WIP search by name should include suffix --- indra/newview/llinventorygallery.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index f0f4c45e04..fd6bd0d502 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -256,6 +256,7 @@ public: std::string getCreatorName() { return mCreatorName;} std::string getItemName() {return mName;} + std::string getItemNameSuffix() {return mSuffix;} bool isDefaultImage() {return mDefaultImage;} bool isHidden() {return mHidden;} @@ -288,6 +289,7 @@ private: EInventorySortGroup mSortGroup; LLAssetType::EType mType; std::string mName; + std::string mSuffix; LLInventoryGallery* mGallery; }; -- cgit v1.2.3 From 5554686b9117901cddb3d36f237622442c1d7a8d Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 17 Apr 2023 13:22:27 +0300 Subject: SL-19544 WIP show item permissions after item name --- indra/newview/llinventorygallery.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index fd6bd0d502..fdab616720 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -256,7 +256,7 @@ public: std::string getCreatorName() { return mCreatorName;} std::string getItemName() {return mName;} - std::string getItemNameSuffix() {return mSuffix;} + std::string getItemNameSuffix() {return mPermSuffix + mWornSuffix;} bool isDefaultImage() {return mDefaultImage;} bool isHidden() {return mHidden;} @@ -269,11 +269,12 @@ public: bool isFolder() { return mIsFolder; } bool isLink() { return mIsLink; } EInventorySortGroup getSortGroup() { return mSortGroup; } + + void updateNameText(); private: LLUUID mUUID; LLTextBox* mNameText; - LLTextBox* mSuffixText; LLPanel* mTextBgPanel; bool mSelected; bool mWorn; @@ -289,7 +290,8 @@ private: EInventorySortGroup mSortGroup; LLAssetType::EType mType; std::string mName; - std::string mSuffix; + std::string mWornSuffix; + std::string mPermSuffix; LLInventoryGallery* mGallery; }; -- cgit v1.2.3 From ce2aaab15912693d51383274dc1dfebb20c0b6a2 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 18 Apr 2023 21:27:25 +0300 Subject: SL-19604 FIXED Creating new folders and items in gallery or combination views does not highlight created item --- indra/newview/llinventorygallery.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index fdab616720..07613b20aa 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -116,7 +116,8 @@ public: void computeDifference(const LLInventoryModel::cat_array_t vcats, const LLInventoryModel::item_array_t vitems, uuid_vec_t& vadded, uuid_vec_t& vremoved); void deselectItem(const LLUUID& category_id); - void changeItemSelection(const LLUUID& item_id); + void changeItemSelection(const LLUUID& item_id, bool scroll_to_selection = false); + void scrollToShowItem(const LLUUID& item_id); void signalSelectionItemID(const LLUUID& category_id); boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); LLUUID getSelectedItemID() { return mSelectedItemID; } @@ -138,6 +139,7 @@ protected: LLThumbnailsObserver* mThumbnailsObserver; LLGalleryGestureObserver* mGestureObserver; LLUUID mSelectedItemID; + LLUUID mItemToSelect; bool mIsInitialized; selection_change_signal_t mSelectionChangeSignal; -- cgit v1.2.3 From a03f3cd00db95fb8dc6fd500e95054c654088bf7 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 20 Apr 2023 14:42:25 +0300 Subject: SL-19630 FIXED Adding a thumbnail to item in combination view does not update gallery view --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 07613b20aa..1760535524 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -134,6 +134,7 @@ protected: void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); + bool checkAgainstFilters(LLInventoryGalleryItem* item, const std::string& filter_substring); LLInventoryCategoriesObserver* mCategoriesObserver; LLThumbnailsObserver* mThumbnailsObserver; -- cgit v1.2.3 From 0091fa0cbaba034da09d42d49f68c63f2cc7df14 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 26 Apr 2023 03:53:05 +0300 Subject: SL-19583 Uniform risizing for combination inventory view --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 1760535524..2cf038b7d8 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -128,6 +128,7 @@ public: bool hasDescendents(const LLUUID& cat_id); bool hasVisibleItems(); void handleModifiedFilter(); + LLScrollContainer* getScrollableContainer() { return mScrollPanel; } protected: -- cgit v1.2.3 From 61818417d619c8d17cf861f0d72b314a14269e2f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 5 May 2023 18:17:00 +0300 Subject: SL-19641 FIXED Gallery item is not selected after using 'Find original' --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 2cf038b7d8..dfb7be6a86 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -129,6 +129,7 @@ public: bool hasVisibleItems(); void handleModifiedFilter(); LLScrollContainer* getScrollableContainer() { return mScrollPanel; } + LLInventoryGalleryItem* getSelectedItem(); protected: -- cgit v1.2.3 From 8a1cb8c00cf75ff1e09c72c2fb487728ec77c66b Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 10 May 2023 12:51:08 +0300 Subject: SL-19697 FIXED Clicking on inventory item in list view does not unselect item in gallery view --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index dfb7be6a86..f7065afdae 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -116,6 +116,7 @@ public: void computeDifference(const LLInventoryModel::cat_array_t vcats, const LLInventoryModel::item_array_t vitems, uuid_vec_t& vadded, uuid_vec_t& vremoved); void deselectItem(const LLUUID& category_id); + void clearSelection(); void changeItemSelection(const LLUUID& item_id, bool scroll_to_selection = false); void scrollToShowItem(const LLUUID& item_id); void signalSelectionItemID(const LLUUID& category_id); -- cgit v1.2.3 From 100ace48f1cd64a364179c06900465209aac4945 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 18 May 2023 23:22:58 +0300 Subject: SL-19686 don't build gallery items without thumbnails in combination view --- indra/newview/llinventorygallery.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index f7065afdae..473d1a1db4 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -89,6 +89,7 @@ public: void updateRemovedItem(LLUUID item_id); void updateChangedItemName(LLUUID item_id, std::string name); void updateItemThumbnail(LLUUID item_id); + void onThumbnailAdded(LLUUID item_id); void updateWornItem(LLUUID item_id, bool is_worn); void updateMessageVisibility(); @@ -308,7 +309,9 @@ public: virtual void changed(U32 mask); bool addItem(const LLUUID& obj_id, callback_t cb); + void addSkippedItem(const LLUUID& obj_id, callback_t cb); void removeItem(const LLUUID& obj_id); + void removeSkippedItem(const LLUUID& obj_id); protected: @@ -328,6 +331,7 @@ protected: typedef std::map item_map_t; typedef item_map_t::value_type item_map_value_t; item_map_t mItemMap; + item_map_t mSkippedItems; }; class LLGalleryGestureObserver : public LLGestureManagerObserver -- cgit v1.2.3 From 67e17bd822f146f333b91d353df6f55174ce4db6 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 26 May 2023 19:45:46 +0300 Subject: SL-19774 add context menu for root folder (without any selection); show paste menu when right clicking any item --- indra/newview/llinventorygallery.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 473d1a1db4..7e4ed9725b 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -78,6 +78,7 @@ public: void draw(); BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); + BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } @@ -204,6 +205,7 @@ private: int mGalleryWidthFactor; LLInventoryGalleryContextMenu* mInventoryGalleryMenu; + LLInventoryGalleryContextMenu* mRootGalleryMenu; std::string mFilterSubString; LLInventoryFilter* mFilter; -- cgit v1.2.3 From 8a33d65e984431d47f260b2cacbfc20ed4f8124c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 2 Jun 2023 22:48:57 +0300 Subject: SL-19815 Suppors Page Up, Page Down, Home, End and Delete --- indra/newview/llinventorygallery.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 7e4ed9725b..de0cba6e63 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -73,12 +73,13 @@ public: LLInventoryGallery(const LLInventoryGallery::Params& params = getDefaultParams()); ~LLInventoryGallery(); - BOOL postBuild(); + BOOL postBuild() override; void initGallery(); - void draw(); + void draw() override; BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, - void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; + BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override; + BOOL handleKeyHere(KEY key, MASK mask) override; void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } -- cgit v1.2.3 From fb248ad2bc106bad827e624b4bb6b99a3f97d266 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 3 Jun 2023 02:05:17 +0300 Subject: SL-19815 Gallery support for left, right, up and down --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index de0cba6e63..7d4431dbfb 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -215,6 +215,7 @@ private: uuid_vec_t mCOFLinkedItems; uuid_vec_t mActiveGestures; std::map mItemIndexMap; + std::map mIndexToItemMap; LLInventoryFilter::ESearchType mSearchType; std::string mUsername; -- cgit v1.2.3 From 73afbd1a7788ba033e071fbf00b0758e6c883745 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Jun 2023 22:53:50 +0300 Subject: SL-19815 Properly implement up and down keys --- indra/newview/llinventorygallery.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 7d4431dbfb..7ff471b67b 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -80,6 +80,8 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override; BOOL handleKeyHere(KEY key, MASK mask) override; + void scrollUp(); + void scrollDown(); void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } @@ -250,6 +252,7 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); + BOOL handleKeyHere(KEY key, MASK mask); LLFontGL* getTextFont(); -- cgit v1.2.3 From 2f8227473514b864f7806af031d3c1168b3279aa Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Jun 2023 23:26:29 +0300 Subject: SL-19815 Small handling rearrangement --- indra/newview/llinventorygallery.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 7ff471b67b..e2d9786296 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -80,8 +80,10 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override; BOOL handleKeyHere(KEY key, MASK mask) override; - void scrollUp(); - void scrollDown(); + void moveUp(); + void moveDown(); + void moveLeft(); + void moveRight(); void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } -- cgit v1.2.3 From 53fc42fe032c2aef453f420645b0e46dea4c23db Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 8 Jun 2023 22:50:12 +0300 Subject: SL-19832 Inventory gallery should support CTRL+X, C and V --- indra/newview/llinventorygallery.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index e2d9786296..ac4811adec 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -45,7 +45,7 @@ class LLInventoryGalleryContextMenu; typedef boost::function callback_t; -class LLInventoryGallery : public LLPanel +class LLInventoryGallery : public LLPanel, public LLEditMenuHandler { public: @@ -139,6 +139,19 @@ public: LLScrollContainer* getScrollableContainer() { return mScrollPanel; } LLInventoryGalleryItem* getSelectedItem(); + // Copy & paste (LLEditMenuHandler) + void copy() override; + BOOL canCopy() const override; + + void cut() override; + BOOL canCut() const override; + + void paste() override; + BOOL canPaste() const override; + + void claimEditHandler(); + static bool isItemCopyable(const LLUUID & item_id); + protected: void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); -- cgit v1.2.3 From a358acf86ddf19aab96ad26a8f4db9cf609bdce7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Jun 2023 00:34:03 +0300 Subject: SL-19845 Show delete confirmation for 'delete' key --- indra/newview/llinventorygallery.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index ac4811adec..54588a3907 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -149,6 +149,9 @@ public: void paste() override; BOOL canPaste() const override; + static void onDelete(const LLSD& notification, const LLSD& response, const LLUUID& selected_id); + void deleteSelection(); + void claimEditHandler(); static bool isItemCopyable(const LLUUID & item_id); -- cgit v1.2.3 From aede902040625b145d36812a3ef29e7677cb1154 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Jun 2023 20:10:46 +0300 Subject: SL-19826 WIP Pasting folders in Single folder view does not give feedback of where the folder is pasted Should resort freshly inserted or dropped folders, does not cover pasting yet --- indra/newview/llinventorygallery.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 54588a3907..3797b9bc61 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -155,16 +155,21 @@ public: void claimEditHandler(); static bool isItemCopyable(const LLUUID & item_id); + BOOL baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, EDragAndDropType cargo_type, + void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); + protected: void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); bool checkAgainstFilters(LLInventoryGalleryItem* item, const std::string& filter_substring); + static void onIdle(void* userdata); LLInventoryCategoriesObserver* mCategoriesObserver; LLThumbnailsObserver* mThumbnailsObserver; LLGalleryGestureObserver* mGestureObserver; + LLInventoryObserver* mInventoryObserver; LLUUID mSelectedItemID; LLUUID mItemToSelect; bool mIsInitialized; @@ -211,6 +216,7 @@ private: int mRowCount; int mItemsAddedCount; bool mGalleryCreated; + bool mNeedsArrange; /* Params */ int mRowPanelHeight; -- cgit v1.2.3 From 5c6a2779c498e69e36276700283ccfb4bdbfd438 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Jun 2023 22:04:52 +0300 Subject: SL-19826 Pasting folders in Single folder should highlight pasted folder --- indra/newview/llinventorygallery.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 3797b9bc61..e71e2eddcd 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -149,8 +149,10 @@ public: void paste() override; BOOL canPaste() const override; + // Copy & paste & delete static void onDelete(const LLSD& notification, const LLSD& response, const LLUUID& selected_id); void deleteSelection(); + void pasteAsLink(); void claimEditHandler(); static bool isItemCopyable(const LLUUID & item_id); -- cgit v1.2.3 From 14aa4dcdc23feafc537f06e49c48e9d693300103 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 10 Jun 2023 02:28:48 +0300 Subject: SL-19847 Delete key should not allow system folders --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index e71e2eddcd..6fbd1556e5 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -152,6 +152,7 @@ public: // Copy & paste & delete static void onDelete(const LLSD& notification, const LLSD& response, const LLUUID& selected_id); void deleteSelection(); + bool canDeleteSelection(); void pasteAsLink(); void claimEditHandler(); -- cgit v1.2.3 From 143e103bcf2b9be2b249ce96e7f84a52469174c7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 14 Jun 2023 23:59:43 +0300 Subject: SL-19686 WIP Switching single folder view for large inventories causes stalls #2 --- indra/newview/llinventorygallery.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 6fbd1556e5..8519ee0731 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -76,6 +76,7 @@ public: BOOL postBuild() override; void initGallery(); void draw() override; + void onVisibilityChange(BOOL new_visibility) override; BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override; @@ -103,6 +104,7 @@ public: void setRootFolder(const LLUUID cat_id); void updateRootFolder(); LLUUID getRootFolder() { return mFolderID; } + bool isRootDirty() { return mRootDirty; } boost::signals2::connection setRootChangedCallback(callback_t cb); void onForwardFolder(); void onBackwardFolder(); @@ -168,6 +170,7 @@ protected: void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); bool checkAgainstFilters(LLInventoryGalleryItem* item, const std::string& filter_substring); static void onIdle(void* userdata); + void dirtyRootFolder(); LLInventoryCategoriesObserver* mCategoriesObserver; LLThumbnailsObserver* mThumbnailsObserver; @@ -176,6 +179,7 @@ protected: LLUUID mSelectedItemID; LLUUID mItemToSelect; bool mIsInitialized; + bool mRootDirty; selection_change_signal_t mSelectionChangeSignal; boost::signals2::signal mRootChangedSignal; -- cgit v1.2.3 From 451a89d75b78ccf0313f5dadbe6f380136500fda Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jun 2023 22:23:29 +0300 Subject: SL-19686 WIP Split gallery initiation over frames --- indra/newview/llinventorygallery.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 8519ee0731..66cffccebc 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -92,11 +92,10 @@ public: bool checkAgainstFilterType(const LLUUID& object_id); void getCurrentCategories(uuid_vec_t& vcur); - void updateAddedItem(LLUUID item_id); + bool updateAddedItem(LLUUID item_id); // returns true if added item is visible void updateRemovedItem(LLUUID item_id); void updateChangedItemName(LLUUID item_id, std::string name); void updateItemThumbnail(LLUUID item_id); - void onThumbnailAdded(LLUUID item_id); void updateWornItem(LLUUID item_id, bool is_worn); void updateMessageVisibility(); @@ -167,7 +166,7 @@ protected: void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); - void applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); + bool applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); bool checkAgainstFilters(LLInventoryGalleryItem* item, const std::string& filter_substring); static void onIdle(void* userdata); void dirtyRootFolder(); @@ -247,6 +246,7 @@ private: gallery_item_map_t mItemMap; uuid_vec_t mCOFLinkedItems; uuid_vec_t mActiveGestures; + uuid_set_t mItemBuildQuery; std::map mItemIndexMap; std::map mIndexToItemMap; -- cgit v1.2.3 From d077558ed7fac01aae8d5a1670f4d0764ec6fbcb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jun 2023 22:50:41 +0300 Subject: SL-19686 Fix memory leak --- indra/newview/llinventorygallery.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 66cffccebc..d82d466aaf 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -134,6 +134,7 @@ public: void setSearchType(LLInventoryFilter::ESearchType type); LLInventoryFilter::ESearchType getSearchType() { return mSearchType; } + bool areViewsInitialized(); bool hasDescendents(const LLUUID& cat_id); bool hasVisibleItems(); void handleModifiedFilter(); -- cgit v1.2.3 From 4de5576fb4bea538f3381f581d3caf54ee03fb05 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Jun 2023 22:26:04 +0300 Subject: SL-19686 Remove gallery 'skipped' items Probably whole observer is not nessesary, instead we need a general observer to track a variety of changes. --- indra/newview/llinventorygallery.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index d82d466aaf..e314281a07 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -348,9 +348,7 @@ public: virtual void changed(U32 mask); bool addItem(const LLUUID& obj_id, callback_t cb); - void addSkippedItem(const LLUUID& obj_id, callback_t cb); void removeItem(const LLUUID& obj_id); - void removeSkippedItem(const LLUUID& obj_id); protected: @@ -370,7 +368,6 @@ protected: typedef std::map item_map_t; typedef item_map_t::value_type item_map_value_t; item_map_t mItemMap; - item_map_t mSkippedItems; }; class LLGalleryGestureObserver : public LLGestureManagerObserver -- cgit v1.2.3 From e99878083155b81c93b0c8b05f300a4501a2d775 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Jun 2023 00:15:57 +0300 Subject: SL-19686 Don't reshape excessively --- indra/newview/llinventorygallery.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index e314281a07..ce618602df 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -189,7 +189,7 @@ protected: private: void addToGallery(LLInventoryGalleryItem* item); - void removeFromGalleryLast(LLInventoryGalleryItem* item); + void removeFromGalleryLast(LLInventoryGalleryItem* item, bool needs_reshape = true); void removeFromGalleryMiddle(LLInventoryGalleryItem* item); LLPanel* addLastRow(); void removeLastRow(); -- cgit v1.2.3 From d9a8ccc2c061bc034ebb6fb13b0950615d8bf30d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Jun 2023 12:22:56 +0300 Subject: SL-19882 Fix LLInventoryGalleryItem redeclaring mName To avoid confusion and potential inheritance issues --- indra/newview/llinventorygallery.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index ce618602df..cb95f61255 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -288,7 +288,7 @@ public: LLFontGL* getTextFont(); - void setName(std::string name); + void setItemName(std::string name); void setSelected(bool value); void setWorn(bool value); void setUUID(LLUUID id) {mUUID = id;} @@ -301,7 +301,7 @@ public: void setCreatorName(std::string name) {mCreatorName = name;} std::string getCreatorName() { return mCreatorName;} - std::string getItemName() {return mName;} + std::string getItemName() {return mItemName;} std::string getItemNameSuffix() {return mPermSuffix + mWornSuffix;} bool isDefaultImage() {return mDefaultImage;} @@ -335,7 +335,7 @@ private: EInventorySortGroup mSortGroup; LLAssetType::EType mType; - std::string mName; + std::string mItemName; std::string mWornSuffix; std::string mPermSuffix; LLInventoryGallery* mGallery; -- cgit v1.2.3 From 93ab02b672efc5388230629bafb5519e725a3683 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 19 Jun 2023 23:03:06 +0300 Subject: SL-19885 add sorting by date for Gallery view --- indra/newview/llinventorygallery.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index cb95f61255..f686d8aa2b 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -157,6 +157,9 @@ public: bool canDeleteSelection(); void pasteAsLink(); + void setSortOrder(U32 order, bool update = false); + U32 getSortOrder() { return mSortOrder; }; + void claimEditHandler(); static bool isItemCopyable(const LLUUID & item_id); @@ -202,7 +205,7 @@ private: bool updateRowsIfNeeded(); void updateGalleryWidth(); - LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, bool is_link, bool is_worn); + LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, time_t creation_date, bool is_link, bool is_worn); void buildGalleryPanel(int row_count); void reshapeGalleryPanel(int row_count); @@ -242,6 +245,7 @@ private: LLInventoryGalleryContextMenu* mRootGalleryMenu; std::string mFilterSubString; LLInventoryFilter* mFilter; + U32 mSortOrder; typedef std::map gallery_item_map_t; gallery_item_map_t mItemMap; @@ -300,6 +304,8 @@ public: std::string getDescription() { return mDesc;} void setCreatorName(std::string name) {mCreatorName = name;} std::string getCreatorName() { return mCreatorName;} + void setCreationDate(time_t date) {mCreationDate = date;} + time_t getCreationDate() { return mCreationDate;} std::string getItemName() {return mItemName;} std::string getItemNameSuffix() {return mPermSuffix + mWornSuffix;} @@ -332,6 +338,7 @@ private: std::string mAssetIDStr; std::string mDesc; std::string mCreatorName; + time_t mCreationDate; EInventorySortGroup mSortGroup; LLAssetType::EType mType; -- cgit v1.2.3 From f30ae5c7812f5449a327a470fd4acaed7546d853 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 23 Jun 2023 21:59:55 +0300 Subject: SL-19914 Inventory gallery Tab support --- indra/newview/llinventorygallery.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index f686d8aa2b..d695da4f95 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -86,6 +86,9 @@ public: void moveLeft(); void moveRight(); + void onFocusLost(); + void onFocusReceived(); + void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } LLInventoryFilter& getFilter() const { return *mFilter; } @@ -161,6 +164,7 @@ public: U32 getSortOrder() { return mSortOrder; }; void claimEditHandler(); + void resetEditHandler(); static bool isItemCopyable(const LLUUID & item_id); BOOL baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, EDragAndDropType cargo_type, @@ -290,6 +294,9 @@ public: std::string& tooltip_msg); BOOL handleKeyHere(KEY key, MASK mask); + void onFocusLost(); + void onFocusReceived(); + LLFontGL* getTextFont(); void setItemName(std::string name); -- cgit v1.2.3 From 97daf1ed1cb9b28905ddf8b9caa51b05975e9511 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 26 Jun 2023 17:12:46 +0300 Subject: mac build fix --- indra/newview/llinventorygallery.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index d695da4f95..5f9c191fc5 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -86,8 +86,8 @@ public: void moveLeft(); void moveRight(); - void onFocusLost(); - void onFocusReceived(); + void onFocusLost() override; + void onFocusReceived() override; void setFilterSubString(const std::string& string); std::string getFilterSubString() { return mFilterSubString; } -- cgit v1.2.3 From 4fb9a3f469c2cb0197d686acb68827f0fa32b451 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 20 Jul 2023 23:47:05 +0300 Subject: SL-20040 Fix selection and context menu issues --- indra/newview/llinventorygallery.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 5f9c191fc5..42bda59c5a 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -51,6 +51,7 @@ public: typedef boost::signals2::signal selection_change_signal_t; typedef boost::function selection_change_callback_t; + typedef std::deque selection_deque; struct Params : public LLInitParam::Block @@ -132,7 +133,7 @@ public: void scrollToShowItem(const LLUUID& item_id); void signalSelectionItemID(const LLUUID& category_id); boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); - LLUUID getSelectedItemID() { return mSelectedItemID; } + LLUUID getFirstSelectedItemID(); void setSearchType(LLInventoryFilter::ESearchType type); LLInventoryFilter::ESearchType getSearchType() { return mSearchType; } @@ -142,7 +143,7 @@ public: bool hasVisibleItems(); void handleModifiedFilter(); LLScrollContainer* getScrollableContainer() { return mScrollPanel; } - LLInventoryGalleryItem* getSelectedItem(); + LLInventoryGalleryItem* getFirstSelectedItem(); // Copy & paste (LLEditMenuHandler) void copy() override; @@ -155,7 +156,7 @@ public: BOOL canPaste() const override; // Copy & paste & delete - static void onDelete(const LLSD& notification, const LLSD& response, const LLUUID& selected_id); + static void onDelete(const LLSD& notification, const LLSD& response, const selection_deque selected_ids); void deleteSelection(); bool canDeleteSelection(); void pasteAsLink(); @@ -170,10 +171,10 @@ public: BOOL baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); -protected: - void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); +protected: + bool applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); bool checkAgainstFilters(LLInventoryGalleryItem* item, const std::string& filter_substring); static void onIdle(void* userdata); @@ -183,8 +184,9 @@ protected: LLThumbnailsObserver* mThumbnailsObserver; LLGalleryGestureObserver* mGestureObserver; LLInventoryObserver* mInventoryObserver; - LLUUID mSelectedItemID; + selection_deque mSelectedItemIDs; LLUUID mItemToSelect; + bool mNeedsSelection; bool mIsInitialized; bool mRootDirty; @@ -300,6 +302,7 @@ public: LLFontGL* getTextFont(); void setItemName(std::string name); + bool isSelected() { return mSelected; } void setSelected(bool value); void setWorn(bool value); void setUUID(LLUUID id) {mUUID = id;} -- cgit v1.2.3 From 0941fcd5a48e9d4d95fb88750db3b964aa983486 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 21 Jul 2023 00:47:14 +0300 Subject: SL-20047 Indicate when gallery items are being cut --- indra/newview/llinventorygallery.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 42bda59c5a..f2e5e38940 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -335,6 +335,8 @@ public: void updateNameText(); private: + bool isFadeItem(); + LLUUID mUUID; LLTextBox* mNameText; LLPanel* mTextBgPanel; @@ -344,6 +346,8 @@ private: bool mHidden; bool mIsFolder; bool mIsLink; + S32 mCutGeneration; + bool mSelectedForCut; std::string mAssetIDStr; std::string mDesc; -- cgit v1.2.3 From f24f72d2f9db7490b169daea16f8ab8400ca12b4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 6 Sep 2023 02:56:11 +0300 Subject: SL-19826 Gallery multiselect support Part#3 wip --- indra/newview/llinventorygallery.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index f2e5e38940..44e0dcf960 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -82,10 +82,12 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override; BOOL handleKeyHere(KEY key, MASK mask) override; - void moveUp(); - void moveDown(); - void moveLeft(); - void moveRight(); + void moveUp(MASK mask); + void moveDown(MASK mask); + void moveLeft(MASK mask); + void moveRight(MASK mask); + void toggleSelectionRange(S32 start_idx, S32 end_idx); + void toggleSelectionRangeFromLast(const LLUUID target); void onFocusLost() override; void onFocusReceived() override; @@ -130,6 +132,8 @@ public: void deselectItem(const LLUUID& category_id); void clearSelection(); void changeItemSelection(const LLUUID& item_id, bool scroll_to_selection = false); + void addItemSelection(const LLUUID& item_id, bool scroll_to_selection = false); + bool toggleItemSelection(const LLUUID& item_id, bool scroll_to_selection = false); void scrollToShowItem(const LLUUID& item_id); void signalSelectionItemID(const LLUUID& category_id); boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb); @@ -174,6 +178,15 @@ public: void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); protected: + void paste(const LLUUID& dest, + std::vector& objects, + bool is_cut_mode, + const LLUUID& marketplacelistings_id); + void pasteAsLink(const LLUUID& dest, + std::vector& objects, + const LLUUID& current_outfit_id, + const LLUUID& marketplacelistings_id, + const LLUUID& my_outifts_id); bool applyFilter(LLInventoryGalleryItem* item, const std::string& filter_substring); bool checkAgainstFilters(LLInventoryGalleryItem* item, const std::string& filter_substring); @@ -185,8 +198,8 @@ protected: LLGalleryGestureObserver* mGestureObserver; LLInventoryObserver* mInventoryObserver; selection_deque mSelectedItemIDs; - LLUUID mItemToSelect; - bool mNeedsSelection; + selection_deque mItemsToSelect; + LLUUID mLastSelectedUUID; bool mIsInitialized; bool mRootDirty; -- cgit v1.2.3 From 167c5121d3a448dcbc15a9553c374c32a4f85eb9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 6 Sep 2023 21:47:33 +0300 Subject: SL-19826 Basic 'shift' support for gallery Part#4 --- indra/newview/llinventorygallery.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.h') diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 44e0dcf960..9b3f12701f 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -80,6 +80,7 @@ public: void onVisibilityChange(BOOL new_visibility) override; BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; + void startDrag(); BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override; BOOL handleKeyHere(KEY key, MASK mask) override; void moveUp(MASK mask); @@ -199,7 +200,7 @@ protected: LLInventoryObserver* mInventoryObserver; selection_deque mSelectedItemIDs; selection_deque mItemsToSelect; - LLUUID mLastSelectedUUID; + LLUUID mLastInteractedUUID; bool mIsInitialized; bool mRootDirty; -- cgit v1.2.3