diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-08-02 20:52:17 +0300 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-08-02 20:52:17 +0300 |
commit | 74ed51e77d7a44b845dcc12d1d7ad6a426caaa2d (patch) | |
tree | e30c6541f88013fe4fb822dca028b9bf1df7485b /indra/newview/llwearableitemslist.h | |
parent | b8b7a61e9e732b16a56ae0bec3b9098ccfd28292 (diff) |
EXT-7676 FIXED Restored fix (47df1b3fd94e) reverted in merge 5b5cc4a8642d with slight modifications.
- Replaced pointers passed to 'Add More' gear menu with LLHandle.
- Removed storing 'Add More' panel sort order from settings because the order is changed each time the panel opens.
- Replaced creating items comparator in LLPanelOutfitEdit::postBuild() with a static comparator in llwearableitemslist.cpp.
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/826/.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llwearableitemslist.h')
-rw-r--r-- | indra/newview/llwearableitemslist.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 2e720d13bb..81f1cd1b40 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -380,6 +380,19 @@ private: }; /** + * @class LLWearableItemCreationDateComparator + * + * Comparator for sorting wearable list items by creation date (newest go first). + */ +class LLWearableItemCreationDateComparator : public LLWearableItemNameComparator +{ + LOG_CLASS(LLWearableItemCreationDateComparator); + +protected: + /*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* item1, const LLPanelInventoryListItemBase* item2) const; +}; + +/** * @class LLWearableItemsList * * A flat list of wearable inventory items. @@ -431,6 +444,14 @@ public: Params(); }; + typedef enum e_sort_order { + // Values should be compatible with InventorySortOrder setting. + E_SORT_BY_NAME = 0, + E_SORT_BY_MOST_RECENT = 1, + E_SORT_BY_TYPE_LAYER = 2, + E_SORT_BY_TYPE_NAME = 3, + } ESortOrder; + virtual ~LLWearableItemsList(); /*virtual*/ void addNewItem(LLViewerInventoryItem* item, bool rearrange = true); @@ -445,6 +466,10 @@ public: bool isStandalone() const { return mIsStandalone; } + ESortOrder getSortOrder() const { return mSortOrder; } + + void setSortOrder(ESortOrder sort_order, bool sort_now = true); + protected: friend class LLUICtrlFactory; LLWearableItemsList(const LLWearableItemsList::Params& p); @@ -453,6 +478,8 @@ protected: bool mIsStandalone; bool mWornIndicationEnabled; + + ESortOrder mSortOrder; }; #endif //LL_LLWEARABLEITEMSLIST_H |