From a1efd4eee8455d656f4d6aa0db8a908f44f3bc1c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 21 Apr 2010 17:31:40 +0300 Subject: Fixed critical bug EXT-4837 ([NUX] When filter results in null state, provide a message suggesting the user try global search.) implementation for: * Places->My Landmarks * My Inventory->My Inventory * My Inventory->Recent * My Appearance->Wearing * My Appearance->My Outfits updated common text and search url (secondlife:///app/search/all because concrete category without is not supported). * People/Friends (Common avatar list support can not be used due to accordions) * added two strings with help messages into panel_people.xml (one for case when an avatar has no any friends - moved from textbox, another to be shown when there are no friends matching filter) * moved logic to show help text into separate method * and updated to be used in both cases: friend list is changed, filter is changed. --HG-- branch : product-engine --- indra/newview/llpanelpeople.cpp | 28 +++++++++++++++------- indra/newview/llpanelpeople.h | 1 + .../newview/skins/default/xui/en/panel_people.xml | 18 +++++++++----- indra/newview/skins/default/xui/en/strings.xml | 2 +- 4 files changed, 34 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index daa2a04f65..f60951ca66 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -645,6 +645,23 @@ void LLPanelPeople::onChange(EStatusType status, const std::string &channelURI, updateButtons(); } +void LLPanelPeople::updateFriendListHelpText() +{ + // show special help text for just created account to help finding friends. EXT-4836 + static LLTextBox* no_friends_text = getChild("no_friends_help_text"); + + // Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) + // So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. + bool any_friend_exists = mAllFriendList->filterHasMatches() || mOnlineFriendList->filterHasMatches(); + no_friends_text->setVisible(!any_friend_exists); + if (no_friends_text->getVisible()) + { + //update help text for empty lists + std::string message_name = mFilterSubString.empty() ? "no_friends_msg" : "no_filtered_friends_msg"; + no_friends_text->setText(getString(message_name)); + } +} + void LLPanelPeople::updateFriendList() { if (!mOnlineFriendList || !mAllFriendList) @@ -684,14 +701,6 @@ void LLPanelPeople::updateFriendList() online_friendsp.push_back(buddy_id); } - // show special help text for just created account to help found friends. EXT-4836 - static LLTextBox* no_friends_text = getChild("no_friends_msg"); - - // Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) - // So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. - bool any_friend_exists = (all_friendsp.size() > 0) || (online_friendsp.size() > 0); - no_friends_text->setVisible(!any_friend_exists); - /* * Avatarlists will be hidden by showFriendsAccordionsIfNeeded(), if they do not have items. * But avatarlist can be updated only if it is visible @see LLAvatarList::draw(); @@ -1436,6 +1445,9 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded() // Rearrange accordions LLAccordionCtrl* accordion = getChild("friends_accordion"); accordion->arrange(); + + // keep help text in a synchronization with accordions visibility. + updateFriendListHelpText(); } } diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 891381e2de..1bd3ea471c 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -73,6 +73,7 @@ private: } ESortOrder; // methods indirectly called by the updaters + void updateFriendListHelpText(); void updateFriendList(); void updateNearbyList(); void updateRecentList(); diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 61784fede4..cc579cdd7a 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -29,6 +29,15 @@ + + Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. +Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. + + + Didn't find what you're looking for? Try [secondlife:///app/search/people Search]. + @@ -265,14 +274,11 @@ - Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. -Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. - + wrap="true" /> Press ESC to return to World View - No matching items found in inventory. Try [secondlife:///app/search/groups "Search"]. + Didn't find what you're looking for? Try [secondlife:///app/search/all Search]. Drag a landmark here to add it to your favorites. You do not have a copy of this texture in your inventory -- cgit v1.2.3