From 60d680f2eb92e5dbf2ba287f7e4e2e36e1d024e9 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 23 Mar 2010 16:13:59 +0200 Subject: fixed EXT-4753 Just arrived avatars aren't sorted by name in VCP added requesting a list to resort when avatar list item gets updated with avatar name from the name cache --HG-- branch : product-engine --- indra/llui/llflatlistview.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 92cb40332e..5a1ddc2c59 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -379,11 +379,14 @@ private: void setNoItemsCommentVisible(bool visible) const; -private: +protected: /** Comparator to use when sorting the list. */ const ItemComparator* mItemComparator; + +private: + LLPanel* mItemsPanel; S32 mItemsNoScrollWidth; -- cgit v1.2.3 From 114e5ca0839bace7f247a6eadb6e06a28597501d Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 29 Mar 2010 16:33:35 -0400 Subject: EXT-5940 : Typedef all vector's Superficial cleanup to change all typedef std::vector to use a common typedef uuid_vec_t instead. --- indra/llui/llflatlistview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 92cb40332e..837fbb36b7 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -224,7 +224,7 @@ public: * Get LLUUIDs associated with selected items * @param selected_uuids An std::vector being populated with LLUUIDs associated with selected items */ - virtual void getSelectedUUIDs(std::vector& selected_uuids) const; + virtual void getSelectedUUIDs(uuid_vec_t& selected_uuids) const; /** Get the top selected item */ virtual LLPanel* getSelectedItem() const; -- cgit v1.2.3 From 7b4046df83e4353bdade8fbc39387a7bbb3f498d Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 1 Apr 2010 11:47:21 -0700 Subject: EXT-3531 - Ctrl-P does not work reliably on login --- indra/llui/llflatlistview.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 837fbb36b7..3a2ab54658 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -58,7 +58,7 @@ * - Order of returned selected items are not guaranteed * - The control assumes that all items being added are unique. */ -class LLFlatListView : public LLScrollContainer +class LLFlatListView : public LLScrollContainer, public LLEditMenuHandler { public: @@ -114,7 +114,7 @@ public: Params(); }; - virtual ~LLFlatListView() { clear(); }; + virtual ~LLFlatListView(); /** * Connects callback to signal called when Return key is pressed. @@ -344,7 +344,8 @@ protected: virtual bool selectNextItemPair(bool is_up_direction, bool reset_selection); - virtual bool selectAll(); + virtual BOOL canSelectAll() const; + virtual void selectAll(); virtual bool isSelected(item_pair_t* item_pair) const; -- cgit v1.2.3 From 18d9efff12ef8b59c648a801fe2c5c7e0bc8fde4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Apr 2010 16:43:58 -0700 Subject: another fix for bad merge --- indra/llui/llflatlistview.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index e2f01964de..e3c07e811f 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -114,8 +114,6 @@ public: Params(); }; - virtual ~LLFlatListView(); - /** * Connects callback to signal called when Return key is pressed. */ -- cgit v1.2.3 From 4395d8e9f1302e8efcda4b35da3b0e3ea6c36928 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 21 Apr 2010 10:17:09 +0300 Subject: WIP: critical bug EXT-4837 ([NUX] When filter results in null state, provide a message suggesting the user try global search.) Partial implementation of help text in case of empty list when filtered for Nearby and Recent lists of People panel: * Extracted support implementation of several messages for empty list depend of filtering from LLGroupList to LLFlatListEx * change inheritence of LLGroupList and LLAvatarList from LLFlatListView to LLFlatListViewEx * updated panel people to init Nearby & Recent lists with appropriate messages. --HG-- branch : product-engine --- indra/llui/llflatlistview.h | 54 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index e3c07e811f..f7d094f7e7 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -1,10 +1,10 @@ /** * @file llflatlistview.h - * @brief LLFlatListView base class + * @brief LLFlatListView base class and extension to support messages for several cases of an empty list. * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2009, Linden Research, Inc. + * Copyright (c) 2009-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -430,4 +430,54 @@ private: commit_signal_t mOnReturnSignal; }; +/** + * Extends LLFlatListView functionality to show different messages when there are no items in the + * list depend on whether they are filtered or not. + * + * Class provides one message per case of empty list. + * It also provides protected updateNoItemsMessage() method to be called each time when derived list + * is changed to update base mNoItemsCommentTextbox value. + * + * It is implemented to avoid duplication of this functionality in concrete implementations of the + * lists. It is intended to be used as a base class for lists which should support two different + * messages for empty state. Can be improved to support more than two messages via state-to-message map. + */ +class LLFlatListViewEx : public LLFlatListView +{ +public: + struct Params : public LLInitParam::Block + { + /** + * Contains a message for empty list when it does not contain any items at all. + */ + Optional no_items_msg; + + /** + * Contains a message for empty list when its items are removed by filtering. + */ + Optional no_filtered_items_msg; + Params(); + }; + + // *WORKAROUND: two methods to overload appropriate Params due to localization issue: + // no_items_msg & no_filtered_items_msg attributes are not defined as translatable in VLT. See EXT-5931 + void setNoItemsMsg(const std::string& msg) { mNoItemsMsg = msg; } + void setNoFilteredItemsMsg(const std::string& msg) { mNoFilteredItemsMsg = msg; } + +protected: + LLFlatListViewEx(const Params& p); + + /** + * Applies a message for empty list depend on passed argument. + * + * @param items_filtered - if true message for filtered items will be set, otherwise for + * completely empty list. + */ + void updateNoItemsMessage(bool items_filtered); + +private: + std::string mNoFilteredItemsMsg; + std::string mNoItemsMsg; +}; + #endif -- cgit v1.2.3 From 872b4d7ed0bd532e349d3c177a63d48e17d0bdb3 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 28 Apr 2010 11:00:53 +0300 Subject: Fixed critical bug EXT-4837 ( [NUX] When filter results in null state, provide a message suggesting the user try global search.) Implemented passing of entered filter substring without head spaces to search URI in help message for null filtered results. * Updated setting "no item message" to use search term from filter editor for avatar & group lists and for inventory panels. * Updated appropriate translatable strings to get [SEARCH_TERM] substitution. * Updated processing of filter substring to pass original string to methods applied new filter. Additional necessary changes * Changed place to set "no item message" for group list from refresh to where filter is updated (like in avatar lists) * Removed converting of filter substring to upper case in Places & My Appearance sidepanels (this conversion has already been implemented in where filter is applied) * Added a separate message for Landmarks to set search URI to secondlife:///app/search/places for Lanmarks panel; other inventory related panels have URL to all searched categories (secondlife:///app/search/all) Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/326/ --HG-- branch : product-engine --- indra/llui/llflatlistview.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index f7d094f7e7..4f718ab0dc 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -470,10 +470,10 @@ protected: /** * Applies a message for empty list depend on passed argument. * - * @param items_filtered - if true message for filtered items will be set, otherwise for - * completely empty list. + * @param filter_string - if is not empty, message for filtered items will be set, otherwise for + * completely empty list. Value of filter string will be passed as search_term in SLURL. */ - void updateNoItemsMessage(bool items_filtered); + void updateNoItemsMessage(const std::string& filter_string); private: std::string mNoFilteredItemsMsg; -- cgit v1.2.3 From d6edc4cd12c015003cd665028b69a7b34b3aa54f Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 30 Apr 2010 18:27:24 +0300 Subject: Implemented normal EXT-7002 (Inventory flat list needs optimization.): - changed the LLInventoryItemsList::addNewItem() to add item to the list without immediately rearranging - implemented LLFlatListViewEx::setFilterSubString(), sets up new filter string and filters the list. - implemented LLFlatListViewEx::filterItems(), filters the list, rearranges and notifies parent about shape changes. The list items are filtered using the notify() functionality, without need in adding/removing them on each filter call. It sends 'match_filter' request to items and interprets the returned zero as sign of matched filter string, i.e. we don't hide items that don't support 'match_filter' action(separators etc). - filtring of LLOutfitsList. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/342/ --HG-- branch : product-engine --- indra/llui/llflatlistview.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 4f718ab0dc..6395805aab 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -264,9 +264,8 @@ public: /** Get number of selected items in the list */ U32 numSelected() const {return mSelectedItemPairs.size(); } - /** Get number of items in the list */ - U32 size() const { return mItemPairs.size(); } - + /** Get number of (visible) items in the list */ + U32 size(const bool only_visible_items = true) const; /** Removes all items from the list */ virtual void clear(); @@ -464,6 +463,17 @@ public: void setNoItemsMsg(const std::string& msg) { mNoItemsMsg = msg; } void setNoFilteredItemsMsg(const std::string& msg) { mNoFilteredItemsMsg = msg; } + /** + * Sets up new filter string and filters the list. + */ + void setFilterSubString(const std::string& filter_str); + + /** + * Filters the list, rearranges and notifies parent about shape changes. + * Derived classes may want to overload rearrangeItems() to exclude repeated separators after filtration. + */ + void filterItems(); + protected: LLFlatListViewEx(const Params& p); @@ -478,6 +488,7 @@ protected: private: std::string mNoFilteredItemsMsg; std::string mNoItemsMsg; + std::string mFilterSubString; }; #endif -- cgit v1.2.3 From 582f6502ff755d3c86c1daa854425e29ae2654ba Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 5 May 2010 14:23:22 +0300 Subject: Related to low EXT-6823 (Implement a possibility to select several residents by "Shift" button) - fix improved to keep order of multiple selection and to reset the inconsecutive selection. Reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/238/ --HG-- branch : product-engine --- indra/llui/llflatlistview.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 6395805aab..f4e0426f15 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -410,6 +410,8 @@ private: bool mKeepOneItemSelected; + bool mIsConsecutiveSelection; + /** All pairs of the list */ pairs_list_t mItemPairs; -- cgit v1.2.3